Repository: sqlc-dev/sqlc Branch: main Commit: ce83d3fe9f59 Files: 6671 Total size: 12.3 MB Directory structure: gitextract_4y3p3xpd/ ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── BUG_REPORT.yml │ │ └── FEATURE_REQUEST.yml │ ├── dependabot.yml │ └── workflows/ │ ├── buf.yml │ ├── build.yml │ ├── ci-kotlin.yml │ ├── ci-python.yml │ ├── ci-typescript.yml │ ├── ci.yml │ └── gen.yml ├── .gitignore ├── .readthedocs.yaml ├── .vscode/ │ └── settings.json ├── CLAUDE.md ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── buf.gen.yaml ├── buf.work.yaml ├── cliff.toml ├── cmd/ │ ├── sqlc/ │ │ └── main.go │ ├── sqlc-gen-json/ │ │ └── main.go │ └── sqlc-test-setup/ │ └── main.go ├── devenv.nix ├── devenv.yaml ├── docker-compose.yml ├── docs/ │ ├── .gitignore │ ├── Makefile │ ├── _static/ │ │ └── customize.css │ ├── _templates/ │ │ ├── breadcrumbs.html │ │ └── layout.html │ ├── conf.py │ ├── guides/ │ │ ├── development.md │ │ ├── migrating-off-hosted-managed-databases.md │ │ ├── migrating-to-sqlc-gen-kotlin.md │ │ ├── migrating-to-sqlc-gen-python.md │ │ ├── plugins.md │ │ ├── privacy.md │ │ └── using-go-and-pgx.rst │ ├── howto/ │ │ ├── ci-cd.md │ │ ├── ddl.md │ │ ├── delete.md │ │ ├── embedding.md │ │ ├── generate.md │ │ ├── insert.md │ │ ├── managed-databases.md │ │ ├── named_parameters.md │ │ ├── overrides.md │ │ ├── prepared_query.md │ │ ├── push.md │ │ ├── query_count.md │ │ ├── rename.md │ │ ├── select.md │ │ ├── structs.md │ │ ├── transactions.md │ │ ├── update.md │ │ ├── verify.md │ │ └── vet.md │ ├── index.rst │ ├── overview/ │ │ └── install.md │ ├── reference/ │ │ ├── changelog.md │ │ ├── cli.md │ │ ├── config.md │ │ ├── datatypes.md │ │ ├── environment-variables.md │ │ ├── language-support.rst │ │ ├── macros.md │ │ └── query-annotations.md │ ├── requirements.txt │ └── tutorials/ │ ├── getting-started-mysql.md │ ├── getting-started-postgresql.md │ └── getting-started-sqlite.md ├── examples/ │ ├── authors/ │ │ ├── mysql/ │ │ │ ├── db.go │ │ │ ├── db_test.go │ │ │ ├── models.go │ │ │ ├── query.sql │ │ │ ├── query.sql.go │ │ │ └── schema.sql │ │ ├── postgresql/ │ │ │ ├── db.go │ │ │ ├── db_test.go │ │ │ ├── models.go │ │ │ ├── query.sql │ │ │ ├── query.sql.go │ │ │ └── schema.sql │ │ ├── sqlc.yaml │ │ └── sqlite/ │ │ ├── db.go │ │ ├── db_test.go │ │ ├── models.go │ │ ├── query.sql │ │ ├── query.sql.go │ │ └── schema.sql │ ├── batch/ │ │ ├── postgresql/ │ │ │ ├── batch.go │ │ │ ├── db.go │ │ │ ├── db_test.go │ │ │ ├── models.go │ │ │ ├── querier.go │ │ │ ├── query.sql │ │ │ ├── query.sql.go │ │ │ └── schema.sql │ │ └── sqlc.json │ ├── booktest/ │ │ ├── mysql/ │ │ │ ├── db.go │ │ │ ├── db_test.go │ │ │ ├── models.go │ │ │ ├── query.sql │ │ │ ├── query.sql.go │ │ │ └── schema.sql │ │ ├── postgresql/ │ │ │ ├── db.go │ │ │ ├── db_test.go │ │ │ ├── models.go │ │ │ ├── query.sql │ │ │ ├── query.sql.go │ │ │ └── schema.sql │ │ ├── sqlc.json │ │ └── sqlite/ │ │ ├── db.go │ │ ├── db_test.go │ │ ├── models.go │ │ ├── query.sql │ │ ├── query.sql.go │ │ └── schema.sql │ ├── jets/ │ │ ├── README.md │ │ ├── postgresql/ │ │ │ ├── db.go │ │ │ ├── models.go │ │ │ ├── query-building.sql │ │ │ ├── query-building.sql.go │ │ │ └── schema.sql │ │ └── sqlc.json │ └── ondeck/ │ ├── mysql/ │ │ ├── city.sql.go │ │ ├── db.go │ │ ├── db_test.go │ │ ├── models.go │ │ ├── querier.go │ │ ├── query/ │ │ │ ├── city.sql │ │ │ └── venue.sql │ │ ├── schema/ │ │ │ ├── 0001_city.sql │ │ │ ├── 0002_venue.sql │ │ │ └── 0003_add_column.sql │ │ └── venue.sql.go │ ├── postgresql/ │ │ ├── city.sql.go │ │ ├── db.go │ │ ├── db_test.go │ │ ├── models.go │ │ ├── querier.go │ │ ├── query/ │ │ │ ├── city.sql │ │ │ └── venue.sql │ │ ├── schema/ │ │ │ ├── 0001_city.sql │ │ │ ├── 0002_venue.sql │ │ │ └── 0003_add_column.sql │ │ └── venue.sql.go │ ├── sqlc.json │ └── sqlite/ │ ├── city.sql.go │ ├── db.go │ ├── db_test.go │ ├── models.go │ ├── querier.go │ ├── query/ │ │ ├── city.sql │ │ └── venue.sql │ ├── schema/ │ │ ├── 0001_city.sql │ │ ├── 0002_venue.sql │ │ └── 0003_add_column.sql │ └── venue.sql.go ├── go.mod ├── go.sum ├── internal/ │ ├── analysis/ │ │ ├── analysis.pb.go │ │ └── analysis_vtproto.pb.go │ ├── analyzer/ │ │ └── analyzer.go │ ├── bundler/ │ │ ├── multipart.go │ │ └── upload.go │ ├── cache/ │ │ └── cache.go │ ├── cmd/ │ │ ├── cmd.go │ │ ├── createdb.go │ │ ├── diff.go │ │ ├── generate.go │ │ ├── options.go │ │ ├── parse.go │ │ ├── process.go │ │ ├── push.go │ │ ├── shim.go │ │ ├── verify.go │ │ ├── vet.go │ │ └── vet_sqlite.go │ ├── codegen/ │ │ ├── golang/ │ │ │ ├── driver.go │ │ │ ├── enum.go │ │ │ ├── field.go │ │ │ ├── gen.go │ │ │ ├── go_type.go │ │ │ ├── imports.go │ │ │ ├── mysql_type.go │ │ │ ├── opts/ │ │ │ │ ├── enum.go │ │ │ │ ├── go_type.go │ │ │ │ ├── options.go │ │ │ │ ├── override.go │ │ │ │ ├── override_test.go │ │ │ │ └── shim.go │ │ │ ├── postgresql_type.go │ │ │ ├── query.go │ │ │ ├── reserved.go │ │ │ ├── result.go │ │ │ ├── result_test.go │ │ │ ├── sqlite_type.go │ │ │ ├── struct.go │ │ │ ├── template.go │ │ │ └── templates/ │ │ │ ├── go-sql-driver-mysql/ │ │ │ │ └── copyfromCopy.tmpl │ │ │ ├── pgx/ │ │ │ │ ├── batchCode.tmpl │ │ │ │ ├── copyfromCopy.tmpl │ │ │ │ ├── dbCode.tmpl │ │ │ │ ├── interfaceCode.tmpl │ │ │ │ └── queryCode.tmpl │ │ │ ├── stdlib/ │ │ │ │ ├── dbCode.tmpl │ │ │ │ ├── interfaceCode.tmpl │ │ │ │ └── queryCode.tmpl │ │ │ └── template.tmpl │ │ ├── json/ │ │ │ ├── gen.go │ │ │ └── opts.go │ │ └── sdk/ │ │ ├── sdk.go │ │ ├── utils.go │ │ └── utils_test.go │ ├── compiler/ │ │ ├── analyze.go │ │ ├── compat.go │ │ ├── compile.go │ │ ├── engine.go │ │ ├── expand.go │ │ ├── find_params.go │ │ ├── output_columns.go │ │ ├── parse.go │ │ ├── query.go │ │ ├── query_catalog.go │ │ ├── resolve.go │ │ ├── result.go │ │ ├── selector.go │ │ ├── selector_test.go │ │ └── to_column.go │ ├── config/ │ │ ├── config.go │ │ ├── config_test.go │ │ ├── convert/ │ │ │ ├── convert.go │ │ │ └── convert_test.go │ │ ├── env.go │ │ ├── v_one.go │ │ ├── v_one.json │ │ ├── v_two.go │ │ ├── v_two.json │ │ └── validate.go │ ├── constants/ │ │ └── query.go │ ├── dbmanager/ │ │ └── client.go │ ├── debug/ │ │ └── dump.go │ ├── endtoend/ │ │ ├── CLAUDE.md │ │ ├── case_test.go │ │ ├── ddl_test.go │ │ ├── endtoend_test.go │ │ ├── fmt_test.go │ │ ├── json_schema_test.go │ │ ├── testdata/ │ │ │ ├── accurate_cte/ │ │ │ │ └── postgresql/ │ │ │ │ └── stdlib/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── accurate_enum/ │ │ │ │ └── postgresql/ │ │ │ │ └── stdlib/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── accurate_sqlite/ │ │ │ │ └── sqlite/ │ │ │ │ └── stdlib/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── accurate_star_expansion/ │ │ │ │ └── postgresql/ │ │ │ │ └── stdlib/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── alias/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── any/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── array_in/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── array_text/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── array_text_join/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── bad_config/ │ │ │ │ └── engine/ │ │ │ │ ├── query.sql │ │ │ │ ├── sqlc.yaml │ │ │ │ └── stderr.txt │ │ │ ├── batch/ │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── v4/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── batch.go │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v5/ │ │ │ │ ├── go/ │ │ │ │ │ ├── batch.go │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── batch_imports/ │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── v4/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── batch.go │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v5/ │ │ │ │ ├── go/ │ │ │ │ │ ├── batch.go │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── batch_parameter_limit/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── go/ │ │ │ │ │ ├── batch.go │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── batch_parameter_type/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── batch.go │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── between_args/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── bit_string/ │ │ │ │ └── pgx/ │ │ │ │ ├── v4/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v5/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── build_tags/ │ │ │ │ └── postgresql/ │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ ├── querier.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── builtins/ │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── aggfunc.sql.go │ │ │ │ │ ├── db.go │ │ │ │ │ ├── mathfunc.sql.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── scalarfunc.sql.go │ │ │ │ ├── queries/ │ │ │ │ │ ├── aggfunc.sql │ │ │ │ │ ├── mathfunc.sql │ │ │ │ │ └── scalarfunc.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── case_named_params/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── case_sensitive/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── case_stmt_bool/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── case_text/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── case_value_param/ │ │ │ │ ├── issue.md │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.yaml │ │ │ │ └── postgresql/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── cast_coalesce/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── cast_null/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── cast_param/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── cid_oid_tid_xid/ │ │ │ │ └── pgx/ │ │ │ │ ├── v4/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v5/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── citext/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── coalesce/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── coalesce_as/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pganalyze/ │ │ │ │ │ │ ├── exec.json │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── exec.json │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── exec.json │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── coalesce_join/ │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── coalesce_params/ │ │ │ │ ├── issue.md │ │ │ │ └── mysql/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── codegen_json/ │ │ │ │ ├── exec.json │ │ │ │ ├── gen/ │ │ │ │ │ └── codegen.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── query.sql │ │ │ │ │ └── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── codegen_struct_field_names/ │ │ │ │ └── stdlib/ │ │ │ │ ├── README.md │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── column_alias/ │ │ │ │ ├── issue.md │ │ │ │ └── stdlib/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── column_as/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── comment_godoc/ │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── v4/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v5/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── comment_godoc_db_argument/ │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── v4/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v5/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── comment_on/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── comment_syntax/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── comparisons/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── composite_type/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── conflicted_arg_name/ │ │ │ │ └── postgresql/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── copyfrom/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── copyfrom.go │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── v4/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── copyfrom.go │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ ├── querier.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v5/ │ │ │ │ ├── go/ │ │ │ │ │ ├── copyfrom.go │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ ├── querier.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── copyfrom_imports/ │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── v4/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── copyfrom.go │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v5/ │ │ │ │ ├── go/ │ │ │ │ │ ├── copyfrom.go │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── copyfrom_multicolumn_parameter_limit/ │ │ │ │ └── mysql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── copyfrom.go │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── copyfrom_named_params/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── go/ │ │ │ │ │ ├── copyfrom.go │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── copyfrom_singlecolumn/ │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── v4/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── copyfrom.go │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ ├── querier.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v5/ │ │ │ │ ├── go/ │ │ │ │ │ ├── copyfrom.go │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ ├── querier.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── copyfrom_singlecolumn_struct_only/ │ │ │ │ ├── issue.md │ │ │ │ └── mysql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── copyfrom.go │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── count_star/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── create_materialized_view/ │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── create_table_as/ │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── create_table_like/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── create_view/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── cte_count/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── cte_filter/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── cte_in_delete/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── cte_join_self/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── cte_left_join/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── cte_multiple_alias/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── cte_nested_with/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── cte_recursive/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── cte_recursive_employees/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── cte_recursive_star/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── cte_recursive_subquery/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── cte_recursive_union/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── cte_select_one/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── cte_update/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── cte_update_multiple/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── cte_with_in/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pganalyze/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── data_type_boolean/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── db/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── datatype/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── sql/ │ │ │ │ │ │ ├── character.sql │ │ │ │ │ │ ├── datetime.sql │ │ │ │ │ │ ├── numeric.sql │ │ │ │ │ │ └── query.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── sql/ │ │ │ │ │ │ │ ├── character.sql │ │ │ │ │ │ │ ├── datetime.sql │ │ │ │ │ │ │ ├── net-types.sql │ │ │ │ │ │ │ ├── numeric.sql │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ └── rangetypes.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── sql/ │ │ │ │ │ │ ├── character.sql │ │ │ │ │ │ ├── datetime.sql │ │ │ │ │ │ ├── net-types.sql │ │ │ │ │ │ ├── numeric.sql │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ └── rangetypes.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── sqlite/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── sql/ │ │ │ │ │ │ ├── character.sql │ │ │ │ │ │ ├── datetime.sql │ │ │ │ │ │ ├── numeric.sql │ │ │ │ │ │ └── query.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── sql/ │ │ │ │ │ ├── character.sql │ │ │ │ │ ├── datetime.sql │ │ │ │ │ ├── net-types.sql │ │ │ │ │ ├── numeric.sql │ │ │ │ │ ├── query.sql │ │ │ │ │ └── rangetypes.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_materialized_views_set_schema/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── ddl_alter_table_add_column/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_table_add_column_if_not_exists/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_table_alter_type/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_table_case_sensitivity/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_table_change_column/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_table_column_drop_not_null/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_table_drop_column/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_table_drop_column_if_exists/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_table_drop_constraint/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_table_if_exists/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_table_index/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_table_rename/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_table_rename_column/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_table_set_data_type/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_table_set_not_null/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_table_set_schema/ │ │ │ │ ├── mysql/ │ │ │ │ │ └── README.md │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_type_add_value/ │ │ │ │ ├── mysql/ │ │ │ │ │ └── README.md │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_type_rename/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_type_rename_and_update_columns/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_type_rename_value/ │ │ │ │ ├── mysql/ │ │ │ │ │ └── README.md │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_alter_type_set_schema/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_comment/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── README.md │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_create_enum/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_create_func_exists/ │ │ │ │ ├── exec.json │ │ │ │ ├── mysql/ │ │ │ │ │ └── README.md │ │ │ │ ├── query.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── ddl_create_function/ │ │ │ │ ├── mysql/ │ │ │ │ │ └── README.md │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_create_function_args/ │ │ │ │ ├── mysql/ │ │ │ │ │ └── README.md │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_create_function_return/ │ │ │ │ ├── mysql/ │ │ │ │ │ └── README.md │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_create_function_types/ │ │ │ │ ├── mysql/ │ │ │ │ │ └── README.md │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_create_procedure/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_create_table/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_create_table_include/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_create_table_inherits/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_create_table_invalid_inherits/ │ │ │ │ └── postgresql/ │ │ │ │ └── stdlib/ │ │ │ │ ├── exec.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── ddl_create_table_like/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── ddl_create_table_partition/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_create_table_reserved/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_create_table_strict/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_create_table_unknown_type/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.yaml │ │ │ │ └── stderr.txt │ │ │ ├── ddl_create_table_without_rowid/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_create_trigger/ │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_drop_function/ │ │ │ │ ├── mysql/ │ │ │ │ │ └── README.md │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_drop_function_args/ │ │ │ │ ├── mysql/ │ │ │ │ │ └── README.md │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_drop_function_if_exists/ │ │ │ │ ├── mysql/ │ │ │ │ │ └── README.md │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_drop_schema/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_drop_schema_if_exists/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_drop_table/ │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_drop_table_if_exists/ │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_drop_table_in_schema/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_drop_type/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_drop_type_if_exists/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_drop_type_in_schema/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_generated_columns/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_materialized_views_invalid/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.yaml │ │ │ │ └── stderr.txt │ │ │ ├── ddl_pg_temp/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ddl_rename_drop_materialized_views/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── v4/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.yaml │ │ │ │ └── v5/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── delete_from/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── delete_inner_join/ │ │ │ │ └── mysql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── delete_join/ │ │ │ │ └── mysql/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── delete_using/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── diff_no_output/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── diff_output/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── do/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── db/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── pq/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── duplicate_go_names/ │ │ │ │ ├── enum/ │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.yaml │ │ │ │ │ └── stderr.txt │ │ │ │ ├── null_enum/ │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.yaml │ │ │ │ │ └── stderr.txt │ │ │ │ └── query_constant/ │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.yaml │ │ │ │ └── stderr.txt │ │ │ ├── emit_db_and_json_tags/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── emit_db_tags/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── emit_empty_slices/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── emit_enum_valid_and_values/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── emit_exported_queries/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── emit_methods_with_db_argument/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── emit_pointers_for_null_types/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── sql/ │ │ │ │ │ │ │ ├── character.sql │ │ │ │ │ │ │ ├── datetime.sql │ │ │ │ │ │ │ ├── net-types.sql │ │ │ │ │ │ │ ├── numeric.sql │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ └── rangetypes.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── sql/ │ │ │ │ │ │ ├── character.sql │ │ │ │ │ │ ├── datetime.sql │ │ │ │ │ │ ├── net-types.sql │ │ │ │ │ │ ├── numeric.sql │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ └── rangetypes.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── sqlite/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── sql/ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ └── types.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── sql/ │ │ │ │ │ ├── character.sql │ │ │ │ │ ├── datetime.sql │ │ │ │ │ ├── net-types.sql │ │ │ │ │ ├── numeric.sql │ │ │ │ │ ├── query.sql │ │ │ │ │ └── rangetypes.sql │ │ │ │ └── sqlc.json │ │ │ ├── emit_result_and_params_struct_pointers/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ ├── querier.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── v4/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── batch.go │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v5/ │ │ │ │ ├── go/ │ │ │ │ │ ├── batch.go │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── emit_sql_as_comment/ │ │ │ │ └── stdlib/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── enum/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── enum_column/ │ │ │ │ ├── issue.md │ │ │ │ └── mysql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── enum_ordering/ │ │ │ │ └── postgresql/ │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ ├── querier.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── exec_create_table/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── db/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── mysql.query.sql.go │ │ │ │ │ ├── mysql.query.sql │ │ │ │ │ ├── mysql.schema.sql │ │ │ │ │ └── sqlc.yaml │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── db/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── postgresql.query.sql.go │ │ │ │ │ ├── postgresql.query.sql │ │ │ │ │ ├── postgresql.schema.sql │ │ │ │ │ └── sqlc.yaml │ │ │ │ └── sqlite/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── sqlite.query.sql.go │ │ │ │ ├── sqlc.yaml │ │ │ │ ├── sqlite.query.sql │ │ │ │ └── sqlite.schema.sql │ │ │ ├── exec_imports/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ ├── querier.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ ├── querier.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ ├── querier.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── exec_lastid/ │ │ │ │ └── go_postgresql_stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ ├── querier.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── exec_no_return_struct/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── exec_result/ │ │ │ │ ├── go_postgresql_pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ ├── querier.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ ├── querier.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── go_postgresql_stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ ├── querier.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── exec_rows/ │ │ │ │ ├── go_postgresql_pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ ├── querier.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ ├── querier.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── go_postgresql_stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ ├── querier.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── full_outer_join/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── func_aggregate/ │ │ │ │ ├── pganalyze/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── func_args/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── func_args_typecast/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── func_call_cast/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── func_match_types/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── func_out_param/ │ │ │ │ ├── issue.md │ │ │ │ └── pgx/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── func_return_date/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pganalyze/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── pgx/ │ │ │ │ │ └── v5/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── func_return_record/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── func_return_series/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── func_return_table/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── func_return_table_columns/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── func_star_expansion/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── func_variadic/ │ │ │ │ └── postgresql/ │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── geometric/ │ │ │ │ └── pgx/ │ │ │ │ ├── v4/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v5/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── golang_initialisms_empty/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── golang_initialisms_url/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── golang_invalid_sql_driver/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── golang_invalid_sql_package/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── having/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── hstore/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── hstore.sql.go │ │ │ │ │ │ │ └── models.go │ │ │ │ │ │ ├── hstore.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── hstore.sql.go │ │ │ │ │ │ └── models.go │ │ │ │ │ ├── hstore.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── hstore.sql.go │ │ │ │ │ └── models.go │ │ │ │ ├── hstore.sql │ │ │ │ └── sqlc.json │ │ │ ├── identical_tables/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── identifier_case_sensitivity/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── identifier_dollar_sign/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── in_union/ │ │ │ │ └── mysql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── inflection/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── inflection_exclude_table_names/ │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── v4/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v5/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── insert_cte/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── insert_default_values/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── insert_select/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── insert_select_case/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── insert_select_invalid/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr.txt │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ ├── sqlc.json │ │ │ │ │ │ │ └── stderr/ │ │ │ │ │ │ │ ├── base.txt │ │ │ │ │ │ │ └── managed-db.txt │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ ├── sqlc.json │ │ │ │ │ │ └── stderr/ │ │ │ │ │ │ ├── base.txt │ │ │ │ │ │ └── managed-db.txt │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr/ │ │ │ │ │ ├── base.txt │ │ │ │ │ └── managed-db.txt │ │ │ │ └── sqlite/ │ │ │ │ ├── exec.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── insert_select_param/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── insert_values/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── insert_values_only/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── insert_values_public/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── interval/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── exec.json │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── invalid_func_args/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ ├── sqlc.json │ │ │ │ │ │ └── stderr/ │ │ │ │ │ │ ├── base.txt │ │ │ │ │ │ └── managed-db.txt │ │ │ │ │ └── v5/ │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr/ │ │ │ │ │ ├── base.txt │ │ │ │ │ └── managed-db.txt │ │ │ │ └── stdlib/ │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr/ │ │ │ │ ├── base.txt │ │ │ │ └── managed-db.txt │ │ │ ├── invalid_group_by_reference/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr.txt │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr/ │ │ │ │ │ ├── base.txt │ │ │ │ │ └── managed-db.txt │ │ │ │ └── sqlite/ │ │ │ │ ├── exec.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── invalid_insert_unknown_column/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── exec.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── invalid_named_params/ │ │ │ │ └── mysql/ │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── invalid_params/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ ├── sqlc.json │ │ │ │ │ │ └── stderr/ │ │ │ │ │ │ ├── base.txt │ │ │ │ │ │ └── managed-db.txt │ │ │ │ │ └── v5/ │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr/ │ │ │ │ │ ├── base.txt │ │ │ │ │ └── managed-db.txt │ │ │ │ └── stdlib/ │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr/ │ │ │ │ ├── base.txt │ │ │ │ └── managed-db.txt │ │ │ ├── invalid_params_type_mismatch/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── invalid_queries_bar/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ ├── sqlc.json │ │ │ │ │ │ └── stderr/ │ │ │ │ │ │ ├── base.txt │ │ │ │ │ │ └── managed-db.txt │ │ │ │ │ └── v5/ │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr/ │ │ │ │ │ ├── base.txt │ │ │ │ │ └── managed-db.txt │ │ │ │ └── stdlib/ │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr/ │ │ │ │ ├── base.txt │ │ │ │ └── managed-db.txt │ │ │ ├── invalid_queries_foo/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ ├── sqlc.json │ │ │ │ │ │ └── stderr.txt │ │ │ │ │ └── v5/ │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr.txt │ │ │ │ └── stdlib/ │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── invalid_table_alias/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr.txt │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr/ │ │ │ │ │ ├── base.txt │ │ │ │ │ └── managed-db.txt │ │ │ │ └── sqlite/ │ │ │ │ ├── exec.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── invalid_update_unknown_column/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.yaml │ │ │ │ └── stderr.txt │ │ │ ├── join_alias/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── join_clauses_order/ │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── join_from/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── join_full/ │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── join_group_by_alias/ │ │ │ │ └── postgresql/ │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── join_inner/ │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── join_left/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── join_left_same_table/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgres/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── join_left_table_alias/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── join_order_by/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── join_order_by_alias/ │ │ │ │ └── postgresql/ │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── join_right/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── join_table_name/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── join_two_tables/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── join_update/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── join_using/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── join_validate_columns/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.yaml │ │ │ │ └── stderr.txt │ │ │ ├── join_where_clause/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── json/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── copyfrom.go │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── json_array_elements/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── json_build/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── json_param_type/ │ │ │ │ ├── issue.md │ │ │ │ ├── postgresql/ │ │ │ │ │ └── pgx/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.yaml │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── json_tags/ │ │ │ │ ├── camel_case/ │ │ │ │ │ └── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── pascal_case/ │ │ │ │ │ └── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── snake_case/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── json_tags_null_enum/ │ │ │ │ ├── camel_case/ │ │ │ │ │ └── postgresql/ │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── none/ │ │ │ │ │ └── postgresql/ │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── pascal_case/ │ │ │ │ │ └── postgresql/ │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── snake_case/ │ │ │ │ │ └── postgresql/ │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v2_config/ │ │ │ │ └── postgresql/ │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── jsonb/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── limit/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── exec.json │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── sqlite/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── lower/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── lower_switched_order/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── materialized_views/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── mathmatical_operator/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── min_max_date/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── missing_semicolon/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ ├── sqlc.json │ │ │ │ │ │ └── stderr.txt │ │ │ │ │ └── v5/ │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr.txt │ │ │ │ └── stdlib/ │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── mix_param_types/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── test.sql.go │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── test.sql │ │ │ │ └── postgresql/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── test.sql.go │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── test.sql │ │ │ ├── multidimension_array/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── multischema/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── sql/ │ │ │ │ │ │ │ ├── ignore.txt │ │ │ │ │ │ │ └── query.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── sql/ │ │ │ │ │ │ ├── ignore.txt │ │ │ │ │ │ └── query.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── sql/ │ │ │ │ │ ├── ignore.txt │ │ │ │ │ └── query.sql │ │ │ │ └── sqlc.json │ │ │ ├── mysql_default_value/ │ │ │ │ └── mysql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── mysql_reference_manual/ │ │ │ │ ├── README.md │ │ │ │ ├── aggregate_functions/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── group_concat.sql.go │ │ │ │ │ │ └── models.go │ │ │ │ │ └── group_concat.sql │ │ │ │ ├── date_and_time_functions/ │ │ │ │ │ ├── date_add.sql │ │ │ │ │ ├── date_sub.sql │ │ │ │ │ └── go/ │ │ │ │ │ ├── date_add.sql.go │ │ │ │ │ ├── date_sub.sql.go │ │ │ │ │ ├── db.go │ │ │ │ │ └── models.go │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── mysql_vector/ │ │ │ │ └── mysql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── named_param/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── sqlite/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── nested_select/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── nextval/ │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── notifylisten/ │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ └── v5/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── null_if_type/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ ├── pganalyzer/ │ │ │ │ │ ├── db/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── exec.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── omit_sqlc_version/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── omit_unused_structs/ │ │ │ │ └── postgresql/ │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── on_duplicate_key_update/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── db/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── operator_string_concat/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── order_by_binds/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── pganalyze/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── order_by_non_existing_column/ │ │ │ │ └── postgresql/ │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.yaml │ │ │ │ └── stderr/ │ │ │ │ ├── base.txt │ │ │ │ └── managed-db.txt │ │ │ ├── order_by_union/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── output_file_names/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── batch_gen.go │ │ │ │ │ │ │ ├── copyfrom_gen.go │ │ │ │ │ │ │ ├── db_gen.go │ │ │ │ │ │ │ ├── models_gen.go │ │ │ │ │ │ │ ├── querier_gen.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── batch_gen.go │ │ │ │ │ │ ├── copyfrom_gen.go │ │ │ │ │ │ ├── db_gen.go │ │ │ │ │ │ ├── models_gen.go │ │ │ │ │ │ ├── querier_gen.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db_gen.go │ │ │ │ │ ├── models_gen.go │ │ │ │ │ ├── querier_gen.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── output_files_suffix/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql_gen.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql_gen.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql_gen.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── overrides/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── overrides_array/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── query/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── query/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── query/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── overrides_config/ │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── v2/ │ │ │ │ └── yaml/ │ │ │ │ ├── global/ │ │ │ │ │ ├── db/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ └── sqlc.yaml │ │ │ │ ├── global_and_queryset/ │ │ │ │ │ ├── db/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ └── sqlc.yaml │ │ │ │ └── queryset/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ └── sqlc.yaml │ │ │ ├── overrides_go_struct_tags/ │ │ │ │ ├── invalid_tags/ │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr.txt │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── overrides_go_types/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── overrides_nullable/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── overrides_pointers/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── overrides_result_tag/ │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── overrides_unsigned/ │ │ │ │ └── mysql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── params_duplicate/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── params_go_keywords/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── params_in_nested_func/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── db/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.yaml │ │ │ │ └── postgresql/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── params_location/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── exec.json │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── params_placeholder_in_left_expr/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── params_two/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── pattern_in_expr/ │ │ │ │ └── mysql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── pattern_matching/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── pg_advisory_xact_lock/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── exec.sql │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── exec.sql.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── exec.sql │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── exec.sql.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── exec.sql │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── exec.sql.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── pg_dump/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── exec.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── pg_ext_ltree/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── pg_extensions/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ ├── pg_trgm.sql.go │ │ │ │ │ │ │ ├── pgcrypto.sql.go │ │ │ │ │ │ │ └── uuid_ossp.sql.go │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ ├── sql/ │ │ │ │ │ │ │ ├── pg_trgm.sql │ │ │ │ │ │ │ ├── pgcrypto.sql │ │ │ │ │ │ │ └── uuid_ossp.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ ├── pg_trgm.sql.go │ │ │ │ │ │ ├── pgcrypto.sql.go │ │ │ │ │ │ └── uuid_ossp.sql.go │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sql/ │ │ │ │ │ │ ├── pg_trgm.sql │ │ │ │ │ │ ├── pgcrypto.sql │ │ │ │ │ │ └── uuid_ossp.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ ├── pg_trgm.sql.go │ │ │ │ │ ├── pgcrypto.sql.go │ │ │ │ │ └── uuid_ossp.sql.go │ │ │ │ ├── schema.sql │ │ │ │ ├── sql/ │ │ │ │ │ ├── pg_trgm.sql │ │ │ │ │ ├── pgcrypto.sql │ │ │ │ │ └── uuid_ossp.sql │ │ │ │ └── sqlc.json │ │ │ ├── pg_generate_series/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── exec.json │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── pg_timezone_names/ │ │ │ │ ├── go_pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ └── v5/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── go_stdlib/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── pg_user_table/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── pg_vector/ │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── pointer_type_import/ │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── v4/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v5/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── prepared_queries/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── primary_key_later/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── queries.sql.go │ │ │ │ │ │ ├── queries.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── queries.sql.go │ │ │ │ │ ├── queries.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── queries.sql.go │ │ │ │ ├── queries.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── process_plugin_disabled/ │ │ │ │ ├── exec.json │ │ │ │ ├── gen/ │ │ │ │ │ └── codegen.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── process_plugin_format_json/ │ │ │ │ ├── exec.json │ │ │ │ ├── gen/ │ │ │ │ │ └── hello.txt │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── process_plugin_sqlc_gen_json/ │ │ │ │ ├── exec.json │ │ │ │ ├── gen/ │ │ │ │ │ └── codegen.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── process_plugin_sqlc_gen_test/ │ │ │ │ ├── exec.json │ │ │ │ ├── gen/ │ │ │ │ │ └── env.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── query_parameter_limit_invalid/ │ │ │ │ └── postgresql/ │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── query_parameter_limit_param_only/ │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ ├── querier.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── query_parameter_limit_to_two/ │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── query_parameter_limit_to_zero/ │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ ├── querier.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── quoted_colname/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── quoted_names_complex/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── quoted_tablename/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── ranges/ │ │ │ │ └── pgx/ │ │ │ │ └── v5/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── refreshmatview/ │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── v4/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v5/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── relation_does_not_exist/ │ │ │ │ └── postgresql/ │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr/ │ │ │ │ ├── base.txt │ │ │ │ └── managed-db.txt │ │ │ ├── rename/ │ │ │ │ ├── v1/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── v2/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── returning/ │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── schema_scoped_create/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── schema_scoped_delete/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── schema_scoped_enum/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── schema_scoped_filter/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── schema_scoped_list/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── schema_scoped_update/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── schema_table_column_ref/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── select_column_cast/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── select_cte/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── select_distinct/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── select_empty_column_list/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr.txt │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── select_exists/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── sqlite/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── select_in_and/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── select_limit/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── exec.json │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── exec.json │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── select_nested_count/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── select_not_exists/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── sqlite/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── select_sequence/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── select_star/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── select_star_quoted/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── select_subquery/ │ │ │ │ └── postgresql/ │ │ │ │ ├── issue.md │ │ │ │ └── stdlib/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── select_subquery_alias/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── select_subquery_no_alias/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.yaml │ │ │ │ ├── postgres/ │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.yaml │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── select_system/ │ │ │ │ ├── issue.md │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── select_text_array/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── select_union/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgres/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── exec.json │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── exec.json │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── select_union_subquery/ │ │ │ │ ├── issue.md │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.yaml │ │ │ │ └── postgresql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── selectstatic/ │ │ │ │ └── mysql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── show_warnings/ │ │ │ │ └── mysql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── single_param_conflict/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── sql_syntax_calling_funcs/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── sqlc_arg/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── sqlc_arg_invalid/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr.txt │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr.txt │ │ │ │ └── sqlite/ │ │ │ │ ├── query.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── sqlc_embed/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── sqlc_narg/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── go_strict/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── sqlc_slice/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── sqlc_slice_prepared/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── sqlite_skip_todo/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── sqlite_table_options/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── star_expansion/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── star_expansion_cte/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── star_expansion_failed/ │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.yaml │ │ │ │ └── stderr.txt │ │ │ ├── star_expansion_from_cte/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── star_expansion_join/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── star_expansion_reserved/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── star_expansion_series/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── star_expansion_subquery/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── strict_function_checks/ │ │ │ │ └── postgresql/ │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr/ │ │ │ │ ├── base.txt │ │ │ │ └── managed-db.txt │ │ │ ├── subquery_calculated_column/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── sum_type/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── syntax_errors/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── query/ │ │ │ │ │ │ ├── from.sql │ │ │ │ │ │ ├── select.sql │ │ │ │ │ │ └── typo.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr.txt │ │ │ │ └── postgresql/ │ │ │ │ ├── query/ │ │ │ │ │ ├── from.sql │ │ │ │ │ ├── select.sql │ │ │ │ │ └── typo.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ └── stderr.txt │ │ │ ├── table_function/ │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── table_name_case_sensitivity/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── truncate/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── types_uuid/ │ │ │ │ └── postgresql/ │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── unknown_func/ │ │ │ │ ├── pganalyze/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ ├── sqlc.json │ │ │ │ │ └── stderr.txt │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── exec.json │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── unnest/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ ├── querier.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ ├── querier.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ ├── querier.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── unnest_star/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── unnest_with_ordinality/ │ │ │ │ └── postgresql/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ ├── querier.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ ├── querier.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ ├── querier.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── unsigned_params/ │ │ │ │ └── mysql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── untyped_columns/ │ │ │ │ └── sqlite/ │ │ │ │ └── stdlib/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── update_array_index/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── update_cte/ │ │ │ │ ├── pgx/ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── v5/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── stdlib/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── update_inner_join/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── update_join/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── db/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── update_set/ │ │ │ │ ├── myql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── update_set_multiple/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── v4/ │ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ │ └── v5/ │ │ │ │ │ │ ├── go/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.json │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── update_set_on_conflict/ │ │ │ │ ├── issue.md │ │ │ │ └── postgresql/ │ │ │ │ └── pgx/ │ │ │ │ ├── exec.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.yaml │ │ │ │ └── stderr.txt │ │ │ ├── update_two_table/ │ │ │ │ └── mysql/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── upsert/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── valid_group_by_reference/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ ├── pganalyzer/ │ │ │ │ │ ├── exec.json │ │ │ │ │ ├── go/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.json │ │ │ │ └── postgresql/ │ │ │ │ ├── exec.json │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── vet_disable/ │ │ │ │ ├── exec.json │ │ │ │ ├── query.sql │ │ │ │ ├── sqlc.yaml │ │ │ │ └── stderr.txt │ │ │ ├── vet_explain/ │ │ │ │ └── mysql/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── vet_failures/ │ │ │ │ ├── exec.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.yaml │ │ │ │ └── stderr.txt │ │ │ ├── virtual_table/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ ├── wasm_plugin_sqlc_gen_greeter/ │ │ │ │ ├── gen/ │ │ │ │ │ └── hello.txt │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── wasm_plugin_sqlc_gen_test/ │ │ │ │ ├── gen/ │ │ │ │ │ └── env.json │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── wasm_plugin_sqlc_gen_unsafe_paths/ │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ ├── sqlc.json │ │ │ │ ├── stderr.txt │ │ │ │ └── stderr_windows.txt │ │ │ ├── where_collate/ │ │ │ │ └── sqlite/ │ │ │ │ ├── go/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.json │ │ │ ├── wrap_errors/ │ │ │ │ ├── mysql/ │ │ │ │ │ ├── db/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.yaml │ │ │ │ ├── postgresql/ │ │ │ │ │ ├── pgx/ │ │ │ │ │ │ ├── db/ │ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ │ ├── query.sql │ │ │ │ │ │ ├── schema.sql │ │ │ │ │ │ └── sqlc.yaml │ │ │ │ │ └── stdlib/ │ │ │ │ │ ├── db/ │ │ │ │ │ │ ├── db.go │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ └── query.sql.go │ │ │ │ │ ├── query.sql │ │ │ │ │ ├── schema.sql │ │ │ │ │ └── sqlc.yaml │ │ │ │ └── sqlite/ │ │ │ │ ├── db/ │ │ │ │ │ ├── db.go │ │ │ │ │ ├── models.go │ │ │ │ │ └── query.sql.go │ │ │ │ ├── query.sql │ │ │ │ ├── schema.sql │ │ │ │ └── sqlc.yaml │ │ │ └── yaml_overrides/ │ │ │ ├── go/ │ │ │ │ ├── db.go │ │ │ │ ├── models.go │ │ │ │ └── query.sql.go │ │ │ ├── sql/ │ │ │ │ ├── query.sql │ │ │ │ └── schema.sql │ │ │ └── sqlc.yaml │ │ └── vet_test.go │ ├── engine/ │ │ ├── clickhouse/ │ │ │ ├── catalog.go │ │ │ ├── convert.go │ │ │ ├── format.go │ │ │ ├── parse.go │ │ │ ├── reserved.go │ │ │ ├── stdlib.go │ │ │ └── utils.go │ │ ├── dolphin/ │ │ │ ├── CLAUDE.md │ │ │ ├── catalog.go │ │ │ ├── convert.go │ │ │ ├── format.go │ │ │ ├── parse.go │ │ │ ├── reserved.go │ │ │ ├── stdlib.go │ │ │ └── utils.go │ │ ├── postgresql/ │ │ │ ├── analyzer/ │ │ │ │ └── analyze.go │ │ │ ├── catalog.go │ │ │ ├── catalog_test.go │ │ │ ├── contrib/ │ │ │ │ ├── adminpack.go │ │ │ │ ├── amcheck.go │ │ │ │ ├── btree_gin.go │ │ │ │ ├── btree_gist.go │ │ │ │ ├── citext.go │ │ │ │ ├── cube.go │ │ │ │ ├── dblink.go │ │ │ │ ├── earthdistance.go │ │ │ │ ├── file_fdw.go │ │ │ │ ├── fuzzystrmatch.go │ │ │ │ ├── hstore.go │ │ │ │ ├── intagg.go │ │ │ │ ├── intarray.go │ │ │ │ ├── isn.go │ │ │ │ ├── lo.go │ │ │ │ ├── ltree.go │ │ │ │ ├── pageinspect.go │ │ │ │ ├── pg_buffercache.go │ │ │ │ ├── pg_freespacemap.go │ │ │ │ ├── pg_prewarm.go │ │ │ │ ├── pg_stat_statements.go │ │ │ │ ├── pg_trgm.go │ │ │ │ ├── pg_visibility.go │ │ │ │ ├── pgcrypto.go │ │ │ │ ├── pgrowlocks.go │ │ │ │ ├── pgstattuple.go │ │ │ │ ├── postgres_fdw.go │ │ │ │ ├── seg.go │ │ │ │ ├── sslinfo.go │ │ │ │ ├── tablefunc.go │ │ │ │ ├── tcn.go │ │ │ │ ├── unaccent.go │ │ │ │ ├── uuid_ossp.go │ │ │ │ └── xml2.go │ │ │ ├── convert.go │ │ │ ├── extension.go │ │ │ ├── information_schema.go │ │ │ ├── parse.go │ │ │ ├── parse_default.go │ │ │ ├── parse_wasi.go │ │ │ ├── parser/ │ │ │ │ ├── parser_default.go │ │ │ │ └── parser_wasi.go │ │ │ ├── pg_catalog.go │ │ │ ├── pg_temp.go │ │ │ ├── reserved.go │ │ │ ├── rewrite_test.go │ │ │ └── utils.go │ │ └── sqlite/ │ │ ├── analyzer/ │ │ │ ├── analyze.go │ │ │ └── analyze_test.go │ │ ├── catalog.go │ │ ├── catalog_test.go │ │ ├── convert.go │ │ ├── format.go │ │ ├── parse.go │ │ ├── parser/ │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── SQLiteLexer.g4 │ │ │ ├── SQLiteLexer.interp │ │ │ ├── SQLiteLexer.tokens │ │ │ ├── SQLiteParser.g4 │ │ │ ├── SQLiteParser.interp │ │ │ ├── SQLiteParser.tokens │ │ │ ├── sqlite_lexer.go │ │ │ ├── sqlite_parser.go │ │ │ ├── sqliteparser_base_listener.go │ │ │ └── sqliteparser_listener.go │ │ ├── reserved.go │ │ ├── stdlib.go │ │ └── utils.go │ ├── ext/ │ │ ├── handler.go │ │ ├── process/ │ │ │ └── gen.go │ │ └── wasm/ │ │ ├── runner.go │ │ └── wasm.go │ ├── inflection/ │ │ └── singular.go │ ├── info/ │ │ └── facts.go │ ├── metadata/ │ │ ├── meta.go │ │ └── meta_test.go │ ├── migrations/ │ │ ├── migrations.go │ │ └── migrations_test.go │ ├── multierr/ │ │ └── error.go │ ├── opts/ │ │ ├── debug.go │ │ ├── experiment.go │ │ ├── experiment_test.go │ │ └── parser.go │ ├── pattern/ │ │ └── match.go │ ├── pgx/ │ │ └── poolcache/ │ │ └── poolcache.go │ ├── plugin/ │ │ ├── codegen.pb.go │ │ └── codegen_grpc.pb.go │ ├── quickdb/ │ │ ├── mysql.go │ │ ├── rpc.go │ │ └── v1/ │ │ ├── quickdb.pb.go │ │ └── quickdb_grpc.pb.go │ ├── remote/ │ │ ├── gen.pb.go │ │ ├── gen.proto │ │ ├── gen_grpc.pb.go │ │ └── rpc.go │ ├── rpc/ │ │ ├── errors.go │ │ └── interceptor.go │ ├── shfmt/ │ │ ├── shfmt.go │ │ └── shfmt_test.go │ ├── source/ │ │ ├── code.go │ │ └── mutate_test.go │ ├── sql/ │ │ ├── ast/ │ │ │ ├── CLAUDE.md │ │ │ ├── a_array_expr.go │ │ │ ├── a_const.go │ │ │ ├── a_expr.go │ │ │ ├── a_expr_kind.go │ │ │ ├── a_indices.go │ │ │ ├── a_indirection.go │ │ │ ├── a_star.go │ │ │ ├── access_priv.go │ │ │ ├── agg_split.go │ │ │ ├── agg_strategy.go │ │ │ ├── aggref.go │ │ │ ├── alias.go │ │ │ ├── alter_collation_stmt.go │ │ │ ├── alter_database_set_stmt.go │ │ │ ├── alter_database_stmt.go │ │ │ ├── alter_default_privileges_stmt.go │ │ │ ├── alter_domain_stmt.go │ │ │ ├── alter_enum_stmt.go │ │ │ ├── alter_event_trig_stmt.go │ │ │ ├── alter_extension_contents_stmt.go │ │ │ ├── alter_extension_stmt.go │ │ │ ├── alter_fdw_stmt.go │ │ │ ├── alter_foreign_server_stmt.go │ │ │ ├── alter_function_stmt.go │ │ │ ├── alter_object_depends_stmt.go │ │ │ ├── alter_object_schema_stmt.go │ │ │ ├── alter_op_family_stmt.go │ │ │ ├── alter_operator_stmt.go │ │ │ ├── alter_owner_stmt.go │ │ │ ├── alter_policy_stmt.go │ │ │ ├── alter_publication_stmt.go │ │ │ ├── alter_role_set_stmt.go │ │ │ ├── alter_role_stmt.go │ │ │ ├── alter_seq_stmt.go │ │ │ ├── alter_subscription_stmt.go │ │ │ ├── alter_subscription_type.go │ │ │ ├── alter_system_stmt.go │ │ │ ├── alter_table_cmd.go │ │ │ ├── alter_table_move_all_stmt.go │ │ │ ├── alter_table_set_schema_stmt.go │ │ │ ├── alter_table_space_options_stmt.go │ │ │ ├── alter_table_stmt.go │ │ │ ├── alter_table_type.go │ │ │ ├── alter_ts_config_type.go │ │ │ ├── alter_ts_configuration_stmt.go │ │ │ ├── alter_ts_dictionary_stmt.go │ │ │ ├── alter_type_add_value_stmt.go │ │ │ ├── alter_type_rename_value_stmt.go │ │ │ ├── alter_type_set_schema_stmt.go │ │ │ ├── alter_user_mapping_stmt.go │ │ │ ├── alternative_sub_plan.go │ │ │ ├── array_coerce_expr.go │ │ │ ├── array_expr.go │ │ │ ├── array_ref.go │ │ │ ├── between_expr.go │ │ │ ├── bit_string.go │ │ │ ├── block_id_data.go │ │ │ ├── bool_expr.go │ │ │ ├── bool_expr_type.go │ │ │ ├── bool_test_type.go │ │ │ ├── boolean.go │ │ │ ├── boolean_test_expr.go │ │ │ ├── call_stmt.go │ │ │ ├── case_expr.go │ │ │ ├── case_test_expr.go │ │ │ ├── case_when.go │ │ │ ├── check_point_stmt.go │ │ │ ├── close_portal_stmt.go │ │ │ ├── cluster_stmt.go │ │ │ ├── cmd_type.go │ │ │ ├── coalesce_expr.go │ │ │ ├── coerce_to_domain.go │ │ │ ├── coerce_to_domain_value.go │ │ │ ├── coerce_via_io.go │ │ │ ├── coercion_context.go │ │ │ ├── coercion_form.go │ │ │ ├── collate_clause.go │ │ │ ├── collate_expr.go │ │ │ ├── column_def.go │ │ │ ├── column_ref.go │ │ │ ├── comment_on_column_stmt.go │ │ │ ├── comment_on_schema_stmt.go │ │ │ ├── comment_on_table_stmt.go │ │ │ ├── comment_on_type_stmt.go │ │ │ ├── comment_on_view_stmt.go │ │ │ ├── comment_stmt.go │ │ │ ├── common_table_expr.go │ │ │ ├── composite_type_stmt.go │ │ │ ├── const.go │ │ │ ├── constr_type.go │ │ │ ├── constraint.go │ │ │ ├── constraints_set_stmt.go │ │ │ ├── convert_rowtype_expr.go │ │ │ ├── copy_stmt.go │ │ │ ├── create_am_stmt.go │ │ │ ├── create_cast_stmt.go │ │ │ ├── create_conversion_stmt.go │ │ │ ├── create_domain_stmt.go │ │ │ ├── create_enum_stmt.go │ │ │ ├── create_event_trig_stmt.go │ │ │ ├── create_extension_stmt.go │ │ │ ├── create_fdw_stmt.go │ │ │ ├── create_foreign_server_stmt.go │ │ │ ├── create_foreign_table_stmt.go │ │ │ ├── create_function_stmt.go │ │ │ ├── create_op_class_item.go │ │ │ ├── create_op_class_stmt.go │ │ │ ├── create_op_family_stmt.go │ │ │ ├── create_p_lang_stmt.go │ │ │ ├── create_policy_stmt.go │ │ │ ├── create_publication_stmt.go │ │ │ ├── create_range_stmt.go │ │ │ ├── create_role_stmt.go │ │ │ ├── create_schema_stmt.go │ │ │ ├── create_seq_stmt.go │ │ │ ├── create_stats_stmt.go │ │ │ ├── create_stmt.go │ │ │ ├── create_subscription_stmt.go │ │ │ ├── create_table_as_stmt.go │ │ │ ├── create_table_space_stmt.go │ │ │ ├── create_table_stmt.go │ │ │ ├── create_transform_stmt.go │ │ │ ├── create_trig_stmt.go │ │ │ ├── create_user_mapping_stmt.go │ │ │ ├── createdb_stmt.go │ │ │ ├── current_of_expr.go │ │ │ ├── deallocate_stmt.go │ │ │ ├── declare_cursor_stmt.go │ │ │ ├── def_elem.go │ │ │ ├── def_elem_action.go │ │ │ ├── define_stmt.go │ │ │ ├── delete_stmt.go │ │ │ ├── discard_mode.go │ │ │ ├── discard_stmt.go │ │ │ ├── do_stmt.go │ │ │ ├── drop_behavior.go │ │ │ ├── drop_function_stmt.go │ │ │ ├── drop_owned_stmt.go │ │ │ ├── drop_role_stmt.go │ │ │ ├── drop_schema_stmt.go │ │ │ ├── drop_stmt.go │ │ │ ├── drop_subscription_stmt.go │ │ │ ├── drop_table_space_stmt.go │ │ │ ├── drop_table_stmt.go │ │ │ ├── drop_type_stmt.go │ │ │ ├── drop_user_mapping_stmt.go │ │ │ ├── dropdb_stmt.go │ │ │ ├── execute_stmt.go │ │ │ ├── explain_stmt.go │ │ │ ├── expr.go │ │ │ ├── fetch_direction.go │ │ │ ├── fetch_stmt.go │ │ │ ├── field_select.go │ │ │ ├── field_store.go │ │ │ ├── float.go │ │ │ ├── from_expr.go │ │ │ ├── func_call.go │ │ │ ├── func_expr.go │ │ │ ├── func_name.go │ │ │ ├── func_param.go │ │ │ ├── func_spec.go │ │ │ ├── function_parameter.go │ │ │ ├── function_parameter_mode.go │ │ │ ├── grant_object_type.go │ │ │ ├── grant_role_stmt.go │ │ │ ├── grant_stmt.go │ │ │ ├── grant_target_type.go │ │ │ ├── grouping_func.go │ │ │ ├── grouping_set.go │ │ │ ├── grouping_set_kind.go │ │ │ ├── import_foreign_schema_stmt.go │ │ │ ├── import_foreign_schema_type.go │ │ │ ├── in.go │ │ │ ├── index_elem.go │ │ │ ├── index_stmt.go │ │ │ ├── infer_clause.go │ │ │ ├── inference_elem.go │ │ │ ├── inline_code_block.go │ │ │ ├── insert_stmt.go │ │ │ ├── integer.go │ │ │ ├── interval_expr.go │ │ │ ├── into_clause.go │ │ │ ├── join_expr.go │ │ │ ├── join_type.go │ │ │ ├── list.go │ │ │ ├── listen_stmt.go │ │ │ ├── load_stmt.go │ │ │ ├── lock_clause_strength.go │ │ │ ├── lock_stmt.go │ │ │ ├── lock_wait_policy.go │ │ │ ├── locking_clause.go │ │ │ ├── min_max_expr.go │ │ │ ├── min_max_op.go │ │ │ ├── multi_assign_ref.go │ │ │ ├── named_arg_expr.go │ │ │ ├── next_value_expr.go │ │ │ ├── node.go │ │ │ ├── notify_stmt.go │ │ │ ├── null.go │ │ │ ├── null_test_expr.go │ │ │ ├── null_test_type.go │ │ │ ├── object_type.go │ │ │ ├── object_with_args.go │ │ │ ├── on_commit_action.go │ │ │ ├── on_conflict_action.go │ │ │ ├── on_conflict_clause.go │ │ │ ├── on_conflict_expr.go │ │ │ ├── on_duplicate_key_update.go │ │ │ ├── op_expr.go │ │ │ ├── overriding_kind.go │ │ │ ├── param.go │ │ │ ├── param_exec_data.go │ │ │ ├── param_extern_data.go │ │ │ ├── param_kind.go │ │ │ ├── param_list_info_data.go │ │ │ ├── param_ref.go │ │ │ ├── paren_expr.go │ │ │ ├── partition_bound_spec.go │ │ │ ├── partition_cmd.go │ │ │ ├── partition_elem.go │ │ │ ├── partition_range_datum.go │ │ │ ├── partition_range_datum_kind.go │ │ │ ├── partition_spec.go │ │ │ ├── prepare_stmt.go │ │ │ ├── print.go │ │ │ ├── query.go │ │ │ ├── query_source.go │ │ │ ├── range_function.go │ │ │ ├── range_subselect.go │ │ │ ├── range_table_func.go │ │ │ ├── range_table_func_col.go │ │ │ ├── range_table_sample.go │ │ │ ├── range_tbl_entry.go │ │ │ ├── range_tbl_function.go │ │ │ ├── range_tbl_ref.go │ │ │ ├── range_var.go │ │ │ ├── raw_stmt.go │ │ │ ├── reassign_owned_stmt.go │ │ │ ├── refresh_mat_view_stmt.go │ │ │ ├── reindex_object_type.go │ │ │ ├── reindex_stmt.go │ │ │ ├── relabel_type.go │ │ │ ├── rename_column_stmt.go │ │ │ ├── rename_stmt.go │ │ │ ├── rename_table_stmt.go │ │ │ ├── rename_type_stmt.go │ │ │ ├── replica_identity_stmt.go │ │ │ ├── res_target.go │ │ │ ├── role_spec.go │ │ │ ├── role_spec_type.go │ │ │ ├── role_stmt_type.go │ │ │ ├── row_compare_expr.go │ │ │ ├── row_compare_type.go │ │ │ ├── row_expr.go │ │ │ ├── row_mark_clause.go │ │ │ ├── rte_kind.go │ │ │ ├── rule_stmt.go │ │ │ ├── scalar_array_op_expr.go │ │ │ ├── scan_direction.go │ │ │ ├── sec_label_stmt.go │ │ │ ├── select_stmt.go │ │ │ ├── set_op_cmd.go │ │ │ ├── set_op_strategy.go │ │ │ ├── set_operation.go │ │ │ ├── set_operation_stmt.go │ │ │ ├── set_to_default.go │ │ │ ├── sort_by.go │ │ │ ├── sort_by_dir.go │ │ │ ├── sort_by_nulls.go │ │ │ ├── sort_group_clause.go │ │ │ ├── sql_value_function.go │ │ │ ├── sql_value_function_op.go │ │ │ ├── statement.go │ │ │ ├── string.go │ │ │ ├── sub_link.go │ │ │ ├── sub_plan.go │ │ │ ├── table_func.go │ │ │ ├── table_like_clause.go │ │ │ ├── table_like_option.go │ │ │ ├── table_name.go │ │ │ ├── table_sample_clause.go │ │ │ ├── target_entry.go │ │ │ ├── todo.go │ │ │ ├── transaction_stmt.go │ │ │ ├── transaction_stmt_kind.go │ │ │ ├── trigger_transition.go │ │ │ ├── truncate_stmt.go │ │ │ ├── type_cast.go │ │ │ ├── type_name.go │ │ │ ├── typedefs.go │ │ │ ├── unlisten_stmt.go │ │ │ ├── update_stmt.go │ │ │ ├── vacuum_option.go │ │ │ ├── vacuum_stmt.go │ │ │ ├── var.go │ │ │ ├── variable_expr.go │ │ │ ├── variable_set_kind.go │ │ │ ├── variable_set_stmt.go │ │ │ ├── variable_show_stmt.go │ │ │ ├── view_check_option.go │ │ │ ├── view_stmt.go │ │ │ ├── wco_kind.go │ │ │ ├── window_clause.go │ │ │ ├── window_def.go │ │ │ ├── window_func.go │ │ │ ├── with_check_option.go │ │ │ ├── with_clause.go │ │ │ ├── xml_expr.go │ │ │ ├── xml_expr_op.go │ │ │ ├── xml_option_type.go │ │ │ └── xml_serialize.go │ │ ├── astutils/ │ │ │ ├── CLAUDE.md │ │ │ ├── join.go │ │ │ ├── rewrite.go │ │ │ ├── search.go │ │ │ └── walk.go │ │ ├── catalog/ │ │ │ ├── catalog.go │ │ │ ├── comment_on.go │ │ │ ├── extension.go │ │ │ ├── func.go │ │ │ ├── public.go │ │ │ ├── schema.go │ │ │ ├── table.go │ │ │ ├── types.go │ │ │ └── view.go │ │ ├── format/ │ │ │ └── format.go │ │ ├── info/ │ │ │ └── info.go │ │ ├── lang/ │ │ │ └── operator.go │ │ ├── named/ │ │ │ ├── CLAUDE.md │ │ │ ├── is.go │ │ │ ├── param.go │ │ │ ├── param_set.go │ │ │ ├── param_set_test.go │ │ │ └── param_test.go │ │ ├── rewrite/ │ │ │ ├── CLAUDE.md │ │ │ ├── embeds.go │ │ │ └── parameters.go │ │ ├── sqlerr/ │ │ │ └── errors.go │ │ ├── sqlfile/ │ │ │ ├── split.go │ │ │ ├── split_test.go │ │ │ └── testdata/ │ │ │ ├── complex_query/ │ │ │ │ ├── input.sql │ │ │ │ ├── output_1.sql │ │ │ │ ├── output_2.sql │ │ │ │ └── output_3.sql │ │ │ ├── dollar_quote_with_newlines/ │ │ │ │ ├── input.sql │ │ │ │ └── output_1.sql │ │ │ ├── dollar_quoted_function/ │ │ │ │ ├── input.sql │ │ │ │ └── output_1.sql │ │ │ ├── dollar_quoted_string/ │ │ │ │ ├── input.sql │ │ │ │ └── output_1.sql │ │ │ ├── double_quoted_identifier/ │ │ │ │ ├── input.sql │ │ │ │ └── output_1.sql │ │ │ ├── empty_input/ │ │ │ │ └── input.sql │ │ │ ├── escaped_double_quotes/ │ │ │ │ ├── input.sql │ │ │ │ └── output_1.sql │ │ │ ├── escaped_quotes/ │ │ │ │ ├── input.sql │ │ │ │ └── output_1.sql │ │ │ ├── last_query_no_semicolon/ │ │ │ │ ├── input.sql │ │ │ │ ├── output_1.sql │ │ │ │ └── output_2.sql │ │ │ ├── multi_line_comment/ │ │ │ │ ├── input.sql │ │ │ │ ├── output_1.sql │ │ │ │ └── output_2.sql │ │ │ ├── multi_line_comment_with_semicolon/ │ │ │ │ ├── input.sql │ │ │ │ ├── output_1.sql │ │ │ │ └── output_2.sql │ │ │ ├── multiple_queries/ │ │ │ │ ├── input.sql │ │ │ │ ├── output_1.sql │ │ │ │ ├── output_2.sql │ │ │ │ └── output_3.sql │ │ │ ├── nested_dollar_quotes/ │ │ │ │ ├── input.sql │ │ │ │ └── output_1.sql │ │ │ ├── no_trailing_semicolon/ │ │ │ │ ├── input.sql │ │ │ │ └── output_1.sql │ │ │ ├── only_semicolons/ │ │ │ │ └── input.sql │ │ │ ├── semicolon_in_string/ │ │ │ │ ├── input.sql │ │ │ │ └── output_1.sql │ │ │ ├── single_line_comment/ │ │ │ │ ├── input.sql │ │ │ │ ├── output_1.sql │ │ │ │ └── output_2.sql │ │ │ ├── single_line_comment_with_semicolon/ │ │ │ │ ├── input.sql │ │ │ │ ├── output_1.sql │ │ │ │ └── output_2.sql │ │ │ ├── single_query/ │ │ │ │ ├── input.sql │ │ │ │ └── output_1.sql │ │ │ ├── tagged_dollar_quoted_string/ │ │ │ │ ├── input.sql │ │ │ │ └── output_1.sql │ │ │ └── whitespace_only/ │ │ │ └── input.sql │ │ ├── sqlpath/ │ │ │ ├── read.go │ │ │ ├── read_test.go │ │ │ └── testdata/ │ │ │ ├── .hidden.sql │ │ │ ├── .hiddendir/ │ │ │ │ └── file1.sql │ │ │ ├── extra.txt │ │ │ ├── file1.sql │ │ │ ├── file2.sql │ │ │ ├── file3.down.sql │ │ │ ├── file4.SQL │ │ │ ├── glob/ │ │ │ │ ├── sub1/ │ │ │ │ │ └── queries/ │ │ │ │ │ └── file1.sql │ │ │ │ ├── sub2/ │ │ │ │ │ └── queries/ │ │ │ │ │ └── file2.sql │ │ │ │ └── sub3/ │ │ │ │ └── queries/ │ │ │ │ ├── file3.sql │ │ │ │ └── file4.sql │ │ │ └── subdir/ │ │ │ └── file2.sql │ │ └── validate/ │ │ ├── cmd.go │ │ ├── func_call.go │ │ ├── in.go │ │ ├── insert_stmt.go │ │ ├── param_ref.go │ │ └── param_style.go │ ├── sqltest/ │ │ ├── docker/ │ │ │ ├── enabled.go │ │ │ ├── mysql.go │ │ │ └── postgres.go │ │ ├── local/ │ │ │ ├── id.go │ │ │ ├── mysql.go │ │ │ └── postgres.go │ │ ├── mysql.go │ │ ├── native/ │ │ │ ├── enabled.go │ │ │ ├── mysql.go │ │ │ └── postgres.go │ │ ├── pgx.go │ │ ├── postgres.go │ │ └── sqlite.go │ ├── tools/ │ │ └── sqlc-pg-gen/ │ │ ├── main.go │ │ ├── proc.go │ │ └── relation.go │ ├── tracer/ │ │ └── trace.go │ ├── vet/ │ │ ├── vet.pb.go │ │ └── vet_vtproto.pb.go │ └── x/ │ └── expander/ │ ├── expander.go │ └── expander_test.go ├── pkg/ │ └── cli/ │ └── cli.go ├── placeholder.go ├── protos/ │ ├── analysis/ │ │ └── analysis.proto │ ├── buf.yaml │ ├── plugin/ │ │ └── codegen.proto │ └── vet/ │ └── vet.proto └── scripts/ ├── build/ │ └── main.go ├── bump-version/ │ └── main.go ├── cleanup-test-dbs/ │ └── main.go ├── mirror-go-plugin/ │ └── main.go ├── release.go ├── report.sh └── test-json-process-plugin/ └── main.go ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/ISSUE_TEMPLATE/BUG_REPORT.yml ================================================ name: Bug Report description: File a bug report labels: [bug] body: - type: dropdown id: version attributes: label: Version description: What version of sqlc are you running? If you don't know, run `sqlc version`. multiple: false options: - 1.30.0 - 1.29.0 - 1.28.0 - 1.27.0 - 1.26.0 - 1.25.0 - Other validations: required: true - type: textarea id: what-happened attributes: label: What happened? description: Also tell us, what did you expect to happen? placeholder: Tell us what you see! value: "A bug happened!" validations: required: true - type: textarea id: logs attributes: label: Relevant log output description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. render: shell - type: textarea id: schema attributes: label: Database schema description: Please include definitions for the relevant database tables. This will be automatically formatted as SQL, so no need for backticks. render: sql - type: textarea id: queries attributes: label: SQL queries description: Please include the SQL queries causing issues. This will be automatically formatted as SQL, so no need for backticks. render: sql - type: textarea id: config attributes: label: Configuration description: Please include the sqlc.(yaml|yml) or sqlc.json file you using in your project. This will be automatically formatted, so no need for backticks. render: yaml - type: input id: playground attributes: label: Playground URL description: "Link to a reproduction of the issue on the sqlc playground" placeholder: "https://play.sqlc.dev/" - type: dropdown id: os attributes: label: What operating system are you using? multiple: true options: - Linux - Windows - macOS - type: dropdown id: engines attributes: label: What database engines are you using? multiple: true options: - MySQL - PostgreSQL - SQLite - type: dropdown id: languages attributes: label: What type of code are you generating? multiple: true options: - Go - Python - Kotlin ================================================ FILE: .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml ================================================ name: Feature Request description: Request a new feature or a change to an existing feature labels: [enhancement] body: - type: textarea id: feature attributes: label: What do you want to change? placeholder: Tell us what you want value: "Free unicorns!" validations: required: true - type: dropdown id: engines attributes: label: What database engines need to be changed? multiple: true options: - PostgreSQL - MySQL - SQLite - type: dropdown id: languages attributes: label: What programming language backends need to be changed? multiple: true options: - Go - Python - Kotlin ================================================ FILE: .github/dependabot.yml ================================================ version: 2 updates: - package-ecosystem: "gomod" directory: "/" schedule: interval: "daily" groups: production-dependencies: dependency-type: "production" development-dependencies: dependency-type: "development" - package-ecosystem: "docker" directory: "/" schedule: interval: "daily" - package-ecosystem: "github-actions" directory: "/" schedule: interval: "daily" - package-ecosystem: "pip" directory: "/docs" schedule: interval: "daily" ignore: # sphinx-rtd-theme does not support the latest versions of docutils and # sphinx - dependency-name: "docutils" - dependency-name: "sphinx" groups: production-dependencies: dependency-type: "production" development-dependencies: dependency-type: "development" ================================================ FILE: .github/workflows/buf.yml ================================================ name: buf on: pull_request jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: bufbuild/buf-setup-action@v1 - uses: bufbuild/buf-lint-action@v1 ================================================ FILE: .github/workflows/build.yml ================================================ 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@v6 - uses: actions/setup-go@v6 with: go-version: '1.26.0' - name: install ./... run: go build ./... env: CGO_ENABLED: "0" ================================================ FILE: .github/workflows/ci-kotlin.yml ================================================ name: kotlin on: push: branches: - main pull_request: jobs: build: if: false name: test runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-go@v6 with: go-version: '1.26.0' - name: install ./... run: go install ./... - uses: actions/checkout@v6 with: repository: sqlc-dev/sqlc-gen-kotlin path: kotlin - run: make test working-directory: kotlin - run: sqlc diff working-directory: kotlin/examples ================================================ FILE: .github/workflows/ci-python.yml ================================================ name: python on: push: branches: - main pull_request: jobs: build: if: false name: test runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-go@v6 with: go-version: '1.26.0' - name: install ./... run: go install ./... - uses: actions/checkout@v6 with: repository: sqlc-dev/sqlc-gen-python path: python - run: make test working-directory: python - run: sqlc diff working-directory: python/examples ================================================ FILE: .github/workflows/ci-typescript.yml ================================================ name: typescript on: push: branches: - main pull_request: jobs: build: if: false name: test runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-go@v6 with: go-version: '1.26.0' - name: install ./... run: go install ./... - uses: actions/checkout@v6 with: repository: sqlc-dev/sqlc-gen-typescript path: typescript # v0.1.3 ref: daaf539092421adc15f6c3164279a3470716b560 - run: sqlc diff working-directory: typescript/examples ================================================ FILE: .github/workflows/ci.yml ================================================ name: go on: push: branches: - main pull_request: jobs: 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@v6 - uses: actions/setup-go@v6 with: go-version: '1.26.0' - run: go build ./... env: CGO_ENABLED: "0" GOOS: ${{ matrix.goos }} GOARCH: ${{ matrix.goarch }} test: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 - uses: actions/setup-go@v6 with: go-version: '1.26.0' - name: install gotestsum run: go install gotest.tools/gotestsum@latest - 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 ./... env: CGO_ENABLED: "0" - name: build internal/endtoend run: go build ./... working-directory: internal/endtoend/testdata env: CGO_ENABLED: "0" - name: install databases run: go run ./cmd/sqlc-test-setup install - name: start databases run: go run ./cmd/sqlc-test-setup start - name: test ./... run: gotestsum --junitfile junit.xml -- --tags=examples -timeout 20m -failfast ./... env: 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 }} POSTGRESQL_SERVER_URI: "postgres://postgres:postgres@127.0.0.1:5432/postgres?sslmode=disable" MYSQL_SERVER_URI: "root:mysecretpassword@tcp(127.0.0.1:3306)/mysql?multiStatements=true&parseTime=true" CGO_ENABLED: "0" vuln_check: runs-on: ubuntu-24.04 timeout-minutes: 5 steps: - uses: golang/govulncheck-action@v1 ================================================ FILE: .github/workflows/gen.yml ================================================ name: sqlc-pg-gen on: workflow_dispatch: jobs: gen: name: sqlc-pg-gen runs-on: ubuntu-22.04 services: postgres: image: postgres:15.0-alpine 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@v6 - uses: actions/setup-go@v6 with: 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 env: PG_USER: postgres PG_HOST: localhost PG_DATABASE: postgres PG_PASSWORD: postgres PG_PORT: ${{ job.services.postgres.ports['5432'] }} - name: Save results uses: actions/upload-artifact@v6 with: name: sqlc-pg-gen-results path: gen ================================================ FILE: .gitignore ================================================ /.idea/ __pycache__ .DS_Store .*.swp # Devenv .envrc .direnv .devenv* devenv.local.nix ================================================ FILE: .readthedocs.yaml ================================================ # .readthedocs.yaml # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details # Required version: 2 # Set the version of Python and other tools you might need build: os: ubuntu-22.04 tools: python: "3.11" # Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/conf.py # We recommend specifying your dependencies to enable reproducible builds: # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html python: install: - requirements: docs/requirements.txt ================================================ FILE: .vscode/settings.json ================================================ { "files.insertFinalNewline": true } ================================================ FILE: CLAUDE.md ================================================ # Claude Code Development Guide for sqlc This document provides essential information for working with the sqlc codebase, including testing, development workflow, and code structure. ## Quick Start ### Prerequisites - **Go 1.26.0+** - Required for building and testing - **Docker & Docker Compose** - Required for integration tests with databases (local development) - **Git** - For version control ## Database Setup with sqlc-test-setup The `sqlc-test-setup` tool (`cmd/sqlc-test-setup/`) automates installing and starting PostgreSQL and MySQL for tests. Both commands are idempotent and safe to re-run. ### Install databases ```bash go run ./cmd/sqlc-test-setup install ``` This will: - Configure the apt proxy (if `http_proxy` is set, e.g. in Claude Code remote environments) - Install PostgreSQL via apt - Download and install MySQL 9 from Oracle's deb bundle - Resolve all dependencies automatically - Skip anything already installed ### Start databases ```bash go run ./cmd/sqlc-test-setup start ``` This will: - Start PostgreSQL and configure password auth (`postgres`/`postgres`) - Start MySQL via `mysqld_safe` and set root password (`mysecretpassword`) - Verify both connections - Skip steps that are already done (running services, existing config) Connection URIs after start: - PostgreSQL: `postgres://postgres:postgres@127.0.0.1:5432/postgres?sslmode=disable` - MySQL: `root:mysecretpassword@tcp(127.0.0.1:3306)/mysql` ### Run tests ```bash # Full test suite (requires databases running) go test --tags=examples -timeout 20m ./... ``` ## Running Tests ### Basic Unit Tests (No Database Required) ```bash go test ./... ``` ### Full Test Suite with Docker (Local Development) ```bash docker compose up -d go test --tags=examples -timeout 20m ./... ``` ### Full Test Suite without Docker (Remote / CI) ```bash go run ./cmd/sqlc-test-setup install go run ./cmd/sqlc-test-setup start go test --tags=examples -timeout 20m ./... ``` ### Running Specific Tests ```bash # Test a specific package go test ./internal/config # Run with verbose output go test -v ./internal/config # Run a specific test function go test -v ./internal/config -run TestConfig # Run with race detector (recommended for concurrency changes) go test -race ./internal/config ``` ## Test Types ### 1. Unit Tests - **Location:** Throughout the codebase as `*_test.go` files - **Run without:** Database or external dependencies - **Examples:** - `/internal/config/config_test.go` - Configuration parsing - `/internal/compiler/selector_test.go` - Compiler logic - `/internal/metadata/metadata_test.go` - Query metadata parsing ### 2. End-to-End Tests - **Location:** `/internal/endtoend/` - **Requirements:** `--tags=examples` flag and running databases - **Tests:** - `TestExamples` - Main end-to-end tests - `TestReplay` - Replay tests - `TestFormat` - Code formatting tests - `TestJsonSchema` - JSON schema validation - `TestExamplesVet` - Static analysis tests ### 3. Example Tests - **Location:** `/examples/` directory - **Requirements:** Tagged with "examples", requires live databases - **Databases:** PostgreSQL, MySQL, SQLite examples ## Database Services The `docker-compose.yml` provides test databases: - **PostgreSQL 16** - Port 5432 - User: `postgres` - Password: `mysecretpassword` - Database: `postgres` - **MySQL 9** - Port 3306 - User: `root` - Password: `mysecretpassword` - Database: `dinotest` ## Makefile Targets ```bash make test # Basic unit tests only make test-examples # Tests with examples tag make build-endtoend # Build end-to-end test data make test-ci # Full CI suite (examples + endtoend + vet) make vet # Run go vet make start # Start database containers ``` ## CI/CD Configuration ### GitHub Actions Workflow - **File:** `.github/workflows/ci.yml` - **Go Version:** 1.26.0 - **Database Setup:** Uses `sqlc-test-setup` (not Docker) to install and start PostgreSQL and MySQL directly on the runner - **Test Command:** `gotestsum --junitfile junit.xml -- --tags=examples -timeout 20m ./...` - **Additional Checks:** `govulncheck` for vulnerability scanning ## Development Workflow ### Building Development Versions ```bash # Build main sqlc binary for development go build -o ~/go/bin/sqlc-dev ./cmd/sqlc # Build JSON plugin (required for some tests) go build -o ~/go/bin/sqlc-gen-json ./cmd/sqlc-gen-json ``` ### Environment Variables for Tests You can override database connections via environment variables: ```bash POSTGRESQL_SERVER_URI="postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable" MYSQL_SERVER_URI="root:mysecretpassword@tcp(127.0.0.1:3306)/mysql?multiStatements=true&parseTime=true" ``` ## Code Structure ### Key Directories - `/cmd/` - Main binaries (sqlc, sqlc-gen-json, sqlc-test-setup) - `/internal/cmd/` - Command implementations (vet, generate, etc.) - `/internal/engine/` - Database engine implementations - `/postgresql/` - PostgreSQL parser and converter - `/dolphin/` - MySQL parser (uses TiDB parser) - `/sqlite/` - SQLite parser - `/internal/compiler/` - Query compilation logic - `/internal/codegen/` - Code generation for different languages - `/internal/config/` - Configuration file parsing - `/internal/endtoend/` - End-to-end tests - `/internal/sqltest/` - Test database setup (Docker, native, local detection) - `/examples/` - Example projects for testing ### Important Files - `/Makefile` - Build and test targets - `/docker-compose.yml` - Database services for testing - `/.github/workflows/ci.yml` - CI configuration ## Common Issues & Solutions ### Network Connectivity Issues If you see errors about `storage.googleapis.com`, the Go proxy may be unreachable. Use `GOPROXY=direct go mod download` to fetch modules directly from source. ### Test Timeouts End-to-end tests can take a while. Use longer timeouts: ```bash go test -timeout 20m --tags=examples ./... ``` ### Race Conditions Always run tests with the race detector when working on concurrent code: ```bash go test -race ./... ``` ### Database Connection Failures If using Docker: ```bash docker compose ps docker compose up -d ``` If using sqlc-test-setup: ```bash go run ./cmd/sqlc-test-setup start ``` ## Tips for Contributors 1. **Run tests before committing:** `go test --tags=examples -timeout 20m ./...` 2. **Check for race conditions:** Use `-race` flag when testing concurrent code 3. **Use specific package tests:** Faster iteration during development 4. **Read existing tests:** Good examples in `/internal/engine/postgresql/*_test.go` ## Git Workflow ### Branch Naming - Feature branches should start with `claude/` for Claude Code work - Branch names should be descriptive and end with the session ID ### Committing Changes ```bash git add git commit -m "Brief description of changes" git push -u origin ``` ### Rebasing ```bash git checkout main git pull origin main git checkout git rebase main git push --force-with-lease origin ``` ## Resources - **Main Documentation:** `/docs/` - **Development Guide:** `/docs/guides/development.md` - **CI Configuration:** `/.github/workflows/ci.yml` - **Docker Compose:** `/docker-compose.yml` ================================================ FILE: Dockerfile ================================================ # STEP 1: Build sqlc FROM golang:1.26.0 AS builder COPY . /workspace WORKDIR /workspace ARG github_ref ARG github_sha ARG version ENV GITHUB_REF=$github_ref ENV GITHUB_SHA=$github_sha ENV VERSION=$version RUN go run scripts/release.go -docker # STEP 2: Build a tiny image FROM gcr.io/distroless/base-debian12 COPY --from=builder /workspace/sqlc /workspace/sqlc ENTRYPOINT ["/workspace/sqlc"] ================================================ FILE: LICENSE ================================================ MIT License 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 in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: Makefile ================================================ .PHONY: build build-endtoend test test-ci test-examples test-endtoend start psql mysqlsh proto build: go build ./... install: go 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 ./... test-examples: go test --tags=examples ./... build-endtoend: cd ./internal/endtoend/testdata && go build ./... test-ci: test-examples build-endtoend vet sqlc-dev: go build -o ~/bin/sqlc-dev ./cmd/sqlc/ sqlc-pg-gen: go build -o ~/bin/sqlc-pg-gen ./internal/tools/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 fmt: go fmt ./... psql: PGPASSWORD=mysecretpassword psql --host=127.0.0.1 --port=5432 --username=postgres dinotest mysqlsh: mysqlsh --sql --user root --password mysecretpassword --database dinotest 127.0.0.1:3306 proto: buf generate remote-proto: protoc \ --go_out=. --go_opt="Minternal/remote/gen.proto=github.com/sqlc-dev/sqlc/internal/remote" --go_opt=module=github.com/sqlc-dev/sqlc \ --go-grpc_out=. --go-grpc_opt="Minternal/remote/gen.proto=github.com/sqlc-dev/sqlc/internal/remote" --go-grpc_opt=module=github.com/sqlc-dev/sqlc \ internal/remote/gen.proto ================================================ FILE: README.md ================================================ # sqlc: A SQL Compiler ![go](https://github.com/sqlc-dev/sqlc/workflows/go/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/sqlc-dev/sqlc)](https://goreportcard.com/report/github.com/sqlc-dev/sqlc) sqlc generates **type-safe code** from SQL. Here's how it works: 1. You write queries in SQL. 1. You run sqlc to generate code with type-safe interfaces to those queries. 1. You write application code that calls the generated code. Check out [an interactive example](https://play.sqlc.dev/) to see it in action, and the [introductory blog post](https://conroy.org/introducing-sqlc) for the motivation behind sqlc. ## Overview - [Documentation](https://docs.sqlc.dev) - [Installation](https://docs.sqlc.dev/en/latest/overview/install.html) - [Playground](https://play.sqlc.dev) - [Website](https://sqlc.dev) - [Downloads](https://downloads.sqlc.dev/) - [Community](https://discord.gg/EcXzGe5SEs) ## Supported languages - [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) Additional languages can be added via [plugins](https://docs.sqlc.dev/en/latest/reference/language-support.html#community-language-support). ## Sponsors 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

================================================ FILE: buf.gen.yaml ================================================ 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/grpc/go:v1.3.0 out: internal opt: paths=source_relative ================================================ FILE: buf.work.yaml ================================================ version: v1 directories: - protos ================================================ FILE: cliff.toml ================================================ # configuration file for git-cliff (0.1.0) [changelog] # changelog header header = """ # Changelog All notable changes to this project will be documented in this file.\n """ # template for the changelog body # https://tera.netlify.app/docs/#introduction body = """ {% if version %}\ ## [{{ version | trim_start_matches(pat="v") }}](https://github.com/sqlc-dev/sqlc/releases/tag/{{ version }}) {% else %}\ ## [unreleased] {% endif %}\ Released {{ timestamp | date(format="%Y-%m-%d") }} {% for group, commits in commits | group_by(attribute="group") %} ### {{ group | upper_first }} {% for commit in commits %} - {%if commit.scope %}({{commit.scope}}) {% endif %}{{ commit.message | upper_first }}\ {% endfor %} {% endfor %}\n """ # remove the leading and trailing whitespaces from the template trim = true # changelog footer footer = """ """ [git] # allow only conventional commits # https://www.conventionalcommits.org conventional_commits = true # regex for parsing and grouping commits commit_parsers = [ { message = "^feat", group = "Features"}, { message = "^fix", group = "Bug Fixes"}, { message = "^doc", group = "Documentation"}, { message = "^perf", group = "Performance"}, { message = "^refactor", group = "Refactor"}, { message = "^style", group = "Styling"}, { message = "^test", group = "Testing"}, { message = "^chore\\(release\\): prepare for", skip = true}, { message = "^chore", group = "Miscellaneous Tasks"}, { body = ".*security", group = "Security"}, ] # filter out the commits that are not matched by commit parsers filter_commits = false # glob pattern for matching git tags tag_pattern = "v[0-9]*" # regex for skipping tags skip_tags = "v*beta" ================================================ FILE: cmd/sqlc/main.go ================================================ package main import ( "os" "github.com/sqlc-dev/sqlc/internal/cmd" ) func main() { os.Exit(cmd.Do(os.Args[1:], os.Stdin, os.Stdout, os.Stderr)) } ================================================ FILE: cmd/sqlc-gen-json/main.go ================================================ package main import ( "bufio" "context" "fmt" "io" "os" "github.com/sqlc-dev/sqlc/internal/codegen/json" "github.com/sqlc-dev/sqlc/internal/plugin" "google.golang.org/protobuf/proto" ) func main() { if err := run(); err != nil { fmt.Fprintf(os.Stderr, "error generating JSON: %s", err) os.Exit(2) } } func run() error { var req plugin.GenerateRequest reqBlob, err := io.ReadAll(os.Stdin) if err != nil { return err } if err := proto.Unmarshal(reqBlob, &req); err != nil { return err } resp, err := json.Generate(context.Background(), &req) if err != nil { return err } respBlob, err := proto.Marshal(resp) if err != nil { return err } w := bufio.NewWriter(os.Stdout) if _, err := w.Write(respBlob); err != nil { return err } if err := w.Flush(); err != nil { return err } return nil } ================================================ FILE: cmd/sqlc-test-setup/main.go ================================================ package main import ( "crypto/sha256" "encoding/hex" "fmt" "io" "log" "net/http" "os" "os/exec" "path/filepath" "runtime" "strings" "time" ) const ( // pgVersion is the PostgreSQL version to install. pgVersion = "18.2.0" ) // pgBinary contains the download information for a PostgreSQL binary release. type pgBinary struct { URL string SHA256 string } // pgBinaries maps "/" to the corresponding binary download info. var pgBinaries = map[string]pgBinary{ "linux/amd64": { URL: "https://github.com/theseus-rs/postgresql-binaries/releases/download/" + pgVersion + "/postgresql-" + pgVersion + "-x86_64-unknown-linux-gnu.tar.gz", SHA256: "cc2674e1641aa2a62b478971a22c131a768eb783f313e6a3385888f58a604074", }, "linux/arm64": { URL: "https://github.com/theseus-rs/postgresql-binaries/releases/download/" + pgVersion + "/postgresql-" + pgVersion + "-aarch64-unknown-linux-gnu.tar.gz", SHA256: "8b415a11c7a5484e5fbf7a57fca71554d2d1d7acd34faf066606d2fee1261854", }, } func main() { log.SetFlags(log.Ltime) log.SetPrefix("[sqlc-test-setup] ") if len(os.Args) < 2 { fmt.Fprintln(os.Stderr, "usage: sqlc-test-setup ") os.Exit(1) } switch os.Args[1] { case "install": if err := runInstall(); err != nil { log.Fatalf("install failed: %s", err) } case "start": if err := runStart(); err != nil { log.Fatalf("start failed: %s", err) } default: fmt.Fprintf(os.Stderr, "unknown command: %s\nusage: sqlc-test-setup \n", os.Args[1]) os.Exit(1) } } // run executes a command with verbose logging, streaming output to stderr. func run(name string, args ...string) error { log.Printf("exec: %s %s", name, strings.Join(args, " ")) cmd := exec.Command(name, args...) cmd.Stdout = os.Stderr cmd.Stderr = os.Stderr cmd.Stdin = os.Stdin return cmd.Run() } // runOutput executes a command and returns its combined output. func runOutput(name string, args ...string) (string, error) { log.Printf("exec: %s %s", name, strings.Join(args, " ")) cmd := exec.Command(name, args...) out, err := cmd.CombinedOutput() return string(out), err } // commandExists checks if a binary is available in PATH. func commandExists(name string) bool { _, err := exec.LookPath(name) return err == nil } // isMySQLVersionOK checks if the mysqld --version output indicates MySQL 9+. // Example version string: "/usr/sbin/mysqld Ver 8.0.44-0ubuntu0.24.04.2 ..." func isMySQLVersionOK(versionOutput string) bool { // Look for "Ver X.Y.Z" pattern fields := strings.Fields(versionOutput) for i, f := range fields { if strings.EqualFold(f, "Ver") && i+1 < len(fields) { ver := strings.Split(fields[i+1], ".") if len(ver) > 0 { major := strings.TrimLeft(ver[0], "0") if major == "" { return false } return major[0] >= '9' } } } return false } // pgBaseDir returns the sqlc-specific directory where PostgreSQL is installed, // using the user's cache directory (~/.cache/sqlc/postgresql on Linux). func pgBaseDir() string { cacheDir, err := os.UserCacheDir() if err != nil { cacheDir = filepath.Join(os.Getenv("HOME"), ".cache") } return filepath.Join(cacheDir, "sqlc", "postgresql") } // pgBinDir returns the path to the PostgreSQL bin directory. func pgBinDir() string { return filepath.Join(pgBaseDir(), "bin") } // pgDataDir returns the path to the PostgreSQL data directory. func pgDataDir() string { return filepath.Join(pgBaseDir(), "data") } // pgBin returns the full path to a PostgreSQL binary. func pgBin(name string) string { return filepath.Join(pgBinDir(), name) } // ---- install ---- func runInstall() error { log.Println("=== Installing PostgreSQL and MySQL for test setup ===") if err := installAptProxy(); err != nil { return fmt.Errorf("configuring apt proxy: %w", err) } if err := installPostgreSQL(); err != nil { return fmt.Errorf("installing postgresql: %w", err) } if err := installMySQL(); err != nil { return fmt.Errorf("installing mysql: %w", err) } log.Println("=== Install complete ===") return nil } func installAptProxy() error { proxy := os.Getenv("http_proxy") if proxy == "" { log.Println("http_proxy is not set, skipping apt proxy configuration") return nil } const confPath = "/etc/apt/apt.conf.d/99proxy" if _, err := os.Stat(confPath); err == nil { log.Printf("apt proxy config already exists at %s, skipping", confPath) return nil } log.Printf("configuring apt proxy to use %s", proxy) proxyConf := fmt.Sprintf("Acquire::http::Proxy \"%s\";", proxy) cmd := fmt.Sprintf("echo '%s' | sudo tee /etc/apt/apt.conf.d/99proxy", proxyConf) return run("bash", "-c", cmd) } func installPostgreSQL() error { log.Println("--- Installing PostgreSQL ---") // Install runtime dependencies needed by PostgreSQL extensions (e.g. // uuid-ossp requires libossp-uuid16). if err := installPgDeps(); err != nil { return fmt.Errorf("installing postgresql dependencies: %w", err) } // Check if already installed in our directory if _, err := os.Stat(pgBin("postgres")); err == nil { out, err := runOutput(pgBin("postgres"), "--version") if err == nil { log.Printf("postgresql is already installed: %s", strings.TrimSpace(out)) log.Println("skipping postgresql installation") return nil } } platform := runtime.GOOS + "/" + runtime.GOARCH bin, ok := pgBinaries[platform] if !ok { return fmt.Errorf("unsupported platform: %s (supported: %s)", platform, supportedPlatforms()) } // Download to a temp file tarball := filepath.Join(os.TempDir(), fmt.Sprintf("postgresql-%s.tar.gz", pgVersion)) if _, err := os.Stat(tarball); err != nil { log.Printf("downloading PostgreSQL %s from %s", pgVersion, bin.URL) if err := downloadFile(tarball, bin.URL); err != nil { os.Remove(tarball) return fmt.Errorf("downloading postgresql: %w", err) } } else { log.Printf("postgresql tarball already downloaded at %s", tarball) } // Verify SHA256 checksum log.Printf("verifying SHA256 checksum") actualHash, err := sha256File(tarball) if err != nil { return fmt.Errorf("computing sha256: %w", err) } if actualHash != bin.SHA256 { os.Remove(tarball) return fmt.Errorf("SHA256 mismatch: expected %s, got %s", bin.SHA256, actualHash) } log.Printf("SHA256 checksum verified: %s", actualHash) baseDir := pgBaseDir() // Create the base directory in the user cache if err := os.MkdirAll(baseDir, 0o755); err != nil { return fmt.Errorf("creating %s: %w", baseDir, err) } // Extract the tarball - it contains a top-level directory like // postgresql-18.2.0-x86_64-unknown-linux-gnu/ with bin/, lib/, share/ inside. // We strip that top-level directory and extract directly into the base dir. log.Printf("extracting postgresql to %s", baseDir) if err := run("tar", "-xzf", tarball, "-C", baseDir, "--strip-components=1"); err != nil { return fmt.Errorf("extracting postgresql: %w", err) } // Verify the binary works out, err := runOutput(pgBin("postgres"), "--version") if err != nil { return fmt.Errorf("postgres --version failed after install: %w", err) } log.Printf("postgresql installed successfully: %s", strings.TrimSpace(out)) return nil } // installPgDeps installs shared libraries required by PostgreSQL extensions at // runtime (e.g. libossp-uuid16 for uuid-ossp). func installPgDeps() error { log.Println("installing postgresql runtime dependencies") if err := run("sudo", "apt-get", "install", "-y", "--no-install-recommends", "libossp-uuid16"); err != nil { return fmt.Errorf("apt-get install libossp-uuid16: %w", err) } return nil } // supportedPlatforms returns a comma-separated list of supported platforms. func supportedPlatforms() string { platforms := make([]string, 0, len(pgBinaries)) for p := range pgBinaries { platforms = append(platforms, p) } return strings.Join(platforms, ", ") } // downloadFile downloads a URL to a local file path. func downloadFile(filepath string, url string) error { resp, err := http.Get(url) if err != nil { return err } defer resp.Body.Close() if resp.StatusCode != http.StatusOK { return fmt.Errorf("HTTP %d: %s", resp.StatusCode, resp.Status) } out, err := os.Create(filepath) if err != nil { return err } defer out.Close() _, err = io.Copy(out, resp.Body) return err } // sha256File computes the SHA256 hash of a file and returns the hex string. func sha256File(path string) (string, error) { f, err := os.Open(path) if err != nil { return "", err } defer f.Close() h := sha256.New() if _, err := io.Copy(h, f); err != nil { return "", err } return hex.EncodeToString(h.Sum(nil)), nil } func installMySQL() error { log.Println("--- Installing MySQL 9 ---") if commandExists("mysqld") { out, err := runOutput("mysqld", "--version") if err == nil { version := strings.TrimSpace(out) log.Printf("mysql is already installed: %s", version) if isMySQLVersionOK(version) { log.Println("mysql version is 9+, skipping installation") return nil } log.Println("mysql version is too old, upgrading to MySQL 9") // Stop existing MySQL before upgrading _ = exec.Command("sudo", "service", "mysql", "stop").Run() _ = exec.Command("sudo", "pkill", "-f", "mysqld").Run() time.Sleep(2 * time.Second) // Remove old MySQL packages to avoid conflicts log.Println("removing old mysql packages") _ = run("sudo", "apt-get", "remove", "-y", "mysql-server", "mysql-client", "mysql-common", "mysql-server-core-*", "mysql-client-core-*") // Clear old data directory so MySQL 9 can initialize fresh log.Println("clearing old mysql data directory") _ = run("sudo", "rm", "-rf", "/var/lib/mysql") _ = run("sudo", "mkdir", "-p", "/var/lib/mysql") _ = run("sudo", "chown", "mysql:mysql", "/var/lib/mysql") } } bundleURL := "https://dev.mysql.com/get/Downloads/MySQL-9.1/mysql-server_9.1.0-1ubuntu24.04_amd64.deb-bundle.tar" bundleTar := "/tmp/mysql-server-bundle.tar" extractDir := "/tmp/mysql9" if _, err := os.Stat(bundleTar); err != nil { log.Printf("downloading MySQL 9 bundle from %s", bundleURL) if err := run("curl", "-L", "-o", bundleTar, bundleURL); err != nil { return fmt.Errorf("downloading mysql bundle: %w", err) } } else { log.Printf("mysql bundle already downloaded at %s, skipping download", bundleTar) } log.Printf("extracting bundle to %s", extractDir) if err := os.MkdirAll(extractDir, 0o755); err != nil { return fmt.Errorf("creating extract dir: %w", err) } if err := run("tar", "-xf", bundleTar, "-C", extractDir); err != nil { return fmt.Errorf("extracting mysql bundle: %w", err) } // Install packages in dependency order using dpkg. // Some packages may fail due to missing dependencies, which is expected. // We fix them all at the end with apt-get install -f. packages := []string{ "mysql-common_*.deb", "mysql-community-client-plugins_*.deb", "mysql-community-client-core_*.deb", "mysql-community-client_*.deb", "mysql-client_*.deb", "mysql-community-server-core_*.deb", "mysql-community-server_*.deb", "mysql-server_*.deb", } for _, pkg := range packages { log.Printf("installing %s (dependency errors will be fixed afterwards)", pkg) cmd := fmt.Sprintf("sudo dpkg -i %s/%s", extractDir, pkg) if err := run("bash", "-c", cmd); err != nil { log.Printf("dpkg reported errors for %s (will fix with apt-get install -f)", pkg) } } log.Println("fixing missing dependencies with apt-get install -f") if err := run("sudo", "apt-get", "install", "-f", "-y"); err != nil { return fmt.Errorf("apt-get install -f: %w", err) } log.Println("mysql 9 installed successfully") return nil } // ---- start ---- func runStart() error { log.Println("=== Starting PostgreSQL and MySQL ===") if err := startPostgreSQL(); err != nil { return fmt.Errorf("starting postgresql: %w", err) } if err := startMySQL(); err != nil { return fmt.Errorf("starting mysql: %w", err) } log.Println("=== Both databases are running and configured ===") log.Println("PostgreSQL: postgres://postgres:postgres@127.0.0.1:5432/postgres?sslmode=disable") log.Println("MySQL: root:mysecretpassword@tcp(127.0.0.1:3306)/mysql") return nil } func startPostgreSQL() error { log.Println("--- Starting PostgreSQL ---") dataDir := pgDataDir() logFile := filepath.Join(pgBaseDir(), "postgresql.log") // Check if already running if pgIsReady() { log.Println("postgresql is already running and accepting connections") return nil } // Initialize data directory if needed if _, err := os.Stat(filepath.Join(dataDir, "PG_VERSION")); os.IsNotExist(err) { log.Println("initializing postgresql data directory") if err := os.MkdirAll(dataDir, 0o700); err != nil { return fmt.Errorf("creating data directory: %w", err) } if err := run(pgBin("initdb"), "-D", dataDir, "--username=postgres", "--auth=trust", ); err != nil { return fmt.Errorf("initdb: %w", err) } // Configure pg_hba.conf for md5 password authentication on TCP hbaPath := filepath.Join(dataDir, "pg_hba.conf") if err := configurePgHBA(hbaPath); err != nil { return fmt.Errorf("configuring pg_hba.conf: %w", err) } // Configure postgresql.conf to listen on localhost confPath := filepath.Join(dataDir, "postgresql.conf") if err := appendToFile(confPath, "\n# sqlc-test-setup configuration\n"+ "listen_addresses = '127.0.0.1'\n"+ "port = 5432\n", ); err != nil { return fmt.Errorf("configuring postgresql.conf: %w", err) } } else { log.Println("postgresql data directory already initialized") } // Start PostgreSQL using pg_ctl log.Println("starting postgresql") if err := run(pgBin("pg_ctl"), "-D", dataDir, "-l", logFile, "-o", fmt.Sprintf("-k %s", dataDir), "start", ); err != nil { return fmt.Errorf("pg_ctl start: %w", err) } // Wait for PostgreSQL to be ready log.Println("waiting for postgresql to accept connections") if err := waitForPostgreSQL(30 * time.Second); err != nil { return fmt.Errorf("postgresql did not start in time: %w", err) } // Set the postgres user password log.Println("setting password for postgres user") if err := run(pgBin("psql"), "-h", "127.0.0.1", "-U", "postgres", "-c", "ALTER USER postgres PASSWORD 'postgres';", ); err != nil { return fmt.Errorf("setting postgres password: %w", err) } // Update pg_hba.conf to require md5 auth now that password is set hbaPath := filepath.Join(dataDir, "pg_hba.conf") if err := configurePgHBAWithMD5(hbaPath); err != nil { return fmt.Errorf("updating pg_hba.conf for md5: %w", err) } // Reload configuration log.Println("reloading postgresql configuration") if err := run(pgBin("pg_ctl"), "-D", dataDir, "reload"); err != nil { return fmt.Errorf("pg_ctl reload: %w", err) } // Verify connection with password log.Println("verifying postgresql connection") cmd := exec.Command(pgBin("psql"), "-h", "127.0.0.1", "-U", "postgres", "-c", "SELECT 1;", ) cmd.Env = append(os.Environ(), "PGPASSWORD=postgres") cmd.Stdout = os.Stderr cmd.Stderr = os.Stderr if err := cmd.Run(); err != nil { return fmt.Errorf("postgresql connection test failed: %w", err) } log.Println("postgresql is running and configured") return nil } // configurePgHBA writes a pg_hba.conf that allows trust auth initially (for // setting the password), then we switch to md5. func configurePgHBA(hbaPath string) error { content := `# pg_hba.conf - generated by sqlc-test-setup # TYPE DATABASE USER ADDRESS METHOD local all all trust host all all 127.0.0.1/32 trust host all all ::1/128 trust ` return os.WriteFile(hbaPath, []byte(content), 0o600) } // configurePgHBAWithMD5 rewrites pg_hba.conf to use md5 for TCP connections. func configurePgHBAWithMD5(hbaPath string) error { content := `# pg_hba.conf - generated by sqlc-test-setup # TYPE DATABASE USER ADDRESS METHOD local all all trust host all all 127.0.0.1/32 md5 host all all ::1/128 md5 ` return os.WriteFile(hbaPath, []byte(content), 0o600) } // appendToFile appends text to a file. func appendToFile(path, text string) error { f, err := os.OpenFile(path, os.O_APPEND|os.O_WRONLY, 0o644) if err != nil { return err } defer f.Close() _, err = f.WriteString(text) return err } // pgIsReady checks if PostgreSQL is running and accepting connections. func pgIsReady() bool { cmd := exec.Command(pgBin("pg_isready"), "-h", "127.0.0.1", "-p", "5432") return cmd.Run() == nil } // waitForPostgreSQL polls until PostgreSQL accepts connections or times out. func waitForPostgreSQL(timeout time.Duration) error { deadline := time.Now().Add(timeout) for time.Now().Before(deadline) { if pgIsReady() { return nil } time.Sleep(500 * time.Millisecond) } return fmt.Errorf("timed out after %s waiting for postgresql", timeout) } func startMySQL() error { log.Println("--- Starting MySQL ---") // Check if MySQL is already running and accessible with the expected password if mysqlReady() { log.Println("mysql is already running and accepting connections") return verifyMySQL() } // Stop any existing MySQL service that might be running (e.g. pre-installed // on GitHub Actions runners) to avoid port conflicts. log.Println("stopping any existing mysql service") _ = exec.Command("sudo", "service", "mysql", "stop").Run() _ = exec.Command("sudo", "mysqladmin", "shutdown").Run() // Give MySQL time to fully shut down time.Sleep(2 * time.Second) if err := ensureMySQLDirs(); err != nil { return err } // Check if data directory already exists and has been initialized needsPasswordReset := false if mysqlInitialized() { log.Println("mysql data directory already initialized, skipping initialization") // Existing data dir may have an unknown root password (e.g. pre-installed // MySQL on GitHub Actions). We'll need to use --skip-grant-tables to reset it. needsPasswordReset = true } else { log.Println("initializing mysql data directory") if err := run("sudo", "mysqld", "--initialize-insecure", "--user=mysql"); err != nil { return fmt.Errorf("mysqld --initialize-insecure: %w", err) } } if needsPasswordReset { // Start with --skip-grant-tables to reset the unknown root password. if err := startMySQLDaemon("--skip-grant-tables"); err != nil { return err } log.Println("resetting root password via --skip-grant-tables") resetSQL := "FLUSH PRIVILEGES; ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'mysecretpassword';" if err := run("mysql", "-u", "root", "-e", resetSQL); err != nil { return fmt.Errorf("resetting mysql root password: %w", err) } // Restart without --skip-grant-tables log.Println("restarting mysql normally") if err := run("sudo", "mysqladmin", "-u", "root", "-pmysecretpassword", "shutdown"); err != nil { // If mysqladmin fails, try killing the process directly _ = run("sudo", "pkill", "-f", "mysqld") } time.Sleep(2 * time.Second) if err := startMySQLDaemon(); err != nil { return err } } else { // Fresh initialization — start normally and set password if err := startMySQLDaemon(); err != nil { return err } log.Println("setting mysql root password") alterSQL := "ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'mysecretpassword'; FLUSH PRIVILEGES;" if err := run("mysql", "-u", "root", "-e", alterSQL); err != nil { return fmt.Errorf("setting mysql root password: %w", err) } } return verifyMySQL() } // ensureMySQLDirs creates the directories MySQL needs at runtime. func ensureMySQLDirs() error { if err := run("sudo", "mkdir", "-p", "/var/run/mysqld"); err != nil { return fmt.Errorf("creating /var/run/mysqld: %w", err) } if err := run("sudo", "chown", "mysql:mysql", "/var/run/mysqld"); err != nil { return fmt.Errorf("chowning /var/run/mysqld: %w", err) } return nil } // startMySQLDaemon starts mysqld_safe in the background and waits for it to // accept connections. Extra args (e.g. "--skip-grant-tables") are appended. func startMySQLDaemon(extraArgs ...string) error { args := append([]string{"mysqld_safe", "--user=mysql"}, extraArgs...) log.Printf("starting mysql via mysqld_safe %v", extraArgs) cmd := exec.Command("sudo", args...) cmd.Stdout = os.Stderr cmd.Stderr = os.Stderr if err := cmd.Start(); err != nil { return fmt.Errorf("starting mysqld_safe: %w", err) } log.Println("waiting for mysql to accept connections") if err := waitForMySQL(30 * time.Second); err != nil { return fmt.Errorf("mysql did not start in time: %w", err) } log.Println("mysql is accepting connections") return nil } // mysqlReady checks if MySQL is running and accepting connections with the expected password. func mysqlReady() bool { err := exec.Command("mysqladmin", "-h", "127.0.0.1", "-u", "root", "-pmysecretpassword", "ping").Run() return err == nil } // waitForMySQL polls until MySQL accepts connections or the timeout expires. func waitForMySQL(timeout time.Duration) error { deadline := time.Now().Add(timeout) for time.Now().Before(deadline) { // Try connecting without password (fresh) or with password (already configured) if exec.Command("mysqladmin", "-u", "root", "ping").Run() == nil { return nil } if exec.Command("mysqladmin", "-h", "127.0.0.1", "-u", "root", "-pmysecretpassword", "ping").Run() == nil { return nil } time.Sleep(500 * time.Millisecond) } return fmt.Errorf("timed out after %s waiting for mysql", timeout) } func verifyMySQL() error { log.Println("verifying mysql connection") if err := run("mysql", "-h", "127.0.0.1", "-u", "root", "-pmysecretpassword", "-e", "SELECT VERSION();"); err != nil { return fmt.Errorf("mysql connection test failed: %w", err) } log.Println("mysql is running and configured") return nil } // mysqlInitialized checks if the MySQL data directory has been initialized. // We use sudo ls because /var/lib/mysql is typically only readable by the // mysql user, so filepath.Glob from a non-root process would silently fail. func mysqlInitialized() bool { out, err := exec.Command("sudo", "ls", "/var/lib/mysql").CombinedOutput() if err != nil { return false } // If the directory has any contents, consider it initialized. // mysqld --initialize-insecure requires an empty directory. return strings.TrimSpace(string(out)) != "" } ================================================ FILE: devenv.nix ================================================ { pkgs, ... }: { # https://devenv.sh/packages/ packages = [ pkgs.buf pkgs.go_1_24 pkgs.git pkgs.git-cliff pkgs.govulncheck pkgs.gopls pkgs.golint pkgs.mysql-shell pkgs.postgresql_15 pkgs.python311 ]; } ================================================ FILE: devenv.yaml ================================================ inputs: nixpkgs: url: github:NixOS/nixpkgs/nixpkgs-unstable ================================================ FILE: docker-compose.yml ================================================ version: "3.8" services: mysql: image: "mysql:9" ports: - "3306:3306" restart: always environment: MYSQL_DATABASE: dinotest MYSQL_ROOT_PASSWORD: mysecretpassword MYSQL_ROOT_HOST: '%' postgresql: image: "postgres:16" ports: - "5432:5432" restart: always environment: POSTGRES_DB: postgres POSTGRES_PASSWORD: mysecretpassword POSTGRES_USER: postgres ================================================ FILE: docs/.gitignore ================================================ _venv _build ================================================ FILE: docs/Makefile ================================================ # Minimal makefile for Sphinx documentation # # You can set these variables from the command line, and also # from the environment for the first two. SPHINXOPTS ?= VENVDIR = _venv BINDIR = $(VENVDIR)/bin SPHINXBUILD = $(BINDIR)/sphinx-build SOURCEDIR = . BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: $(SPHINXBUILD) @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) $(SPHINXBUILD): $(VENVDIR) $(VENVDIR)/bin/pip install -r requirements.txt $(VENVDIR): python3 -m venv $(VENVDIR) .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) ================================================ FILE: docs/_static/customize.css ================================================ .wy-side-nav-search img { padding: 5px 60px !important; } #banner { text-align: center; background: #2980b9; border: 1px solid rgb(52, 49, 49); color: #F0F0F4; padding: 10px; margin-bottom: 1.618em; } #banner > div > a { color: #F0F0F4; text-decoration: underline; } #sponsorship > img { width: 100%; max-width: 200px; } ================================================ FILE: docs/_templates/breadcrumbs.html ================================================ {% extends "!breadcrumbs.html" %} {% block breadcrumbs %} {% if show_banner %} {% endif %} {{ super() }} {% endblock %} ================================================ FILE: docs/_templates/layout.html ================================================ {% extends "!layout.html" %} {% block extrahead %} {{ super() }} {% endblock %} {% block menu %} {{ super() }}

Sponsored By

{% endblock %} ================================================ FILE: docs/conf.py ================================================ # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # import os # import sys # sys.path.insert(0, os.path.abspath('.')) import sphinx_rtd_theme # -- Project information ----------------------------------------------------- project = 'sqlc' copyright = '2024, Riza, Inc.' author = 'Riza, Inc.' # The full version, including alpha/beta/rc tags release = '1.30.0' # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'myst_parser', 'sphinx_rtd_theme', 'sphinx_favicon', 'sphinxext.rediraffe', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = ['_build', '_venv', 'Thumbs.db', '.DS_Store'] # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'sphinx_rtd_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] html_logo = "_static/logo.png" html_theme_options = { 'logo_only': True, } html_context = { 'show_banner': 'SHOW_LAUNCH_BANNER' in os.environ, } def setup(app): app.add_css_file('customize.css') favicons = [ "favicon.png", ] myst_enable_extensions = [ "attrs_inline", "colon_fence", ] rediraffe_redirects = { "howto/upload.md": "howto/push.md", } ================================================ FILE: docs/guides/development.md ================================================ # Developing sqlc ## Building 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 ``` go test ./... ``` To run the tests in the examples folder, use the `examples` tag. ``` go test --tags=examples ./... ``` These tests require locally-running database instances. Run these databases using [Docker Compose](https://docs.docker.com/compose/). ``` docker compose up -d ``` The tests use the following environment variables to connect to the database ### For PostgreSQL ``` Variable Default Value ------------------------- PG_HOST 127.0.0.1 PG_PORT 5432 PG_USER postgres PG_PASSWORD mysecretpassword PG_DATABASE dinotest ``` ### For MySQL ``` Variable Default Value ------------------------- MYSQL_HOST 127.0.0.1 MYSQL_PORT 3306 MYSQL_USER root MYSQL_ROOT_PASSWORD mysecretpassword MYSQL_DATABASE dinotest ``` ================================================ FILE: docs/guides/migrating-off-hosted-managed-databases.md ================================================ # 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. ================================================ FILE: docs/guides/migrating-to-sqlc-gen-kotlin.md ================================================ # Migrating to sqlc-gen-kotlin Starting in sqlc 1.16.0, built-in Kotlin support has been deprecated. It will be fully removed in 1.17.0 in favor of sqlc-gen-kotlin. This guide will walk you through migrating to the [sqlc-gen-kotlin](https://github.com/sqlc-dev/sqlc-gen-kotlin) plugin, which involves three steps. 1. Add the sqlc-gen-kotlin plugin 2. Migrate each package 3. Re-generate the code ## Add the sqlc-gen-kotlin plugin In your configuration file, add a `plugins` array if you don't have one already. Add the following configuration for the plugin: ```json { "version": "2", "plugins": [ { "name": "kt", "wasm": { "url": "https://downloads.sqlc.dev/plugin/sqlc-gen-kotlin_1.0.0.wasm", "sha256": "7620dc5d462de41fdc90e2011232c842117b416c98fd5c163d27c5738431a45c" } } ] } ``` ```yaml version: "2" plugins: - name: "kt" wasm: url: "https://downloads.sqlc.dev/plugin/sqlc-gen-kotlin_1.0.0.wasm" sha256: "7620dc5d462de41fdc90e2011232c842117b416c98fd5c163d27c5738431a45c" ``` ## Migrate each package Your package configuration should currently looks something like this for JSON. ```json "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "kotlin": { "out": "src/main/kotlin/com/example/foo", "package": "com.example.foo" } } } ] ``` Or this if you're using YAML. ```yaml sql: - schema: "schema.sql" queries: "query.sql" engine: "postgresql" gen: kotlin: out: "src/main/kotlin/com/example/foo" package: "com.example.foo" ``` To use the plugin, you'll need to replace the `gen` mapping with the `codegen` collection. Add the `plugin` field, setting it to `kt`. All fields other than `out` need to be moved into the `options` mapping. After you're done, it should look like this for JSON. ```json "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "codegen": [ { "out": "src/main/kotlin/com/example/foo", "plugin": "kt", "options": { "package": "com.example.foo" } } ] } ] ``` Or this for YAML. ```yaml sql: - schema: "schema.sql" queries: "query.sql" engine: "postgresql" codegen: - plugin: "kt" out: "src/main/kotlin/com/example/foo" options: package: "com.example.foo" ``` ## Re-generate the code Run `sqlc generate`. The plugin will produce the same output, so you shouldn't see any changes. The first time `sqlc generate` is run, the plugin must be downloaded and compiled, resulting in a slightly longer runtime. Subsequent `generate` calls will be fast. ================================================ FILE: docs/guides/migrating-to-sqlc-gen-python.md ================================================ # Migrating to sqlc-gen-python Starting in sqlc 1.16.0, built-in Python support has been deprecated. It will be fully removed in 1.17.0 in favor of sqlc-gen-python. This guide will walk you through migrating to the [sqlc-gen-python](https://github.com/sqlc-dev/sqlc-gen-python) plugin, which involves three steps. 1. Add the sqlc-gen-python plugin 2. Migrate each package 3. Re-generate the code ## Add the sqlc-gen-python plugin In your configuration file, add a `plugins` array if you don't have one already. Add the following configuration for the plugin: ```json { "version": "2", "plugins": [ { "name": "py", "wasm": { "url": "https://downloads.sqlc.dev/plugin/sqlc-gen-python_1.0.0.wasm", "sha256": "aca83e1f59f8ffdc604774c2f6f9eb321a2b23e07dc83fc12289d25305fa065b" } } ] } ``` ```yaml version: "2" plugins: - name: "py" wasm: url: "https://downloads.sqlc.dev/plugin/sqlc-gen-python_1.0.0.wasm" sha256: "aca83e1f59f8ffdc604774c2f6f9eb321a2b23e07dc83fc12289d25305fa065b" ``` ## Migrate each package Your package configuration should currently looks something like this for JSON. ```json "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "python": { "out": "src", "package": "foo", "emit_sync_querier": true, "emit_async_querier": true, "query_parameter_limit": 5 } } } ] ``` Or this if you're using YAML. ```yaml sql: - schema: "schema.sql" queries: "query.sql" engine: "postgresql" gen: python: out: "src" package: "foo" emit_sync_querier: true emit_async_querier: true query_parameter_limit: 5 ``` To use the plugin, you'll need to replace the `gen` mapping with the `codegen` collection. Add the `plugin` field, setting it to `py`. All fields other than `out` need to be moved into the `options` mapping. After you're done, it should look like this for JSON. ```json "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "codegen": [ { "out": "src", "plugin": "py", "options": { "package": "authors", "emit_sync_querier": true, "emit_async_querier": true, "query_parameter_limit": 5 } } ] } ] ``` Or this for YAML. ```yaml sql: - schema: "schema.sql" queries: "query.sql" engine: "postgresql" codegen: - plugin: "py" out: "src" options: package: "foo" emit_sync_querier: true emit_async_querier: true query_parameter_limit: 5 ``` ## Re-generate the code Run `sqlc generate`. The plugin will produce the same output, so you shouldn't see any changes. The first time `sqlc generate` is run, the plugin must be downloaded and compiled, resulting in a slightly longer runtime. Subsequent `generate` calls will be fast. ================================================ FILE: docs/guides/plugins.md ================================================ # Using plugins To use plugins, you must be using [Version 2](../reference/config.md#version-2) of the configuration file. The top-level `plugins` array defines the available plugins. ## WASM plugins > WASM plugins are fully sandboxed; they do not have access to the network, > filesystem, or environment variables. In the `codegen` section, the `out` field dictates what directory will contain the new files. The `plugin` key must reference a plugin defined in the top-level `plugins` map. Any `options` are serialized to a string as JSON and passed on to the plugin itself. ```yaml version: '2' plugins: - name: greeter wasm: url: https://github.com/sqlc-dev/sqlc-gen-greeter/releases/download/v0.1.0/sqlc-gen-greeter.wasm sha256: afc486dac2068d741d7a4110146559d12a013fd0286f42a2fc7dcd802424ad07 sql: - schema: schema.sql queries: query.sql engine: postgresql codegen: - out: gen plugin: greeter options: lang: en-US ``` For a complete working example see the following files: - [sqlc-gen-greeter](https://github.com/sqlc-dev/sqlc-gen-greeter) - A WASM plugin (written in Rust) that outputs a friendly message - [wasm_plugin_sqlc_gen_greeter](https://github.com/sqlc-dev/sqlc/tree/main/internal/endtoend/testdata/wasm_plugin_sqlc_gen_greeter) - An example project showing how to use a WASM plugin ## Process plugins > Process-based plugins offer minimal security. Only use plugins that you > trust. Better yet, only use plugins that you've written yourself. In the `codegen` section, the `out` field dictates what directory will contain the new files. The `plugin` key must reference a plugin defined in the top-level `plugins` map. Any `options` are serialized to a string as JSON and passed on to the plugin itself. ```yaml version: '2' plugins: - name: jsonb process: cmd: sqlc-gen-json sql: - schema: schema.sql queries: query.sql engine: postgresql codegen: - out: gen plugin: jsonb options: indent: " " filename: codegen.json ``` For a complete working example see the following files: - [sqlc-gen-json](https://github.com/sqlc-dev/sqlc/tree/main/cmd/sqlc-gen-json) - 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 By default, plugins do not inherit access to environment variables. Instead, you can configure access on a per-variable basis. For example, if your plugin needs the `PATH` environment variable, add `PATH` to the `env` list in the `plugins` collection. ```yaml version: '2' sql: - schema: schema.sql queries: query.sql engine: postgresql codegen: - out: gen plugin: test plugins: - name: test env: - PATH wasm: url: https://github.com/sqlc-dev/sqlc-gen-test/releases/download/v0.1.0/sqlc-gen-test.wasm sha256: 138220eae508d4b65a5a8cea555edd155eb2290daf576b7a8b96949acfeb3790 ``` A variable named `SQLC_VERSION` is always included in the plugin's environment, set to the version of the `sqlc` executable invoking it. ================================================ FILE: docs/guides/privacy.md ================================================ # Privacy and data collection These days, it feels like every piece of software is tracking you. From your browser, to your phone, to your terminal, programs collect as much data about you as possible and send it off to the cloud for analysis. We believe the best way to keep data safe is to never collect it in the first place. ## Our Privacy Pledge The `sqlc` command line tool does not collect any information. It does not send crash reports to a third-party. It does not gather anonymous aggregate user behaviour analytics. No analytics. No finger-printing. No tracking. Not now and not in the future. ### Distribution Channels We distribute sqlc using popular package managers such as [Homebrew](https://brew.sh/) and [Snapcraft](https://snapcraft.io/). These package managers and their associated command-line tools do collect usage metrics. We use these services to make it easy to for users to install sqlc. There will always be an option to download sqlc from a stable URL. ## Hosted Services We provide a few hosted services in addition to the sqlc command line tool. ### sqlc.dev * Hosted on [GitHub Pages](https://pages.github.com/) * Analytics with [Plausible](https://plausible.io/privacy-focused-web-analytics) ### docs.sqlc.dev * Hosted on [Read the Docs](https://readthedocs.org/) * Analytics with [Plausible](https://plausible.io/privacy-focused-web-analytics) ### play.sqlc.dev * Hosted on [Heroku](https://heroku.com) * Playground data stored in [Google Cloud Storage](https://cloud.google.com/storage) * Automatically deleted after 30 days ### app.sqlc.dev / api.sqlc.dev * Hosted on [Heroku](https://heroku.com) * Error tracking and tracing with [Sentry](https://sentry.io) ================================================ FILE: docs/guides/using-go-and-pgx.rst ================================================ ================ Using Go and pgx ================ .. note:: :code:`pgx/v5` is supported starting from v1.18.0. pgx is a pure Go driver and toolkit for PostgreSQL. It's become the default PostgreSQL package for many Gophers since lib/pq was put into maintenance mode. ^^^^^^^^^^^^^^^ Getting started ^^^^^^^^^^^^^^^ To start generating code that uses pgx, set the :code:`sql_package` field in your :code:`sqlc.yaml` configuration file. Valid options are :code:`pgx/v4` or :code:`pgx/v5` .. code-block:: yaml version: "2" sql: - engine: "postgresql" queries: "query.sql" schema: "query.sql" gen: go: package: "db" sql_package: "pgx/v5" out: "db" If you don't have an existing sqlc project on hand, create a directory with the configuration file above and the following :code:`query.sql` file. .. code-block:: sql CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); -- 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; Generating the code will now give you pgx-compatible database access methods. .. code-block:: bash sqlc generate ^^^^^^^^^^^^^^^^^^^^^^^^^^ Generated code walkthrough ^^^^^^^^^^^^^^^^^^^^^^^^^^ The generated code is very similar to the code generated when using :code:`lib/pq`. However, instead of using :code:`database/sql`, the code uses pgx types directly. .. code-block:: go package main import ( "context" "fmt" "os" "github.com/jackc/pgx/v5" "example.com/sqlc-tutorial/db" ) func main() { // urlExample := "postgres://username:password@localhost:5432/database_name" conn, err := pgx.Connect(context.Background(), os.Getenv("DATABASE_URL")) if err != nil { fmt.Fprintf(os.Stderr, "Unable to connect to database: %v\n", err) os.Exit(1) } defer conn.Close(context.Background()) q := db.New(conn) author, err := q.GetAuthor(context.Background(), 1) if err != nil { fmt.Fprintf(os.Stderr, "GetAuthor failed: %v\n", err) os.Exit(1) } 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 } ================================================ FILE: docs/howto/ci-cd.md ================================================ # 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 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 schema. They also might edit generated code. `sqlc diff` will catch both errors by comparing the expected output from `sqlc generate` to what's on disk. ```diff % sqlc diff --- a/postgresql/query.sql.go +++ b/postgresql/query.sql.go @@ -55,7 +55,7 @@ const listAuthors = `-- name: ListAuthors :many SELECT id, name, bio FROM authors -ORDER BY name +ORDER BY bio ` ``` `sqlc vet` runs a set of lint rules against your SQL queries. These rules are 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 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 three steps in your pipeline for `sqlc diff`, `sqlc vet`, and `sqlc verify`. Run `sqlc push` after merge on your `main` branch. ## GitHub Actions We provide the [setup-sqlc](https://github.com/marketplace/actions/setup-sqlc) GitHub Action to install `sqlc`. The action uses the built-in [tool-cache](https://github.com/actions/toolkit/blob/main/packages/tool-cache/README.md) to speed up the installation process. ### diff The following GitHub Workflow configuration runs `sqlc diff` on every push. ```yaml name: sqlc on: [push] jobs: diff: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: sqlc-dev/setup-sqlc@v3 with: sqlc-version: '1.30.0' - run: sqlc diff ``` ### vet The following GitHub Workflow configuration runs [sqlc vet](vet.md) on every push. You can use `sqlc vet` without a database connection, but you'll need one if your `sqlc` configuration references the built-in `sqlc/db-prepare` lint rule. ```yaml name: sqlc on: [push] jobs: vet: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: sqlc-dev/setup-sqlc@v3 with: sqlc-version: '1.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 ``` ### push ```{note} Pushing a project 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 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: 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.30.0' - run: sqlc push env: SQLC_AUTH_TOKEN: ${{ secrets.SQLC_AUTH_TOKEN }} ``` ### verify ```{note} Verify database migrations is powered by [sqlc Cloud](https://dashboard.sqlc.dev). Sign up for [free](https://dashboard.sqlc.dev) today. ``` ```yaml name: sqlc on: [push] jobs: verify: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: sqlc-dev/setup-sqlc@v3 with: 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 }} `````` ================================================ FILE: docs/howto/ddl.md ================================================ # Modifying the database schema sqlc parses `CREATE TABLE` and `ALTER TABLE` statements in order to generate the necessary code. ```sql CREATE TABLE authors ( id SERIAL PRIMARY KEY, birth_year int NOT NULL ); ALTER TABLE authors ADD COLUMN bio text NOT NULL; ALTER TABLE authors DROP COLUMN birth_year; ALTER TABLE authors RENAME TO writers; ``` ```go package db type Writer struct { ID int Bio string } ``` ## Handling SQL migrations sqlc does not perform database migrations for you. However, sqlc is able to differentiate between up and down migrations. sqlc ignores down migrations when parsing SQL files. sqlc supports parsing migrations from the following tools: - [atlas](https://github.com/ariga/atlas) - [dbmate](https://github.com/amacneil/dbmate) - [golang-migrate](https://github.com/golang-migrate/migrate) - [goose](https://github.com/pressly/goose) - [sql-migrate](https://github.com/rubenv/sql-migrate) - [tern](https://github.com/jackc/tern) To enable migration parsing, specify the migration directory instead of a schema file: ```yaml version: "2" sql: - engine: "postgresql" queries: "query.sql" schema: "db/migrations" gen: go: package: "tutorial" out: "tutorial" ``` ### atlas ```sql -- Create "post" table CREATE TABLE "public"."post" ("id" integer NOT NULL, "title" text NULL, "body" text NULL, PRIMARY KEY ("id")); ``` ```go package db type Post struct { ID int Title sql.NullString Body sql.NullString } ``` ### dbmate ```sql -- migrate:up CREATE TABLE foo (bar INT NOT NULL); -- migrate:down DROP TABLE foo; ``` ```go package db type Foo struct { Bar int32 } ``` ### golang-migrate **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. ``` 1_initial.up.sql ... 9_foo.up.sql # this migration file will be parsed BEFORE 9_foo 10_bar.up.sql ``` This worked as intended. ``` 001_initial.up.sql ... 009_foo.up.sql 010_bar.up.sql ``` In `20060102.up.sql`: ```sql 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 Post struct { ID int Title sql.NullString Body sql.NullString } ``` ### goose **Warning:** 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. This doesn't work as intended. ``` 1_initial.sql ... 9_foo.sql # this migration file will be parsed BEFORE 9_foo 10_bar.sql ``` This worked as intended. ``` 001_initial.sql ... 009_foo.sql 010_bar.sql ``` ```sql -- +goose Up CREATE TABLE post ( id int NOT NULL, title text, body text, PRIMARY KEY(id) ); -- +goose Down DROP TABLE post; ``` ```go package db type Post struct { ID int Title sql.NullString Body sql.NullString } ``` ### sql-migrate ```sql -- +migrate Up -- SQL in section 'Up' is executed when this migration is applied CREATE TABLE people (id int); -- +migrate Down -- SQL section 'Down' is executed when this migration is rolled back DROP TABLE people; ``` ```go package db 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 } ``` ================================================ FILE: docs/howto/delete.md ================================================ # Deleting rows ```sql 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 import ( "context" "database/sql" ) type DBTX interface { ExecContext(context.Context, string, ...interface{}) (sql.Result, error) } func New(db DBTX) *Queries { return &Queries{db: db} } type Queries struct { db DBTX } const deleteAuthor = `-- name: DeleteAuthor :exec DELETE FROM authors WHERE id = $1 ` func (q *Queries) DeleteAuthor(ctx context.Context, id int) error { _, err := q.db.ExecContext(ctx, deleteAuthor, id) return err } ``` ================================================ FILE: docs/howto/embedding.md ================================================ #### Embedding structs Embedding allows you to reuse existing model structs in more queries, resulting in less manual serialization work. First, imagine we have the following schema with students and test scores. ```sql CREATE TABLE students ( id bigserial PRIMARY KEY, name text NOT NULL, age integer NOT NULL ); CREATE TABLE test_scores ( student_id bigint NOT NULL, score integer NOT NULL, grade text NOT NULL ); ``` We want to select the student record and the scores they got on a test. Here's how we'd usually do that: ```sql -- name: ScoreAndTests :many SELECT students.*, test_scores.* FROM students JOIN test_scores ON test_scores.student_id = students.id WHERE students.id = $1; ``` When using Go, sqlc will produce a struct like this: ```go type ScoreAndTestsRow struct { ID int64 Name string Age int32 StudentID int64 Score int32 Grade string } ``` With embedding, the struct will contain a model for both tables instead of a flattened list of columns. ```sql -- name: ScoreAndTests :many SELECT sqlc.embed(students), sqlc.embed(test_scores) FROM students JOIN test_scores ON test_scores.student_id = students.id WHERE students.id = $1; ``` ``` type ScoreAndTestsRow struct { Student Student TestScore TestScore } ``` ================================================ FILE: docs/howto/generate.md ================================================ # `generate` - Generating code `sqlc generate` parses SQL, analyzes the results, and outputs code. Your schema and queries are stored in separate SQL files. The paths to these files live in a `sqlc.yaml` configuration file. ```yaml version: "2" sql: - engine: "postgresql" queries: "query.sql" schema: "schema.sql" gen: go: package: "tutorial" out: "tutorial" sql_package: "pgx/v5" ``` We've written extensive docs on [retrieving](select.md), [inserting](insert.md), [updating](update.md), and [deleting](delete.md) rows. By default, sqlc runs its analysis using a built-in query analysis engine. While fast, this engine can't handle some complex queries and type-inference. You can configure sqlc to use a database connection for enhanced analysis using metadata from that database. The database-backed analyzer currently supports PostgreSQL, with [MySQL](https://github.com/sqlc-dev/sqlc/issues/2902) and [SQLite](https://github.com/sqlc-dev/sqlc/issues/2903) support planned in the future. ## Enhanced analysis with managed databases With [managed databases](managed-databases.md) configured, `generate` will automatically create a hosted ephemeral database with your schema and use that database to improve its query analysis. And sqlc will cache its analysis locally on a per-query basis to speed up future `generate` runs. This saves you the trouble of running and maintaining a database with an up-to-date schema. Here's a minimal working configuration: ```yaml version: "2" servers: - engine: postgresql uri: "postgres://locahost:5432/postgres?sslmode=disable" sql: - engine: "postgresql" queries: "query.sql" schema: "schema.sql" database: managed: true gen: go: out: "db" sql_package: "pgx/v5" ``` ## Enhanced analysis using your own database You can opt-in to database-backed analysis using your own database, by providing a `uri` in your sqlc [database](../reference/config.md#database) configuration. The `uri` string can contain references to environment variables using the `${...}` syntax. In the following example, the connection string will have the value of the `PG_PASSWORD` environment variable set as its password. ```yaml version: "2" sql: - engine: "postgresql" queries: "query.sql" schema: "schema.sql" database: uri: "postgres://postgres:${PG_PASSWORD}@localhost:5432/postgres" gen: go: out: "db" sql_package: "pgx/v5" ``` Databases configured with a `uri` must have an up-to-date schema for query analysis to work correctly, and `sqlc` does not apply schema migrations your database. Use your migration tool of choice to create the necessary tables and objects before running `sqlc generate`. ================================================ FILE: docs/howto/insert.md ================================================ # Inserting rows ```sql 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 import ( "context" "database/sql" ) type DBTX interface { ExecContext(context.Context, string, ...interface{}) (sql.Result, error) } func New(db DBTX) *Queries { return &Queries{db: db} } type Queries struct { db DBTX } const createAuthor = `-- name: CreateAuthor :exec INSERT INTO authors (bio) VALUES ($1) ` func (q *Queries) CreateAuthor(ctx context.Context, bio string) error { _, err := q.db.ExecContext(ctx, createAuthor, bio) return err } ``` ## Returning columns from inserted rows sqlc has full support for the `RETURNING` statement. ```sql -- Example queries for sqlc CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ``` **PostgreSQL:** ```sql -- name: CreateAuthor :one INSERT INTO authors ( name, bio ) VALUES ( $1, $2 ) RETURNING *; -- name: CreateAuthorAndReturnId :one INSERT INTO authors ( name, bio ) VALUES ( $1, $2 ) 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 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 createAuthorAndReturnId = `-- name: CreateAuthorAndReturnId :one INSERT INTO authors ( name, bio ) VALUES ( $1, $2 ) RETURNING id ` type CreateAuthorAndReturnIdParams struct { Name string Bio sql.NullString } func (q *Queries) CreateAuthorAndReturnId(ctx context.Context, arg CreateAuthorAndReturnIdParams) (int64, error) { row := q.db.QueryRowContext(ctx, createAuthorAndReturnId, arg.Name, arg.Bio) var id int64 err := row.Scan(&id) return id, err } ``` ## Using CopyFrom ### PostgreSQL PostgreSQL supports the [COPY protocol](https://www.postgresql.org/docs/current/sql-copy.html) that can insert rows a lot faster than sequential inserts. You can use this easily with sqlc: ```sql CREATE TABLE authors ( id SERIAL PRIMARY KEY, name text NOT NULL, bio text NOT NULL ); -- name: CreateAuthors :copyfrom INSERT INTO authors (name, bio) VALUES ($1, $2); ``` ```go type CreateAuthorsParams struct { Name string Bio string } func (q *Queries) CreateAuthors(ctx context.Context, arg []CreateAuthorsParams) (int64, error) { ... } ``` The `:copyfrom` command requires either `pgx/v4` or `pgx/v5`. ```yaml version: "2" sql: - engine: "postgresql" queries: "query.sql" schema: "query.sql" gen: go: package: "db" sql_package: "pgx/v5" out: "db" ``` ### MySQL MySQL supports a similar feature using [LOAD DATA](https://dev.mysql.com/doc/refman/8.0/en/load-data.html). 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 necessary. Check the [error handling](https://dev.mysql.com/doc/refman/8.0/en/load-data.html#load-data-error-handling) documentation for more information. ```sql CREATE TABLE foo (a text, b integer, c DATETIME, d DATE); -- name: InsertValues :copyfrom INSERT INTO foo (a, b, c, d) VALUES (?, ?, ?, ?); ``` ```go func (q *Queries) InsertValues(ctx context.Context, arg []InsertValuesParams) (int64, error) { ... } ``` The `:copyfrom` command requires setting the `sql_package` and `sql_driver` options. ```yaml version: "2" sql: - engine: "mysql" queries: "query.sql" schema: "query.sql" gen: go: package: "db" sql_package: "database/sql" sql_driver: "github.com/go-sql-driver/mysql" out: "db" ``` ================================================ FILE: docs/howto/managed-databases.md ================================================ # Managed databases *Added in v1.22.0* `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.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. ## 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`. Access to a running database server is required. Add a connection string to the `servers` mapping. ```yaml version: '2' servers: - engine: postgresql uri: "postgres://localhost:5432/postgres?sslmode=disable" sql: - schema: schema.sql queries: query.sql engine: postgresql database: managed: true ``` An environment variable can also be used via the `${}` syntax. ```yaml version: '2' servers: - engine: postgresql uri: ${DATABASE_URI} sql: - schema: schema.sql queries: query.sql engine: postgresql database: managed: true ``` ## Improving codegen Without a database connection, sqlc does its best to parse, analyze and compile your queries just using the schema you pass it and what it knows about the various database engines it supports. In many cases this works just fine, but for more advanced queries sqlc might not have enough information to produce good code. With managed databases configured, `sqlc generate` will automatically create a hosted ephemeral database with your schema and use that database to improve its query analysis. And sqlc will cache its analysis locally on a per-query basis to speed up future codegen runs. Here's a minimal working configuration: ```yaml version: '2' servers: - engine: postgresql uri: "postgres://localhost:5432/postgres?sslmode=disable" sql: - schema: schema.sql queries: query.sql engine: postgresql database: managed: true gen: go: out: "db" ``` ## Linting queries With managed databases configured, `sqlc vet` will 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.md#rules-using-explain-output). If you don't yet have any vet rules, the [built-in sqlc/db-prepare rule](vet.md#sqlc-db-prepare) 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' servers: - engine: postgresql uri: "postgres://localhost:5432/postgres?sslmode=disable" sql: - schema: schema.sql queries: query.sql engine: postgresql database: managed: true rules: - sqlc/db-prepare ``` ================================================ FILE: docs/howto/named_parameters.md ================================================ # Naming parameters 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: ```sql -- name: UpsertAuthorName :one UPDATE author SET name = CASE WHEN $1::bool THEN $2::text ELSE name END RETURNING *; ``` ```go type UpdateAuthorNameParams struct { Column1 bool `json:""` Column2_2 string `json:"_2"` } ``` In these cases, named parameters give you the control over field names on the Params struct. ```sql -- name: UpsertAuthorName :one UPDATE author SET name = CASE WHEN sqlc.arg(set_name)::bool THEN sqlc.arg(name)::text ELSE name END RETURNING *; ``` ```go type UpdateAuthorNameParams struct { SetName bool `json:"set_name"` Name string `json:"name"` } ``` 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 SET name = CASE WHEN @set_name::bool THEN @name::text ELSE name END RETURNING *; ``` ## Nullable parameters sqlc infers the nullability of any specified parameters, and often does exactly what you want. If you want finer control over the nullability of your parameters, you may use `sqlc.narg()` (**n**ullable arg) to override the default behavior. Using `sqlc.narg` tells sqlc to ignore whatever nullability it has inferred and generate a nullable parameter instead. There is no nullable equivalent of the `@` syntax. Here is an example that uses a single query to allow updating an author's name, bio or both. ```sql -- name: UpdateAuthor :one UPDATE author SET name = coalesce(sqlc.narg('name'), name), bio = coalesce(sqlc.narg('bio'), bio) WHERE id = sqlc.arg('id') RETURNING *; ``` The following code is generated: ```go type UpdateAuthorParams struct { Name sql.NullString Bio sql.NullString ID int64 } ``` ================================================ FILE: docs/howto/overrides.md ================================================ # Overriding types :::{note} Type overrides and field renaming are only fully-supported for Go. ::: 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" sql: - schema: "postgresql/schema.sql" queries: "postgresql/query.sql" engine: "postgresql" gen: go: package: "authors" out: "db" sql_package: "pgx/v5" overrides: - db_type: "uuid" nullable: true go_type: import: "github.com/google/uuid" type: "UUID" - column: "users.birthday" go_type: "time.Time" ``` :::{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`: - 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`: - 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`: - 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 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`, 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} When generating code, `column` override configurations take precedence over `db_type` configurations. ::: ### The `go_type` map 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. - `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 `true`, generated code will use a pointer to the type rather than the type itself. - `slice`: - If `true`, generated code will use a slice of the type rather than the type itself. An example: ```yaml version: "2" sql: - schema: "postgresql/schema.sql" queries: "postgresql/query.sql" engine: "postgresql" gen: go: package: "authors" out: "db" sql_package: "pgx/v5" overrides: - db_type: "uuid" go_type: import: "a/b/v2" package: "b" type: "MyType" pointer: true ``` ## 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" ``` ================================================ FILE: docs/howto/prepared_query.md ================================================ # Preparing queries If you're using `pgx/v5` you get its [implicit support](https://github.com/jackc/pgx/wiki/Automatic-Prepared-Statement-Caching) for prepared statements. No additional `sqlc` configuration is required. For other drivers, `sqlc` can give you the option to explicitly use prepared queries. These prepared queries also work with transactions. You'll need to set `emit_prepared_queries` to `true` in your `sqlc` configuration to generate code similar to the example below. ```sql CREATE TABLE records ( id SERIAL PRIMARY KEY ); -- name: GetRecord :one SELECT * FROM records WHERE id = $1; ``` ```go package db import ( "context" "database/sql" "fmt" ) type Record struct { ID int32 } type DBTX interface { PrepareContext(context.Context, string) (*sql.Stmt, error) QueryRowContext(context.Context, string, ...interface{}) *sql.Row } func New(db DBTX) *Queries { return &Queries{db: db} } func Prepare(ctx context.Context, db DBTX) (*Queries, error) { q := Queries{db: db} var err error if q.getRecordStmt, err = db.PrepareContext(ctx, getRecord); err != nil { return nil, fmt.Errorf("error preparing query GetRecord: %w", err) } return &q, nil } func (q *Queries) queryRow(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) *sql.Row { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).QueryRowContext(ctx, args...) case stmt != nil: return stmt.QueryRowContext(ctx, args...) default: return q.db.QueryRowContext(ctx, query, args...) } } type Queries struct { db DBTX tx *sql.Tx getRecordStmt *sql.Stmt } func (q *Queries) WithTx(tx *sql.Tx) *Queries { return &Queries{ db: tx, tx: tx, getRecordStmt: q.getRecordStmt, } } const getRecord = `-- name: GetRecord :one SELECT id FROM records WHERE id = $1 ` func (q *Queries) GetRecord(ctx context.Context, id int32) (int32, error) { row := q.queryRow(ctx, q.getRecordStmt, getRecord, id) err := row.Scan(&id) return id, err } ``` ================================================ FILE: docs/howto/push.md ================================================ # `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 ``` ================================================ FILE: docs/howto/query_count.md ================================================ # Counting rows ```sql CREATE TABLE authors ( id SERIAL PRIMARY KEY, hometown text NOT NULL ); -- name: CountAuthors :one SELECT count(*) FROM authors; -- name: CountAuthorsByTown :many SELECT hometown, count(*) FROM authors GROUP BY 1 ORDER BY 1; ``` ```go package db import ( "context" "database/sql" ) type DBTX interface { 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 } const countAuthors = `-- name: CountAuthors :one SELECT count(*) FROM authors ` func (q *Queries) CountAuthors(ctx context.Context) (int, error) { row := q.db.QueryRowContext(ctx, countAuthors) var i int err := row.Scan(&i) return i, err } const countAuthorsByTown = `-- name: CountAuthorsByTown :many SELECT hometown, count(*) FROM authors GROUP BY 1 ORDER BY 1 ` type CountAuthorsByTownRow struct { Hometown string Count int } func (q *Queries) CountAuthorsByTown(ctx context.Context) ([]CountAuthorsByTownRow, error) { rows, err := q.db.QueryContext(ctx, countAuthorsByTown) if err != nil { return nil, err } defer rows.Close() items := []CountAuthorsByTownRow{} for rows.Next() { var i CountAuthorsByTownRow if err := rows.Scan(&i.Hometown, &i.Count); 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 } ``` ================================================ FILE: docs/howto/rename.md ================================================ # Renaming fields Struct field names are generated from column names using a simple algorithm: split the column name on underscores and capitalize the first letter of each part. ``` account -> Account spotify_url -> SpotifyUrl app_id -> AppID ``` If you're not happy with a field's generated name, use the `rename` mapping to pick a new name. The keys are column names and the values are the struct field name to use. ```yaml version: "2" sql: - schema: "postgresql/schema.sql" queries: "postgresql/query.sql" engine: "postgresql" gen: go: package: "authors" out: "postgresql" rename: spotify_url: "SpotifyURL" ``` ## 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 and the `book_publishers` table will generate a `BookPublisher` struct. ```sql CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); CREATE TABLE book_publishers ( id BIGSERIAL PRIMARY KEY, name text NOT NULL ); ``` ```go package db import ( "database/sql" ) type Author struct { ID int64 Name string Bio sql.NullString } type Publisher struct { ID int64 Name string } ``` 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' packages: - path: db engine: postgresql schema: query.sql 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 package db import ( "database/sql" ) type Writer struct { ID int64 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. ================================================ FILE: docs/howto/select.md ================================================ # Retrieving rows To generate a database access method, annotate a query with a specific comment. ```sql CREATE TABLE authors ( id SERIAL PRIMARY KEY, 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; -- name: ListAuthors :many 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. The database access methods are added to a `Queries` struct, which is created using the `New` method. Note that the `*` in our query has been replaced with explicit column names. This change ensures that the query will never return unexpected data. Our query was annotated with `:one`, meaning that it should only return a single row. We scan the data from that one into a `Author` struct. Since the get query has a single parameter, the `GetAuthor` method takes a single `int` as an argument. Since the list query has no parameters, the `ListAuthors` method accepts no arguments. ```go package db import ( "context" "database/sql" ) type Author struct { ID int Bio string BirthYear int } type DBTX interface { 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 } const getAuthor = `-- name: GetAuthor :one SELECT id, bio, birth_year FROM authors WHERE id = $1 ` func (q *Queries) GetAuthor(ctx context.Context, id int) (Author, error) { row := q.db.QueryRowContext(ctx, getAuthor, id) var i Author err := row.Scan(&i.ID, &i.Bio, &i.BirthYear) return i, err } const listAuthors = `-- name: ListAuthors :many SELECT id, bio, birth_year FROM authors ORDER BY id ` 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.Bio, &i.BirthYear); 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 } ``` ## Selecting columns ```sql CREATE TABLE authors ( id SERIAL PRIMARY KEY, bio text NOT NULL, birth_year int NOT NULL ); -- name: GetBioForAuthor :one SELECT bio FROM authors WHERE id = $1; -- name: GetInfoForAuthor :one SELECT bio, birth_year FROM authors WHERE id = $1; ``` 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`. When selecting multiple columns, a row record (method-specific struct) is returned. In this case, `GetInfoForAuthor` returns a struct with two fields: `Bio` and `BirthYear`. If a query result has no row records, a zero value and an `ErrNoRows` error are returned instead of a zero value and `nil`. For instance, when the `GetBioForAuthor` result has no rows, it will return `""` and `ErrNoRows`. ```go package db import ( "context" "database/sql" ) type DBTX interface { QueryRowContext(context.Context, string, ...interface{}) *sql.Row } func New(db DBTX) *Queries { return &Queries{db: db} } type Queries struct { db DBTX } const getBioForAuthor = `-- name: GetBioForAuthor :one SELECT bio FROM authors WHERE id = $1 ` func (q *Queries) GetBioForAuthor(ctx context.Context, id int) (string, error) { row := q.db.QueryRowContext(ctx, getBioForAuthor, id) var i string err := row.Scan(&i) return i, err } const getInfoForAuthor = `-- name: GetInfoForAuthor :one SELECT bio, birth_year FROM authors WHERE id = $1 ` type GetInfoForAuthorRow struct { Bio string BirthYear int } func (q *Queries) GetInfoForAuthor(ctx context.Context, id int) (GetInfoForAuthorRow, error) { row := q.db.QueryRowContext(ctx, getInfoForAuthor, id) var i GetInfoForAuthorRow err := row.Scan(&i.Bio, &i.BirthYear) return i, err } ``` ## Passing a slice as a parameter to a query ### PostgreSQL In PostgreSQL, [ANY](https://www.postgresql.org/docs/current/functions-comparisons.html#id-1.5.8.28.16) allows you to check if a value exists in an array expression. Queries using ANY with a single parameter will generate method signatures with slices as arguments. Use the postgres data types, eg: int, varchar, etc. ```sql CREATE TABLE authors ( id SERIAL PRIMARY KEY, bio text NOT NULL, birth_year int NOT NULL ); -- name: ListAuthorsByIDs :many SELECT * FROM authors WHERE id = ANY($1::int[]); ``` The above SQL will generate the following code: ```go package db import ( "context" "database/sql" "github.com/lib/pq" ) type Author struct { ID int Bio string BirthYear int } type DBTX interface { 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 } const listAuthors = `-- name: ListAuthorsByIDs :many SELECT id, bio, birth_year FROM authors WHERE id = ANY($1::int[]) ` func (q *Queries) ListAuthorsByIDs(ctx context.Context, ids []int) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthors, pq.Array(ids)) 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.Bio, &i.BirthYear); 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 } ``` ### MySQL and SQLite MySQL and SQLite differ from PostgreSQL in that placeholders must be generated based on the number of elements in the slice you pass in. Though trivial it is still something of a nuisance. The passed in slice must not be nil or empty or an error will be returned (ie not a panic). The placeholder insertion location is marked by the meta-function `sqlc.slice()` (which is similar to `sqlc.arg()` that you see documented under [Naming parameters](named_parameters.md)). To rephrase, the `sqlc.slice('param')` behaves identically to `sqlc.arg()` it terms of how it maps the explicit argument to the function signature, eg: * `sqlc.slice('ids')` maps to `ids []GoType` in the function signature * `sqlc.slice(cust_ids)` maps to `custIds []GoType` in the function signature (like `sqlc.arg()`, the parameter does not have to be quoted) This feature is not compatible with `emit_prepared_queries` statement found in the [Configuration file](../reference/config.md). ```sql CREATE TABLE authors ( id SERIAL PRIMARY KEY, bio text NOT NULL, birth_year int NOT NULL ); -- name: ListAuthorsByIDs :many SELECT * FROM authors WHERE id IN (sqlc.slice('ids')); ``` The above SQL will generate the following code: ```go package db import ( "context" "database/sql" "fmt" "strings" ) type Author struct { ID int Bio string BirthYear int } 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, } } const listAuthorsByIDs = `-- name: ListAuthorsByIDs :many SELECT id, bio, birth_year FROM authors WHERE id IN (/*SLICE:ids*/?) ` func (q *Queries) ListAuthorsByIDs(ctx context.Context, ids []int64) ([]Author, error) { sql := listAuthorsByIDs var queryParams []interface{} if len(ids) == 0 { return nil, fmt.Errorf("slice ids must have at least one element") } for _, v := range ids { queryParams = append(queryParams, v) } sql = strings.Replace(sql, "/*SLICE:ids*/?", strings.Repeat(",?", len(ids))[1:], 1) rows, err := q.db.QueryContext(ctx, sql, queryParams...) 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.Bio, &i.BirthYear); 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 } ``` ================================================ FILE: docs/howto/structs.md ================================================ # Configuring generated structs ## Naming scheme Structs generated from tables will attempt to use the singular form of a table name if the table name is pluralized. ```sql CREATE TABLE authors ( id SERIAL PRIMARY KEY, name text NOT NULL ); ``` ```go package db // Struct names use the singular form of table names type Author struct { ID int Name string } ``` ## JSON tags ```sql CREATE TABLE authors ( id SERIAL PRIMARY KEY, created_at timestamp NOT NULL ); ``` sqlc can generate structs with JSON tags by adding the `emit_json_tags` key to the configuration file as it shows on [configuration reference](../reference/config.md). The JSON name for a field matches the column name in the database. ```go package db import ( "time" ) type Author struct { ID int `json:"id"` CreatedAt time.Time `json:"created_at"` } ``` ## More control See the guide to [Overriding types](./overrides.md) for fine-grained control over struct field types and tags. ================================================ FILE: docs/howto/transactions.md ================================================ # Using transactions In the code generated by sqlc, the `WithTx` method allows a `Queries` instance to be associated with a transaction. For example, with the following SQL structure: `schema.sql`: ```sql CREATE TABLE records ( id SERIAL PRIMARY KEY, counter INT NOT NULL ); ``` `query.sql` ```sql -- name: GetRecord :one SELECT * FROM records WHERE id = $1; -- name: UpdateRecord :exec UPDATE records SET counter = $2 WHERE id = $1; ``` And the generated code from sqlc in `db.go`: ```go package tutorial 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, } } ``` 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 { return err } defer tx.Rollback() 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() } // 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) } ``` ================================================ FILE: docs/howto/update.md ================================================ # Updating rows ```sql CREATE TABLE authors ( id SERIAL PRIMARY KEY, bio text NOT NULL ); ``` ## Single parameter 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 import ( "context" "database/sql" ) type DBTX interface { ExecContext(context.Context, string, ...interface{}) (sql.Result, error) } func New(db DBTX) *Queries { return &Queries{db: db} } type Queries struct { db DBTX } const updateAuthorBios = `-- name: UpdateAuthorBios :exec UPDATE authors SET bio = $1 ` func (q *Queries) UpdateAuthorBios(ctx context.Context, bio string) error { _, err := q.db.ExecContext(ctx, updateAuthorBios, bio) return err } ``` ## Multiple parameters 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 import ( "context" "database/sql" ) type DBTX interface { ExecContext(context.Context, string, ...interface{}) (sql.Result, error) } func New(db DBTX) *Queries { return &Queries{db: db} } type Queries struct { db DBTX } const updateAuthor = `-- name: UpdateAuthor :exec UPDATE authors SET bio = $2 WHERE id = $1 ` type UpdateAuthorParams struct { ID int32 Bio string } func (q *Queries) UpdateAuthor(ctx context.Context, arg UpdateAuthorParams) error { _, err := q.db.ExecContext(ctx, updateAuthor, arg.ID, arg.Bio) return err } ``` ================================================ FILE: docs/howto/verify.md ================================================ # `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] ``` ================================================ FILE: docs/howto/vet.md ================================================ # `vet` - Linting queries *Added in v1.19.0* `sqlc vet` runs queries through a set of lint rules. Rules are defined in the `sqlc` [configuration](../reference/config) file. They consist of a name, message, and a [Common Expression Language (CEL)](https://github.com/google/cel-spec) expression. Expressions are evaluated using [cel-go](https://github.com/google/cel-go). If an expression evaluates to `true`, `sqlc vet` will report an error using the given message. ## Defining lint rules Each lint rule's CEL expression has access to information from your sqlc configuration and queries via variables defined in the following proto messages. ```proto message Config { string version = 1; string engine = 2 ; repeated string schema = 3; repeated string queries = 4; } message Query { // SQL body string sql = 1; // Name of the query string name = 2; // One of "many", "one", "exec", etc. string cmd = 3; // Query parameters, if any repeated Parameter params = 4; } message Parameter { int32 number = 1; } ``` In addition to this basic information, when you have a PostgreSQL or MySQL [database connection configured](../reference/config.md#database) each CEL expression has access to the output from running `EXPLAIN ...` on your query via the `postgresql.explain` and `mysql.explain` variables. This output is quite complex and depends on the structure of your query but sqlc attempts to parse and provide as much information as it can. See [Rules using `EXPLAIN ...` output](#rules-using-explain-output) for more information. Here are a few example rules just using the basic configuration and query information available to the CEL expression environment. While these examples are simplistic, they give you a flavor of the types of rules you can write. ```yaml version: 2 sql: - schema: "query.sql" queries: "query.sql" engine: "postgresql" gen: go: package: "authors" out: "db" rules: - no-pg - no-delete - only-one-param - no-exec rules: - name: no-pg message: "invalid engine: postgresql" rule: | config.engine == "postgresql" - name: no-delete message: "don't use delete statements" rule: | query.sql.contains("DELETE") - name: only-one-param message: "too many parameters" rule: | query.params.size() > 1 - name: no-exec message: "don't use exec" rule: | query.cmd == "exec" ``` ### Rules using `EXPLAIN ...` output *Added in v1.20.0* The CEL expression environment has two variables containing `EXPLAIN ...` output, `postgresql.explain` and `mysql.explain`. `sqlc` only populates the variable associated with your configured database engine, and only when you have a [database connection configured](../reference/config.md#database). For the `postgresql` engine, `sqlc` runs ```sql EXPLAIN (ANALYZE false, VERBOSE, COSTS, SETTINGS, BUFFERS, FORMAT JSON) ... ``` where `"..."` is your query string, and parses the output into a [`PostgreSQLExplain`](https://buf.build/sqlc/sqlc/docs/v1.20.0:vet#vet.PostgreSQLExplain) proto message. For the `mysql` engine, `sqlc` runs ```sql EXPLAIN FORMAT=JSON ... ``` where `"..."` is your query string, and parses the output into a [`MySQLExplain`](https://buf.build/sqlc/sqlc/docs/v1.20.0:vet#vet.MySQLExplain) proto message. These proto message definitions are too long to include here, but you can find them in the `protos` directory within the `sqlc` source tree. The output from `EXPLAIN ...` depends on the structure of your query so it's a bit difficult to offer generic examples. Refer to the [PostgreSQL documentation](https://www.postgresql.org/docs/current/using-explain.html) and [MySQL documentation](https://dev.mysql.com/doc/refman/en/explain-output.html) for more information. ```yaml ... rules: - name: postgresql-query-too-costly message: "Query cost estimate is too high" rule: "postgresql.explain.plan.total_cost > 1.0" - name: postgresql-no-seq-scan message: "Query plan results in a sequential scan" rule: "postgresql.explain.plan.node_type == 'Seq Scan'" - name: mysql-query-too-costly message: "Query cost estimate is too high" rule: "has(mysql.explain.query_block.cost_info) && double(mysql.explain.query_block.cost_info.query_cost) > 2.0" - name: mysql-must-use-primary-key message: "Query plan doesn't use primary key" rule: "has(mysql.explain.query_block.table.key) && mysql.explain.query_block.table.key != 'PRIMARY'" ``` When building rules that depend on `EXPLAIN ...` output, it may be helpful to see the actual JSON returned from the database. `sqlc` will print it When you set the environment variable `SQLCDEBUG=dumpexplain=1`. Use this environment variable together with a dummy rule to see `EXPLAIN ...` output for all of your queries. ```yaml version: 2 sql: - schema: "query.sql" queries: "query.sql" engine: "postgresql" database: uri: "postgresql://postgres:postgres@localhost:5432/postgres" gen: go: package: "db" out: "db" rules: - debug rules: - name: debug rule: "!has(postgresql.explain)" # A dummy rule to trigger explain ``` Please note that databases configured with a `uri` must have an up-to-date schema for `vet` to work correctly, and `sqlc` does not apply schema migrations to your database. Use your migration tool of choice to create the necessary tables and objects before running `sqlc vet` with rules that depend on `EXPLAIN ...` output. Alternatively, configure [managed databases](managed-databases.md) to have `sqlc` create hosted ephemeral databases with the correct schema automatically. ## Built-in rules ### sqlc/db-prepare When a [database](../reference/config.md#database) connection is configured, you can run the built-in `sqlc/db-prepare` rule. This rule will attempt to prepare each of your queries against the connected database and report any failures. ```yaml version: 2 sql: - schema: "schema.sql" queries: "query.sql" engine: "postgresql" gen: go: package: "authors" out: "db" database: uri: "postgresql://postgres:password@localhost:5432/postgres" rules: - sqlc/db-prepare ``` Please note that databases configured with a `uri` must have an up-to-date schema for `vet` to work correctly, and `sqlc` does not apply schema migrations to your database. Use your migration tool of choice to create the necessary tables and objects before running `sqlc vet` with the `sqlc/db-prepare` rule. Alternatively, configure [managed databases](managed-databases.md) to have `sqlc` create hosted ephemeral databases with the correct schema automatically. ```yaml version: 2 cloud: project: "" sql: - schema: "schema.sql" queries: "query.sql" engine: "postgresql" gen: go: package: "authors" out: "db" database: managed: true rules: - sqlc/db-prepare ``` To see this in action, check out the [authors example](https://github.com/sqlc-dev/sqlc/blob/main/examples/authors/sqlc.yaml). ## Running lint rules When you add the name of a defined rule to the rules list for a [sql package](../reference/config.md#sql), `sqlc vet` will evaluate that rule against every query in the package. In the example below, two rules are defined but only one is enabled. ```yaml version: 2 sql: - schema: "query.sql" queries: "query.sql" engine: "postgresql" gen: go: package: "authors" out: "db" rules: - no-delete rules: - name: no-pg message: "invalid engine: postgresql" rule: | config.engine == "postgresql" - name: no-delete message: "don't use delete statements" rule: | query.sql.contains("DELETE") ``` ### 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. 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 */ /* @sqlc-vet-disable */ SELECT * FROM authors WHERE id = ? LIMIT 1; ``` ================================================ FILE: docs/index.rst ================================================ .. sqlc documentation master file, created by sphinx-quickstart on Mon Feb 1 23:18:36 2021. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. sqlc Documentation ================== And lo, the Great One looked down upon the people and proclaimed: "SQL is actually pretty great" sqlc generates **fully type-safe idiomatic Go code** from SQL. Here's how it works: 1. You write SQL queries 2. You run sqlc to generate Go code that presents type-safe interfaces to those queries 3. You write application code that calls the methods sqlc generated Seriously, it's that easy. You don't have to write any boilerplate SQL querying code ever again. .. toctree:: :maxdepth: 2 :caption: Overview :hidden: overview/install.md .. toctree:: :maxdepth: 2 :caption: Tutorials :hidden: tutorials/getting-started-mysql.md tutorials/getting-started-postgresql.md tutorials/getting-started-sqlite.md .. toctree:: :maxdepth: 2 :caption: Commands :hidden: howto/generate.md howto/push.md howto/verify.md howto/vet.md .. toctree:: :maxdepth: 2 :caption: How-to Guides :hidden: howto/select.md howto/query_count.md howto/insert.md howto/update.md howto/delete.md howto/prepared_query.md howto/transactions.md howto/named_parameters.md howto/ddl.md howto/structs.md howto/embedding.md howto/overrides.md howto/rename.md .. toctree:: :maxdepth: 3 :caption: sqlc Cloud :hidden: howto/managed-databases.md .. toctree:: :maxdepth: 3 :caption: Reference :hidden: reference/changelog.md reference/cli.md reference/config.md reference/datatypes.md reference/environment-variables.md reference/language-support.rst reference/macros.md reference/query-annotations.md .. toctree:: :maxdepth: 2 :caption: Conceptual Guides :hidden: howto/ci-cd.md guides/using-go-and-pgx.rst guides/plugins.md guides/development.md guides/privacy.md ================================================ FILE: docs/overview/install.md ================================================ # Installing sqlc sqlc is distributed as a single binary with zero dependencies. ## macOS ``` brew install sqlc ``` ## Ubuntu ``` sudo snap install sqlc ``` ## go install Installing recent versions of sqlc requires Go 1.21+. ``` go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest ``` ## Docker ``` docker pull sqlc/sqlc ``` Run `sqlc` using `docker run`: ``` docker run --rm -v $(pwd):/src -w /src sqlc/sqlc generate ``` Run `sqlc` using `docker run` in the Command Prompt on Windows (`cmd`): ``` docker run --rm -v "%cd%:/src" -w /src sqlc/sqlc generate ``` ## Downloads Get pre-built binaries for *v1.30.0*: - [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. ================================================ FILE: docs/reference/changelog.md ================================================ # 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 ### Release notes #### Database-backed query analysis With a [database connection](config.md#database) configured, `sqlc generate` will gather metadata from that database to support its query analysis. Turning this on resolves a [large number of issues](https://github.com/sqlc-dev/sqlc/issues?q=is%3Aissue+label%3Aanalyzer) in the backlog related to type inference and more complex queries. The easiest way to try it out is with [managed databases](../howto/managed-databases.md). The database-backed analyzer currently supports PostgreSQL, with [MySQL](https://github.com/sqlc-dev/sqlc/issues/2902) and [SQLite](https://github.com/sqlc-dev/sqlc/issues/2903) support planned in the future. #### New `createdb` command When you have a cloud project configured, you can use the new `sqlc createdb` command to spin up a new ephemeral database with your schema and print its connection string to standard output. This is useful for integrating with other tools. Read more in the [managed databases](../howto/managed-databases.md#with-other-tools) documentation. #### Support for pgvector If you're using [pgvector](https://github.com/pgvector/pgvector), say goodbye to custom overrides! sqlc now generates code using [pgvector-go](https://github.com/pgvector/pgvector-go#pgx) as long as you're using `pgx`. The pgvector extension is also available in [managed databases](../howto/managed-databases.md). #### Go build tags With the new `emit_build_tags` configuration parameter you can set build tags for sqlc to add at the top of generated source files. ### Changes #### Bug Fixes - (codegen) Correct column names in :copyfrom (#2838) - (compiler) Search SELECT and UPDATE the same way (#2841) - (dolphin) Support more UNIONs for MySQL (#2843) - (compiler) Account for parameters without parents (#2844) - (postgresql) Remove temporary pool config (#2851) - (golang) Escape reserved keywords (#2849) - (mysql) Handle simplified CASE statements (#2852) - (engine/dolphin) Support enum in ALTER definition (#2680) - (mysql) Add, drop, rename and change enum values (#2853) - (config) Validate `database` config in all cases (#2856) - (compiler) Use correct func signature for `CommentSyntax` on windows (#2867) - (codegen/go) Prevent filtering of embedded struct fields (#2868) - (compiler) Support functions with OUT params (#2865) - (compiler) Pull in array information from analyzer (#2864) - (analyzer) Error on unexpanded star expression (#2882) - (vet) Remove rollback statements from DDL (#2895) #### Documentation - Add stable anchors to changelog (#2784) - Fix typo in v1.22.0 changelog (#2796) - Add sqlc upload to CI / CD guide (#2797) - Fix broken link, add clarity to plugins doc (#2813) - Add clarity and reference to JSON tags (#2819) - Replace form with dashboard link (#2840) - (examples) Update examples to use pgx/v5 (#2863) - Use docker compose v2 and update MYSQL_DATABASE env var (#2870) - Update getting started guides, use pgx for Postgres guide (#2891) - Use managed databases in PostgreSQL getting started guide (#2892) - Update managed databases doc to discuss codegen (#2897) - Add managed dbs to CI/CD and vet guides (#2896) - Document database-backed query analyzer (#2904) #### Features - (codegen) Support setting Go build tags (#2012) (#2807) - (generate) Reorder codegen handlers to prefer plugins (#2814) - (devenv) Add vscode settings.json with auto newline (#2834) - (cmd) Support sqlc.yml configuration file (#2828) - (analyzer) Analyze queries using a running PostgreSQL database (#2805) - (sql/ast) Render AST to SQL (#2815) - (codegen) Include plugin information (#2846) - (postgresql) Add ALTER VIEW ... SET SCHEMA (#2855) - (compiler) Parse query parameter metadata from comments (#2850) - (postgresql) Support system columns on tables (#2871) - (compiler) Support LEFT JOIN on aliased table (#2873) - Improve messaging for common cloud config and rpc errors (#2885) - Abort compiler when rpc fails as unauthenticated (#2887) - (codegen) Add support for pgvector and pgvector-go (#2888) - (analyzer) Cache query analysis (#2889) - (createdb) Create ephemeral databases (#2894) - (debug) Add databases=managed debug option (#2898) - (config) Remove managed database validation (#2901) #### Miscellaneous Tasks - (endtoend) Fix test output for do tests (#2782) #### Refactor - (codegen) Remove golang and json settings from plugin proto (#2822) - (codegen) Removed deprecated code and improved speed (#2899) #### Testing - (endtoend) Split shema and queries (#2803) - Fix a few incorrect testcases (#2804) - (analyzer) Add more database analyzer test cases (#2854) - Add more analyzer test cases (#2866) - Add more test cases for new analyzer (#2879) - (endtoend) Enabled managed-db tests in CI (#2883) - Enabled pgvector tests for managed dbs (#2893) #### Build - (deps) Bump packaging from 23.1 to 23.2 in /docs (#2791) - (deps) Bump urllib3 from 2.0.5 to 2.0.6 in /docs (#2798) - (deps) Bump babel from 2.12.1 to 2.13.0 in /docs (#2799) - (deps) Bump golang.org/x/sync from 0.3.0 to 0.4.0 (#2810) - (deps) Bump golang from 1.21.1 to 1.21.2 (#2811) - (deps) Bump github.com/google/go-cmp from 0.5.9 to 0.6.0 (#2826) - (deps) Bump golang from 1.21.2 to 1.21.3 (#2824) - (deps) Bump google.golang.org/grpc from 1.58.2 to 1.58.3 (#2825) - (deps) Bump golang.org/x/net from 0.12.0 to 0.17.0 (#2836) - (deps) Bump urllib3 from 2.0.6 to 2.0.7 in /docs (#2872) - (deps) Bump google.golang.org/grpc from 1.58.3 to 1.59.0 (#2876) - (deps) Upgrade wasmtime-go from 13.0.0 to 14.0.0 (#2900) #### Ci - Bump go version in workflows (#2835) (v1-22-0)= ## [1.22.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.22.0) Released 2023-09-26 ### Release notes #### Managed databases for `sqlc vet` If you're using [sqlc vet](../howto/vet.md) to write rules that require access to a running database, `sqlc` can now start and manage that database for you. PostgreSQL support is available today, with MySQL on the way. When you turn on managed databases, `sqlc` will use your schema to create a template database that it can copy to make future runs of `sqlc vet` very performant. This feature relies on configuration obtained via [sqlc Cloud](https://dashboard.sqlc.dev). Read more in the [managed databases](../howto/managed-databases.md) documentation. ### Changes #### Bug Fixes - (codegen/golang) Refactor imports code to match templates (#2709) - (codegen/golang) Support name type (#2715) - (wasm) Move Runner struct to shared file (#2725) - (engine/sqlite) Fix grammer to avoid missing join_constraint (#2732) - (convert) Support YAML anchors in plugin options (#2733) - (mysql) Disallow time.Time in mysql :copyfrom queries, not all queries (#2768) - (engine/sqlite) Fix convert process for VALUES (#2737) #### Documentation - Clarify nullable override behavior (#2753) - Add managed databases to sidebar (#2764) - Pull renaming and type overrides into separate sections (#2774) - Update the docs banner for managed dbs (#2775) #### Features - (config) Enables the configuration of copyfrom.go similar to quierer and friends (#2727) - (vet) Run rules against a managed database (#2751) - (upload) Point upload command at new endpoint (#2772) - (compiler) Support DO statements (#2777) #### Miscellaneous Tasks - (endtoend) Skip tests missing secrets (#2763) - Skip certain tests on PRs (#2769) #### Testing - (endtoend) Verify all schemas in endtoend (#2744) - (examples) Use a hosted database for example testing (#2749) - (endtoend) Pull region from environment (#2750) #### Build - (deps) Bump golang from 1.21.0 to 1.21.1 (#2711) - (deps) Bump google.golang.org/grpc from 1.57.0 to 1.58.1 (#2743) - (deps) Bump wasmtime-go from v12 to v13 (#2756) - (windows) Downgrade to mingw 11.2.0 (#2757) - (deps) Bump urllib3 from 2.0.4 to 2.0.5 in /docs (#2747) - (deps) Bump google.golang.org/grpc from 1.58.1 to 1.58.2 (#2758) - (deps) Bump github.com/google/cel-go from 0.18.0 to 0.18.1 (#2778) #### Ci - Bump go version to latest in ci workflows (#2722) (v1-21-0)= ## [1.21.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.21.0) Released 2023-09-06 ### Release notes This is primarily a bugfix release, along with some documentation and testing improvements. #### MySQL engine improvements `sqlc` previously didn't know how to parse a `CALL` statement when using the MySQL engine, which meant it was impossible to use sqlc with stored procedures in MySQL databases. Additionally, `sqlc` now supports `IS [NOT] NULL` in queries. And `LIMIT` and `OFFSET` clauses now work with `UNION`. #### SQLite engine improvements GitHub user [@orisano](https://github.com/orisano) continues to bring bugfixes and improvements to `sqlc`'s SQLite engine. See the "Changes" section below for the full list. #### Plugin access to environment variables If you're authoring a [sqlc plugin](../guides/plugins.html), you can now configure sqlc to pass your plugin the values of specific environment variables. For example, if your plugin needs the `PATH` environment variable, add `PATH` to the `env` list in the `plugins` collection. ```yaml version: '2' sql: - schema: schema.sql queries: query.sql engine: postgresql codegen: - out: gen plugin: test plugins: - name: test env: - PATH wasm: url: https://github.com/sqlc-dev/sqlc-gen-test/releases/download/v0.1.0/sqlc-gen-test.wasm sha256: 138220eae508d4b65a5a8cea555edd155eb2290daf576b7a8b96949acfeb3790 ``` A variable named `SQLC_VERSION` is always included in the plugin's environment, set to the version of the `sqlc` executable invoking it. ### Changes #### Bug Fixes - Myriad string formatting changes (#2558) - (engine/sqlite) Support quoted identifier (#2556) - (engine/sqlite) Fix compile error (#2564) - (engine/sqlite) Fixed detection of column alias without AS (#2560) - (ci) Bump go version to 1.20.7 (#2568) - Remove references to deprecated `--experimental` flag (#2567) - (postgres) Fixed a problem with array dimensions disappearing when using "ALTER TABLE ADD COLUMN" (#2572) - Remove GitHub sponsor integration (#2574) - (docs) Improve discussion of prepared statements support (#2604) - (docs) Remove multidimensional array qualification in datatypes.md (#2619) - (config) Go struct tag parsing (#2606) - (compiler) Fix to not scan children under ast.RangeSubselect when retrieving table listing (#2573) - (engine/sqlite) Support NOT IN (#2587) - (codegen/golang) Fixed detection of the used package (#2597) - (engine/dolphin) Fixed problem that LIMIT OFFSET cannot be used with `UNION ALL` (#2613) - (compiler) Support identifiers with schema (#2579) - (compiler) Fix column expansion to work with quoted non-keyword identifiers (#2576) - (codegen/go) Compare define type in codegen (#2263) (#2578) - (engine/sqlite) Fix ast when using compound operator (#2673) - (engine/sqlite) Fix to handle join clauses correctly (#2674) - (codegen) Use correct Go types for bit strings and cid/oid/tid/xid with pgx/v4 (#2668) - (endtoend) Ensure all SQL works against PostgreSQL (#2684) #### Documentation - Update Docker installation instructions (#2552) - Missing emit_pointers_for_null_types configuration option in version 2 (#2682) (#2683) - Fix typo (#2697) - Document sqlc.* macros (#2698) - (mysql) Document parseTimet=true requirement (#2699) - Add atlas to the list of supported migration frameworks (#2700) - Minor updates to insert howto (#2701) #### Features - (endtoend/testdata) Added two sqlite `CAST` tests and rearranged postgres tests for same (#2551) - (docs) Add a reference to type overriding in datatypes.md (#2557) - (engine/sqlite) Support COLLATE for sqlite WHERE clause (#2554) - (mysql) Add parser support for IS [NOT] NULL (#2651) - (engine/dolphin) Support CALL statement (#2614) - (codegen) Allow plugins to access environment variables (#2669) - (config) Add JSON schema files for configs (#2703) #### Miscellaneous Tasks - Ignore Vim swap files (#2616) - Fix typo (#2696) #### Refactor - (astutils) Remove redundant nil check in `Walk` (#2660) #### Build - (deps) Bump wasmtime from v8.0.0 to v11.0.0 (#2553) - (deps) Bump golang from 1.20.6 to 1.20.7 (#2563) - (deps) Bump chardet from 5.1.0 to 5.2.0 in /docs (#2562) - (deps) Bump github.com/pganalyze/pg_query_go/v4 (#2583) - (deps) Bump golang from 1.20.7 to 1.21.0 (#2596) - (deps) Bump github.com/jackc/pgx/v5 from 5.4.2 to 5.4.3 (#2582) - (deps) Bump pygments from 2.15.1 to 2.16.1 in /docs (#2584) - (deps) Bump sphinxcontrib-applehelp from 1.0.4 to 1.0.7 in /docs (#2620) - (deps) Bump sphinxcontrib-qthelp from 1.0.3 to 1.0.6 in /docs (#2622) - (deps) Bump github.com/google/cel-go from 0.17.1 to 0.17.6 (#2650) - (deps) Bump sphinxcontrib-serializinghtml in /docs (#2641) - Upgrade from Go 1.20 to Go 1.21 (#2665) - (deps) Bump sphinxcontrib-devhelp from 1.0.2 to 1.0.5 in /docs (#2621) - (deps) Bump github.com/bytecodealliance/wasmtime-go from v11.0.0 to v12.0.0 (#2666) - (deps) Bump sphinx-rtd-theme from 1.2.2 to 1.3.0 in /docs (#2670) - (deps) Bump sphinxcontrib-htmlhelp from 2.0.1 to 2.0.4 in /docs (#2671) - (deps) Bump github.com/google/cel-go from 0.17.6 to 0.18.0 (#2691) - (deps) Bump actions/checkout from 3 to 4 (#2694) - (deps) Bump pytz from 2023.3 to 2023.3.post1 in /docs (#2695) - (devenv) Bump go from 1.20.7 to 1.21.0 (#2702) (v1-20-0)= ## [1.20.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.20.0) Released 2023-07-31 ### Release notes #### `kyleconroy/sqlc` is now `sqlc-dev/sqlc` We've completed our migration to the [sqlc-dev/sqlc](https://github.com/sqlc-dev/sqlc) repository. All existing links and installation instructions will continue to work. If you're using the `go` tool to install `sqlc`, you'll need to use the new import path to get v1.20.0 (and all future versions). ```sh # INCORRECT: old import path go install github.com/kyleconroy/sqlc/cmd/sqlc@v1.20.0 # CORRECT: new import path go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.20.0 ``` We designed the upgrade process to be as smooth as possible. If you run into any issues, please [file a bug report](https://github.com/sqlc-dev/sqlc/issues/new?assignees=&labels=bug%2Ctriage&projects=&template=BUG_REPORT.yml) via GitHub. #### Use `EXPLAIN ...` output in lint rules `sqlc vet` can now run `EXPLAIN` on your queries and include the results for use in your lint rules. For example, this rule checks that `SELECT` queries use an index. ```yaml version: 2 sql: - schema: "query.sql" queries: "query.sql" engine: "postgresql" database: uri: "postgresql://postgres:postgres@localhost:5432/postgres" gen: go: package: "db" out: "db" rules: - has-index rules: - name: has-index rule: > query.sql.startsWith("SELECT") && !(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.md#database). For the `postgresql` engine, `sqlc` runs ```sql EXPLAIN (ANALYZE false, VERBOSE, COSTS, SETTINGS, BUFFERS, FORMAT JSON) ... ``` where `"..."` is your query string, and parses the output into a [`PostgreSQLExplain`](https://buf.build/sqlc/sqlc/docs/v1.20.0:vet#vet.PostgreSQLExplain) proto message. For the `mysql` engine, `sqlc` runs ```sql EXPLAIN FORMAT=JSON ... ``` where `"..."` is your query string, and parses the output into a [`MySQLExplain`](https://buf.build/sqlc/sqlc/docs/v1.20.0:vet#vet.MySQLExplain) proto message. These proto message definitions are too long to include here, but you can find them in the `protos` directory within the `sqlc` source tree. The output from `EXPLAIN ...` depends on the structure of your query so it's a bit difficult to offer generic examples. Refer to the [PostgreSQL documentation](https://www.postgresql.org/docs/current/using-explain.html) and [MySQL documentation](https://dev.mysql.com/doc/refman/en/explain-output.html) for more information. ```yaml ... rules: - name: postgresql-query-too-costly message: "Query cost estimate is too high" rule: "postgresql.explain.plan.total_cost > 1.0" - name: postgresql-no-seq-scan message: "Query plan results in a sequential scan" rule: "postgresql.explain.plan.node_type == 'Seq Scan'" - name: mysql-query-too-costly message: "Query cost estimate is too high" rule: "has(mysql.explain.query_block.cost_info) && double(mysql.explain.query_block.cost_info.query_cost) > 2.0" - name: mysql-must-use-primary-key message: "Query plan doesn't use primary key" rule: "has(mysql.explain.query_block.table.key) && mysql.explain.query_block.table.key != 'PRIMARY'" ``` When building rules that depend on `EXPLAIN ...` output, it may be helpful to see the actual JSON returned from the database. `sqlc` will print it When you set the environment variable `SQLCDEBUG=dumpexplain=1`. Use this environment variable together with a dummy rule to see `EXPLAIN ...` output for all of your queries. #### 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. ```sql /* name: GetAuthor :one */ /* @sqlc-vet-disable */ SELECT * FROM authors WHERE id = ? LIMIT 1; ``` #### Bulk insert for MySQL _Developed by [@Jille](https://github.com/Jille)_ MySQL now supports the `:copyfrom` query annotation. The generated code uses the [LOAD DATA](https://dev.mysql.com/doc/refman/8.0/en/load-data.html) command to insert data quickly and efficiently. Use caution with this feature. 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 necessary. Check the [error handling](https://dev.mysql.com/doc/refman/8.0/en/load-data.html#load-data-error-handling) documentation for more information. ```sql CREATE TABLE foo (a text, b integer, c DATETIME, d DATE); -- name: InsertValues :copyfrom INSERT INTO foo (a, b, c, d) VALUES (?, ?, ?, ?); ``` ```go func (q *Queries) InsertValues(ctx context.Context, arg []InsertValuesParams) (int64, error) { ... } ``` `LOAD DATA` support must be enabled in the MySQL server. #### CAST support for MySQL _Developed by [@ryanpbrewster](https://github.com/ryanpbrewster) and [@RadhiFadlillah](https://github.com/RadhiFadlillah)_ `sqlc` now understands `CAST` calls in MySQL queries, offering greater flexibility when generating code for complex queries. ```sql CREATE TABLE foo (bar BOOLEAN NOT NULL); -- name: SelectColumnCast :many SELECT CAST(bar AS BIGINT) FROM foo; ``` ```go package querytest import ( "context" ) const selectColumnCast = `-- name: SelectColumnCast :many SELECT CAST(bar AS BIGINT) FROM foo ` func (q *Queries) SelectColumnCast(ctx context.Context) ([]int64, error) { ... } ``` #### SQLite improvements A slew of fixes landed for our SQLite implementation, bringing it closer to parity with MySQL and PostgreSQL. We want to thank [@orisano](https://github.com/orisano) for their continued dedication to improving `sqlc`'s SQLite support. ### Changes #### Features - (debug) Add debug flag and docs for dumping vet rule variables (#2521) - (mysql) :copyfrom support via LOAD DATA INFILE (#2545) - (mysql) Implement cast function parser (#2473) - (postgresql) Add support for PostgreSQL multi-dimensional arrays (#2338) - (sql/catalog) Support ALTER TABLE IF EXISTS (#2542) - (sqlite) Virtual tables and fts5 supported (#2531) - (vet) Add default query parameters for explain queries (#2543) - (vet) Add output from `EXPLAIN ...` for queries to the CEL program environment (#2489) - (vet) Introduce a query annotation to opt out of sqlc vet rules (#2474) - Parse comment lines starting with `@symbol` as boolean flags associated with a query (#2464) #### Bug Fixes - (codegen/golang) Fix sqlc.embed to work with pq.Array (#2544) - (compiler) Correctly validate alias in order/group by clauses for joins (#2537) - (engine/sqlite) Added function to convert cast node (#2470) - (engine/sqlite) Fix join_operator rule (#2434) - (engine/sqlite) Fix table_alias rules (#2465) - (engine/sqlite) Fixed IN operator precedence (#2428) - (engine/sqlite) Fixed to be able to find relation from WITH clause (#2444) - (engine/sqlite) Lowercase ast.ResTarget.Name (#2433) - (engine/sqlite) Put logging statement behind debug flag (#2488) - (engine/sqlite) Support for repeated table_option (#2482) - (mysql) Generate unsigned param (#2522) - (sql/catalog) Support pg_dump output (#2508) - (sqlite) Code generation for sqlc.slice (#2431) - (vet) Clean up unnecessary `prepareable()` func and a var name (#2509) - (vet) Query.cmd was always set to ":" (#2525) - (vet) Report an error when a query is unpreparable, close prepared statement connection (#2486) - (vet) Split vet messages out of codegen.proto (#2511) #### Documentation - Add a description to the document for cases when a query result has no rows (#2462) - Update copyright and author (#2490) - Add example sqlc.yaml for migration parsing (#2479) - Small updates (#2506) - Point GitHub links to new repository location (#2534) #### Miscellaneous Tasks - Rename kyleconroy/sqlc to sqlc-dev/sqlc (#2523) - (proto) Reformat protos using `buf format -w` (#2536) - Update FEATURE_REQUEST.yml to include SQLite engine option - Finish migration to sqlc-dev/sqlc (#2548) - (compiler) Remove some duplicate code (#2546) #### Testing - Add profiles to docker compose (#2503) #### Build - Run all supported versions of MySQL / PostgreSQL (#2463) - (deps) Bump pygments from 2.7.4 to 2.15.0 in /docs (#2485) - (deps) Bump github.com/jackc/pgconn from 1.14.0 to 1.14.1 (#2483) - (deps) Bump github.com/google/cel-go from 0.16.0 to 0.17.1 (#2484) - (docs) Check Python dependencies via dependabot (#2497) - (deps) Bump idna from 2.10 to 3.4 in /docs (#2499) - (deps) Bump packaging from 20.9 to 23.1 in /docs (#2498) - (deps) Bump pygments from 2.15.0 to 2.15.1 in /docs (#2500) - (deps) Bump certifi from 2022.12.7 to 2023.7.22 in /docs (#2504) - (deps) Bump sphinx from 4.4.0 to 6.1.0 in /docs (#2505) - Add psql and mysqlsh to devenv (#2507) - (deps) Bump urllib3 from 1.26.5 to 2.0.4 in /docs (#2516) - (deps) Bump chardet from 4.0.0 to 5.1.0 in /docs (#2517) - (deps) Bump snowballstemmer from 2.1.0 to 2.2.0 in /docs (#2519) - (deps) Bump pytz from 2021.1 to 2023.3 in /docs (#2520) - (deps) Bump sphinxcontrib-htmlhelp from 2.0.0 to 2.0.1 in /docs (#2518) - (deps) Bump pyparsing from 2.4.7 to 3.1.0 in /docs (#2530) - (deps) Bump alabaster from 0.7.12 to 0.7.13 in /docs (#2526) - (docs) Ignore updates for sphinx (#2532) - (deps) Bump babel from 2.9.1 to 2.12.1 in /docs (#2527) - (deps) Bump sphinxcontrib-applehelp from 1.0.2 to 1.0.4 in /docs (#2533) - (deps) Bump google.golang.org/grpc from 1.56.2 to 1.57.0 (#2535) - (deps) Bump pyparsing from 3.1.0 to 3.1.1 in /docs (#2547) ## [1.19.1](https://github.com/sqlc-dev/sqlc/releases/tag/v1.19.1) Released 2023-07-13 ### Bug Fixes - Fix to traverse Sel in ast.In (#2414) - (compiler) Validate UNION ... ORDER BY (#2446) - (golang) Prevent duplicate enum output (#2447) ### Miscellaneous Tasks - Replace codegen, test and docs references to github.com/tabbed repos (#2418) ### Build - (deps) Bump google.golang.org/grpc from 1.56.1 to 1.56.2 (#2415) - (deps) Bump golang from 1.20.5 to 1.20.6 (#2437) - Pin Go to 1.20.6 (#2441) - (deps) Bump github.com/jackc/pgx/v5 from 5.4.1 to 5.4.2 (#2436) ## [1.19.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.19.0) Released 2023-07-06 ### Release notes #### sqlc vet [`sqlc vet`](../howto/vet.md) runs queries through a set of lint rules. Rules are defined in the `sqlc` [configuration](config.md) file. They consist of a name, message, and a [Common Expression Language (CEL)](https://github.com/google/cel-spec) expression. Expressions are evaluated using [cel-go](https://github.com/google/cel-go). If an expression evaluates to `true`, an error is reported using the given message. While these examples are simplistic, they give you a flavor of the types of rules you can write. ```yaml version: 2 sql: - schema: "query.sql" queries: "query.sql" engine: "postgresql" gen: go: package: "authors" out: "db" rules: - no-pg - no-delete - only-one-param - no-exec rules: - name: no-pg message: "invalid engine: postgresql" rule: | config.engine == "postgresql" - name: no-delete message: "don't use delete statements" rule: | query.sql.contains("DELETE") - name: only-one-param message: "too many parameters" rule: | query.params.size() > 1 - name: no-exec message: "don't use exec" rule: | query.cmd == "exec" ``` ##### Database connectivity `vet` also marks the first time that `sqlc` can connect to a live, running database server. We'll expand this functionality over time, but for now it powers the `sqlc/db-prepare` built-in rule. When a [database](config.html#database) is configured, the `sqlc/db-preapre` rule will attempt to prepare each of your queries against the connected database and report any failures. ```yaml version: 2 sql: - schema: "query.sql" queries: "query.sql" engine: "postgresql" gen: go: package: "authors" out: "db" database: uri: "postgresql://postgres:password@localhost:5432/postgres" rules: - sqlc/db-prepare ``` To see this in action, check out the [authors example](https://github.com/sqlc-dev/sqlc/blob/main/examples/authors/sqlc.yaml). Please note that `sqlc` does not manage or migrate your database. Use your migration tool of choice to create the necessary database tables and objects before running `sqlc vet`. #### Omit unused structs Added a new configuration parameter `omit_unused_structs` which, when set to true, filters out table and enum structs that aren't used in queries for a given package. #### Suggested CI/CD setup With the addition of `sqlc diff` and `sqlc vet`, we encourage users to run sqlc in your CI/CD pipelines. See our [suggested CI/CD setup](../howto/ci-cd.md) for more information. #### Simplified plugin development The [sqlc-gen-kotlin](https://github.com/sqlc-dev/sqlc-gen-kotlin) and [sqlc-gen-python](https://github.com/sqlc-dev/sqlc-gen-python) plugins have been updated use the upcoming [WASI](https://wasi.dev/) support in [Go 1.21](https://tip.golang.org/doc/go1.21#wasip1). Building these plugins no longer requires [TinyGo](https://tinygo.org/). ### Changes #### Bug Fixes - Pointers overrides skip imports in generated query files (#2240) - CASE-ELSE clause is not properly parsed when a value is constant (#2238) - Fix toSnakeCase to handle input in CamelCase format (#2245) - Add location info to sqlite ast (#2298) - Add override tags to result struct (#1867) (#1887) - Override types of aliased columns and named parameters (#1884) - Resolve duplicate fields generated when inheriting multiple tables (#2089) - Check column references in ORDER BY (#1411) (#1915) - MySQL slice shadowing database/sql import (#2332) - Don't defer rows.Close() if pgx.BatchResults.Query() failed (#2362) - Fix type overrides not working with sqlc.slice (#2351) - Type overrides on columns for parameters inside an IN clause (#2352) - Broken interaction between query_parameter_limit and pq.Array() (#2383) - (codegen/golang) Bring :execlastid in line with the rest (#2378) #### Documentation - Update changelog.md with some minor edits (#2235) - Add F# community plugin (#2295) - Add a ReadTheDocs config file (#2327) - Update query_parameter_limit documentation (#2374) - Add launch announcement banner #### Features - PostgreSQL capture correct line and column numbers for parse error (#2289) - Add supporting COMMENT ON VIEW (#2249) - To allow spaces between function name and arguments of functions to be rewritten (#2250) - Add support for pgx/v5 emit_pointers_for_null_types flag (#2269) - (mysql) Support unsigned integers (#1746) - Allow use of table and column aliases for table functions returning unknown types (#2156) - Support "LIMIT ?" in UPDATE and DELETE for MySQL (#2365) - (internal/codegen/golang) Omit unused structs from output (#2369) - Improve default names for BETWEEN ? AND ? to have prefixes from_ and to_ (#2366) - (cmd/sqlc) Add the vet subcommand (#2344) - (sqlite) Add support for UPDATE/DELETE with a LIMIT clause (#2384) - Add support for BETWEEN sqlc.arg(min) AND sqlc.arg(max) (#2373) - (cmd/vet) Prepare queries against a database (#2387) - (cmd/vet) Prepare queries for MySQL (#2388) - (cmd/vet) Prepare SQLite queries (#2389) - (cmd/vet) Simplify environment variable substiution (#2393) - (cmd/vet) Add built-in db-prepare rule - Add compiler support for NOTIFY and LISTEN (PostgreSQL) (#2363) #### Miscellaneous Tasks - A few small staticcheck fixes (#2361) - Remove a bunch of dead code (#2360) - (scripts/regenerate) Should also update stderr.txt (#2379) #### Build - (deps) Bump requests from 2.25.1 to 2.31.0 in /docs (#2283) - (deps) Bump golang from 1.20.3 to 1.20.4 (#2256) - (deps) Bump google.golang.org/grpc from 1.54.0 to 1.55.0 (#2265) - (deps) Bump github.com/mattn/go-sqlite3 from 1.14.16 to 1.14.17 (#2293) - (deps) Bump golang.org/x/sync from 0.1.0 to 0.2.0 (#2266) - (deps) Bump golang from 1.20.4 to 1.20.5 (#2301) - Configure dependencies via devenv.sh (#2319) - Configure dependencies via devenv.sh (#2326) - (deps) Bump golang.org/x/sync from 0.2.0 to 0.3.0 (#2328) - (deps) Bump google.golang.org/grpc from 1.55.0 to 1.56.0 (#2333) - (deps) Bump google.golang.org/protobuf from 1.30.0 to 1.31.0 (#2370) - (deps) Bump actions/checkout from 2 to 3 (#2357) - Run govulncheck on all builds (#2372) - (deps) Bump google.golang.org/grpc from 1.56.0 to 1.56.1 (#2358) #### Cmd/sqlc - Show helpful output on missing subcommand (#2345) #### Codegen - Use catalog's default schema (#2310) - (go) Add tests for tables with dashes (#2312) - (go) Strip invalid characters from table and column names (#2314) - (go) Support JSON tags for nullable enum structs (#2121) #### Internal/config - Support golang overrides for slices (#2339) #### Kotlin - Use latest version of sqlc-gen-kotlin (#2356) #### Postgres - Column merging for table inheritence (#2315) #### Protos - Add missing field name (#2354) #### Python - Use latest version of sqlc-gen-python (#2355) #### Remote - Use user-id/password auth (#2262) #### Sqlite - Fixed sqlite column type override (#1986) ## [1.18.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.18.0) Released 2023-04-27 ### Release notes #### Remote code generation _Developed by [@andrewmbenton](https://github.com/andrewmbenton)_ At its core, sqlc is powered by SQL engines, which include parsers, formatters, analyzers and more. While our goal is to support each engine on each operating system, it's not always possible. For example, the PostgreSQL engine does not work on Windows. To bridge that gap, we're announcing remote code generation, currently in private alpha. To join the private alpha, [sign up for the waitlist](https://docs.google.com/forms/d/e/1FAIpQLScDWrGtTgZWKt3mdlF5R2XCX6tL1pMkB4yuZx5yq684tTNN1Q/viewform?usp=sf_link). Remote code generation works like local code generation, except the heavy lifting is performed in a consistent cloud environment. WASM-based plugins are supported in the remote environment, but process-based plugins are not. To configure remote generation, add a `cloud` block in `sqlc.json`. ```json { "version": "2", "cloud": { "organization": "", "project": "", }, ... } ``` You'll also need to set the `SQLC_AUTH_TOKEN` environment variable. ```bash export SQLC_AUTH_TOKEN= ``` When the `cloud` configuration block exists, `sqlc generate` will default to remote code generation. If you'd like to generate code locally without removing the `cloud` block from your config, pass the `--no-remote` option. ```bash sqlc generate --no-remote ``` Remote generation is off by default and requires an opt-in to use. #### sqlc.embed _Developed by [@nickjackson](https://github.com/nickjackson)_ Embedding allows you to reuse existing model structs in more queries, resulting in less manual serialization work. First, imagine we have the following schema with students and test scores. ```sql CREATE TABLE students ( id bigserial PRIMARY KEY, name text, age integer ) CREATE TABLE test_scores ( student_id bigint, score integer, grade text ) ``` We want to select the student record and the highest score they got on a test. Here's how we'd usually do that: ```sql -- name: HighScore :many WITH high_scores AS ( SELECT student_id, max(score) as high_score FROM test_scores GROUP BY 1 ) SELECT students.*, high_score::integer FROM students JOIN high_scores ON high_scores.student_id = students.id; ``` When using Go, sqlc will produce a struct like this: ``` type HighScoreRow struct { ID int64 Name sql.NullString Age sql.NullInt32 HighScore int32 } ``` With embedding, the struct will contain a model for the table instead of a flattened list of columns. ```sql -- name: HighScoreEmbed :many WITH high_scores AS ( SELECT student_id, max(score) as high_score FROM test_scores GROUP BY 1 ) SELECT sqlc.embed(students), high_score::integer FROM students JOIN high_scores ON high_scores.student_id = students.id; ``` ``` type HighScoreRow struct { Student Student HighScore int32 } ``` #### sqlc.slice _Developed by Paul Cameron and Jille Timmermans_ The MySQL Go driver does not support passing slices to the IN operator. The `sqlc.slice` function generates a dynamic query at runtime with the correct number of parameters. ```sql /* name: SelectStudents :many */ SELECT * FROM students WHERE age IN (sqlc.slice("ages")) ``` ```go func (q *Queries) SelectStudents(ctx context.Context, ages []int32) ([]Student, error) { ``` This feature is only supported in MySQL and cannot be used with prepared queries. #### Batch operation improvements When using batches with pgx, the error returned when a batch is closed is exported by the generated package. This change allows for cleaner error handling using `errors.Is`. ```go errors.Is(err, generated_package.ErrBatchAlreadyClosed) ``` Previously, you would have had to check match on the error message itself. ``` err.Error() == "batch already closed" ``` The generated code for batch operations always lived in `batch.go`. This file name can now be configured via the `output_batch_file_name` configuration option. #### Configurable query parameter limits for Go By default, sqlc will limit Go functions to a single parameter. If a query includes more than one parameter, the generated method will use an argument struct instead of positional arguments. This behavior can now be changed via the `query_parameter_limit` configuration option. If set to `0`, every genreated method will use a argument struct. ### Changes #### Bug Fixes - Prevent variable redeclaration in single param conflict for pgx (#2058) - Retrieve Larg/Rarg join query after inner join (#2051) - Rename argument when conflicted to imported package (#2048) - Pgx closed batch return pointer if need #1959 (#1960) - Correct singularization of "waves" (#2194) - Honor Package level renames in v2 yaml config (#2001) - (mysql) Prevent UPDATE ... JOIN panic #1590 (#2154) - Mysql delete join panic (#2197) - Missing import with pointer overrides, solves #2168 #2125 (#2217) #### Documentation - (config.md) Add `sqlite` as engine option (#2164) - Add first pass at pgx documentation (#2174) - Add missed configuration option (#2188) - `specifies parameter ":one" without containing a RETURNING clause` (#2173) #### Features - Add `sqlc.embed` to allow model re-use (#1615) - (Go) Add query_parameter_limit conf to codegen (#1558) - Add remote execution for codegen (#2214) #### Testing - Skip tests if required plugins are missing (#2104) - Add tests for reanme fix in v2 (#2196) - Regenerate batch output for filename tests - Remove remote test (#2232) - Regenerate test output #### Bin/sqlc - Add SQLCTMPDIR environment variable (#2189) #### Build - (deps) Bump github.com/antlr/antlr4/runtime/Go/antlr (#2109) - (deps) Bump github.com/jackc/pgx/v4 from 4.18.0 to 4.18.1 (#2119) - (deps) Bump golang from 1.20.1 to 1.20.2 (#2135) - (deps) Bump google.golang.org/protobuf from 1.28.1 to 1.29.0 (#2137) - (deps) Bump google.golang.org/protobuf from 1.29.0 to 1.29.1 (#2143) - (deps) Bump golang from 1.20.2 to 1.20.3 (#2192) - (deps) Bump actions/setup-go from 3 to 4 (#2150) - (deps) Bump google.golang.org/protobuf from 1.29.1 to 1.30.0 (#2151) - (deps) Bump github.com/spf13/cobra from 1.6.1 to 1.7.0 (#2193) - (deps) Bump github.com/lib/pq from 1.10.7 to 1.10.8 (#2211) - (deps) Bump github.com/lib/pq from 1.10.8 to 1.10.9 (#2229) - (deps) Bump github.com/go-sql-driver/mysql from 1.7.0 to 1.7.1 (#2228) #### Cmd/sqlc - Remove --experimental flag (#2170) - Add option to disable process-based plugins (#2180) - Bump version to v1.18.0 #### Codegen - Correctly generate CopyFrom columns for single-column copyfroms (#2185) #### Config - Add top-level cloud configuration (#2204) #### Engine/postgres - Upgrade to pg_query_go/v4 (#2114) #### Ext/wasm - Check exit code on returned error (#2223) #### Parser - Generate correct types for `SELECT NOT EXISTS` (#1972) #### Sqlite - Add support for CREATE TABLE ... STRICT (#2175) #### Wasm - Upgrade to wasmtime v8.0.0 (#2222) ## [1.17.2](https://github.com/sqlc-dev/sqlc/releases/tag/v1.17.2) Released 2023-02-22 ### Bug Fixes - Fix build on Windows (#2102) ## [1.17.1](https://github.com/sqlc-dev/sqlc/releases/tag/v1.17.1) Released 2023-02-22 ### Bug Fixes - Prefer to use []T over pgype.Array[T] (#2090) - Revert changes to Dockerfile (#2091) - Do not throw error when IF NOT EXISTS is used on ADD COLUMN (#2092) ### MySQL - Add `float` support to MySQL (#2097) ### Build - (deps) Bump golang from 1.20.0 to 1.20.1 (#2082) ## [1.17.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.17.0) Released 2023-02-13 ### Bug Fixes - Initialize generated code outside function (#1850) - (engine/mysql) Take into account column's charset to distinguish text/blob, (var)char/(var)binary (#776) (#1895) - The enum Value method returns correct type (#1996) - Documentation for Inserting Rows (#2034) - Add import statements even if only pointer types exist (#2046) - Search from Rexpr if not found from Lexpr (#2056) ### Documentation - Change ENTRYPOINT to CMD (#1943) - Update samples for HOW-TO GUIDES (#1953) ### Features - Add the diff command (#1963) ### Build - (deps) Bump github.com/mattn/go-sqlite3 from 1.14.15 to 1.14.16 (#1913) - (deps) Bump github.com/spf13/cobra from 1.6.0 to 1.6.1 (#1909) - Fix devcontainer (#1942) - Run sqlc-pg-gen via GitHub Actions (#1944) - Move large arrays out of functions (#1947) - Fix conflicts from pointer configuration (#1950) - (deps) Bump github.com/go-sql-driver/mysql from 1.6.0 to 1.7.0 (#1988) - (deps) Bump github.com/jackc/pgtype from 1.12.0 to 1.13.0 (#1978) - (deps) Bump golang from 1.19.3 to 1.19.4 (#1992) - (deps) Bump certifi from 2020.12.5 to 2022.12.7 in /docs (#1993) - (deps) Bump golang from 1.19.4 to 1.19.5 (#2016) - (deps) Bump golang from 1.19.5 to 1.20.0 (#2045) - (deps) Bump github.com/jackc/pgtype from 1.13.0 to 1.14.0 (#2062) - (deps) Bump github.com/jackc/pgx/v4 from 4.17.2 to 4.18.0 (#2063) ### Cmd - Generate packages in parallel (#2026) ### Cmd/sqlc - Bump version to v1.17.0 ### Codegen - Remove built-in Kotlin support (#1935) - Remove built-in Python support (#1936) ### Internal/codegen - Cache pattern matching compilations (#2028) ### Mysql - Add datatype tests (#1948) - Fix blob tests (#1949) ### Plugins - Upgrade to wasmtime 3.0.1 (#2009) ### Sqlite - Supported between expr (#1958) (#1967) ### Tools - Regenerate scripts skips dirs that contains diff exec command (#1987) ### Wasm - Upgrade to wasmtime 5.0.0 (#2065) ## [1.16.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.16.0) Released 2022-11-09 ### Bug Fixes - (validate) Sqlc.arg & sqlc.narg are not "missing" (#1814) - Emit correct comment for nullable enums (#1819) - 🐛 Correctly switch `coalesce()` result `.NotNull` value (#1664) - Prevent batch infinite loop with arg length (#1794) - Support version 2 in error message (#1839) - Handle empty column list in postgresql (#1843) - Batch imports filter queries, update cmds having ret type (#1842) - Named params contribute to batch parameter count (#1841) ### Documentation - Add a getting started guide for SQLite (#1798) - Various readability improvements (#1854) - Add documentation for codegen plugins (#1904) - Update migration guides with links (#1933) ### Features - Add HAVING support to MySQL (#1806) ### Miscellaneous Tasks - Upgrade wasmtime version (#1827) - Bump wasmtime version to v1.0.0 (#1869) ### Build - (deps) Bump github.com/jackc/pgconn from 1.12.1 to 1.13.0 (#1785) - (deps) Bump github.com/mattn/go-sqlite3 from 1.14.13 to 1.14.15 (#1799) - (deps) Bump github.com/jackc/pgx/v4 from 4.16.1 to 4.17.0 (#1786) - (deps) Bump github.com/jackc/pgx/v4 from 4.17.0 to 4.17.1 (#1825) - (deps) Bump github.com/bytecodealliance/wasmtime-go (#1826) - (deps) Bump github.com/jackc/pgx/v4 from 4.17.1 to 4.17.2 (#1831) - (deps) Bump golang from 1.19.0 to 1.19.1 (#1834) - (deps) Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 (#1838) - (deps) Bump github.com/lib/pq from 1.10.6 to 1.10.7 (#1835) - (deps) Bump github.com/bytecodealliance/wasmtime-go (#1857) - (deps) Bump github.com/spf13/cobra from 1.5.0 to 1.6.0 (#1893) - (deps) Bump golang from 1.19.1 to 1.19.3 (#1920) ### Cmd/sqlc - Bump to v1.16.0 ### Codgen - Include serialized codegen options (#1890) ### Compiler - Move Kotlin parameter logic into codegen (#1910) ### Examples - Port Python examples to WASM plugin (#1903) ### Pg-gen - Make sqlc-pg-gen the complete source of truth for pg_catalog.go (#1809) - Implement information_schema shema (#1815) ### Python - Port all Python tests to sqlc-gen-python (#1907) - Upgrade to sqlc-gen-python v1.0.0 (#1932) ## [1.15.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.15.0) Released 2022-08-07 ### Bug Fixes - (mysql) Typo (#1700) - (postgresql) Add quotes for CamelCase columns (#1729) - Cannot parse SQLite upsert statement (#1732) - (sqlite) Regenerate test output for builtins (#1735) - (wasm) Version modules by wasmtime version (#1734) - Missing imports (#1637) - Missing slice import for querier (#1773) ### Documentation - Add process-based plugin docs (#1669) - Add links to downloads.sqlc.dev (#1681) - Update transactions how to example (#1775) ### Features - More SQL Syntax Support for SQLite (#1687) - (sqlite) Promote SQLite support to beta (#1699) - Codegen plugins, powered by WASM (#1684) - Set user-agent for plugin downloads (#1707) - Null enums types (#1485) - (sqlite) Support stdlib functions (#1712) - (sqlite) Add support for returning (#1741) ### Miscellaneous Tasks - Add tests for quoting columns (#1733) - Remove catalog tests (#1762) ### Testing - Add tests for fixing slice imports (#1736) - Add test cases for returning (#1737) ### Build - Upgrade to Go 1.19 (#1780) - Upgrade to go-wasmtime 0.39.0 (#1781) ### Plugins - (wasm) Change default cache location (#1709) - (wasm) Change the SHA-256 config key (#1710) ## [1.14.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.14.0) Released 2022-06-09 ### Bug Fixes - (postgresql) Remove extra newline with db argument (#1417) - (sqlite) Fix DROP TABLE (#1443) - (compiler) Fix left join nullability with table aliases (#1491) - Regenerate testdata for CREATE TABLE AS (#1516) - (bundler) Only close multipart writer once (#1528) - (endtoend) Regenerate testdata for exex_lastid - (pgx) Copyfrom imports (#1626) - Validate sqlc function arguments (#1633) - Fixed typo `sql.narg` in doc (#1668) ### Features - (golang) Add Enum.Valid and AllEnumValues (#1613) - (sqlite) Start expanding support (#1410) - (pgx) Add support for batch operations (#1437) - (sqlite) Add support for delete statements (#1447) - (codegen) Insert comments in interfaces (#1458) - (sdk) Add the plugin SDK package (#1463) - Upload projects (#1436) - Add sqlc version to generated Kotlin code (#1512) - Add sqlc version to generated Go code (#1513) - Pass sqlc version in codegen request (#1514) - (postgresql) Add materialized view support (#1509) - (python) Graduate Python support to beta (#1520) - Run sqlc with docker on windows cmd (#1557) - Add JSON "codegen" output (#1565) - Add sqlc.narg() for nullable named params (#1536) - Process-based codegen plugins (#1578) ### Miscellaneous Tasks - Fix extra newline in comments for copyfrom (#1438) - Generate marshal/unmarshal with vtprotobuf (#1467) ### Refactor - (codegen) Port Kotlin codegen package to use plugin types (#1416) - (codegen) Port Go to plugin types (#1460) - (cmd) Simplify codegen selection logic (#1466) - (sql/catalog) Improve Readability (#1595) - Add basic fuzzing for config / overrides (#1500) ## [1.13.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.13.0) Released 2022-03-31 ### Bug Fixes - (compiler) Fix left join nullability with table aliases (#1491) - (postgresql) Remove extra newline with db argument (#1417) - (sqlite) Fix DROP TABLE (#1443) ### Features - (cli) Upload projects (#1436) - (codegen) Add sqlc version to generated Go code (#1513) - (codegen) Add sqlc version to generated Kotlin code (#1512) - (codegen) Insert comments in interfaces (#1458) - (codegen) Pass sqlc version in codegen request (#1514) - (pgx) Add support for batch operations (#1437) - (postgresql) Add materialized view support (#1509) - (python) Graduate Python support to beta (#1520) - (sdk) Add the plugin SDK package (#1463) - (sqlite) Add support for delete statements (#1447) - (sqlite) Start expanding support (#1410) ### Miscellaneous Tasks - Fix extra newline in comments for copyfrom (#1438) - Generate marshal/unmarshal with vtprotobuf (#1467) ### Refactor - (codegen) Port Kotlin codegen package to use plugin types (#1416) - (codegen) Port Go to plugin types (#1460) - (cmd) Simplify codegen selection logic (#1466) ### Config - Add basic fuzzing for config / overrides (#1500) ## [1.12.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.12.0) Released 2022-02-05 ### Bug - ALTER TABLE SET SCHEMA (#1409) ### Bug Fixes - Update ANTLR v4 go.mod entry (#1336) - Check delete statements for CTEs (#1329) - Fix validation of GROUP BY on field aliases (#1348) - Fix imports when non-copyfrom queries needed imports that copyfrom queries didn't (#1386) - Remove extra comment newline (#1395) - Enable strict function checking (#1405) ### Documentation - Bump version to 1.11.0 (#1308) ### Features - Inheritance (#1339) - Generate query code using ASTs instead of templates (#1338) - Add support for CREATE TABLE a ( LIKE b ) (#1355) - Add support for sql.NullInt16 (#1376) ### Miscellaneous Tasks - Add tests for :exec{result,rows} (#1344) - Delete template-based codegen (#1345) ### Build - Bump github.com/jackc/pgx/v4 from 4.14.0 to 4.14.1 (#1316) - Bump golang from 1.17.3 to 1.17.4 (#1331) - Bump golang from 1.17.4 to 1.17.5 (#1337) - Bump github.com/spf13/cobra from 1.2.1 to 1.3.0 (#1343) - Remove devel Docker build - Bump golang from 1.17.5 to 1.17.6 (#1369) - Bump github.com/google/go-cmp from 0.5.6 to 0.5.7 (#1382) - Format all Go code (#1387) ## [1.11.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.11.0) Released 2021-11-24 ### Bug Fixes - Update incorrect signatures (#1180) - Correct aggregate func sig (#1182) - Jsonb_build_object (#1211) - Case-insensitive identifiers (#1216) - Incorrect handling of meta (#1228) - Detect invalid INSERT expression (#1231) - Respect alias name for coalesce (#1232) - Mark nullable when casting NULL (#1233) - Support nullable fields in joins for MySQL engine (#1249) - Fix between expression handling of table references (#1268) - Support nullable fields in joins on same table (#1270) - Fix missing binds in ORDER BY (#1273) - Set RV for TargetList items on updates (#1252) - Fix MySQL parser for query without trailing semicolon (#1282) - Validate table alias references (#1283) - Add support for MySQL ON DUPLICATE KEY UPDATE (#1286) - Support references to columns in joined tables in UPDATE statements (#1289) - Add validation for GROUP BY clause column references (#1285) - Prevent variable redeclaration in single param conflict (#1298) - Use common params struct field for same named params (#1296) ### Documentation - Replace deprecated go get with go install (#1181) - Fix package name referenced in tutorial (#1202) - Add environment variables (#1264) - Add go.17+ install instructions (#1280) - Warn about golang-migrate file order (#1302) ### Features - Instrument compiler via runtime/trace (#1258) - Add MySQL support for BETWEEN arguments (#1265) ### Refactor - Move from io/ioutil to io and os package (#1164) ### Styling - Apply gofmt to sample code (#1261) ### Build - Bump golang from 1.17.0 to 1.17.1 (#1173) - Bump eskatos/gradle-command-action from 1 to 2 (#1220) - Bump golang from 1.17.1 to 1.17.2 (#1227) - Bump github.com/pganalyze/pg_query_go/v2 (#1234) - Bump actions/checkout from 2.3.4 to 2.3.5 (#1238) - Bump babel from 2.9.0 to 2.9.1 in /docs (#1245) - Bump golang from 1.17.2 to 1.17.3 (#1272) - Bump actions/checkout from 2.3.5 to 2.4.0 (#1267) - Bump github.com/lib/pq from 1.10.3 to 1.10.4 (#1278) - Bump github.com/jackc/pgx/v4 from 4.13.0 to 4.14.0 (#1303) ### Cmd/sqlc - Bump version to v1.11.0 ## [1.10.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.10.0) Released 2021-09-07 ### Documentation - Fix invalid language support table (#1161) - Add a getting started guide for MySQL (#1163) ### Build - Bump golang from 1.16.7 to 1.17.0 (#1129) - Bump github.com/lib/pq from 1.10.2 to 1.10.3 (#1160) ### Ci - Upgrade Go to 1.17 (#1130) ### Cmd/sqlc - Bump version to v1.10.0 (#1165) ### Codegen/golang - Consolidate import logic (#1139) - Add pgx support for range types (#1146) - Use pgtype for hstore when using pgx (#1156) ### Codgen/golang - Use p[gq]type for network address types (#1142) ### Endtoend - Run `go test` in CI (#1134) ### Engine/mysql - Add support for LIKE (#1162) ### Golang - Output NullUUID when necessary (#1137) ## [1.9.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.9.0) Released 2021-08-13 ### Documentation - Update documentation (a bit) for v1.9.0 (#1117) ### Build - Bump golang from 1.16.6 to 1.16.7 (#1107) ### Cmd/sqlc - Bump version to v1.9.0 (#1121) ### Compiler - Add tests for COALESCE behavior (#1112) - Handle subqueries in SELECT statements (#1113) ## [1.8.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.8.0) Released 2021-05-03 ### Documentation - Add language support Matrix (#920) ### Features - Add case style config option (#905) ### Python - Eliminate runtime package and use sqlalchemy (#939) ### Build - Bump github.com/google/go-cmp from 0.5.4 to 0.5.5 (#926) - Bump github.com/lib/pq from 1.9.0 to 1.10.0 (#931) - Bump golang from 1.16.0 to 1.16.1 (#935) - Bump golang from 1.16.1 to 1.16.2 (#942) - Bump github.com/jackc/pgx/v4 from 4.10.1 to 4.11.0 (#956) - Bump github.com/go-sql-driver/mysql from 1.5.0 to 1.6.0 (#961) - Bump github.com/pganalyze/pg_query_go/v2 (#965) - Bump urllib3 from 1.26.3 to 1.26.4 in /docs (#968) - Bump golang from 1.16.2 to 1.16.3 (#963) - Bump github.com/lib/pq from 1.10.0 to 1.10.1 (#980) ### Cmd - Add the --experimental flag (#929) - Fix sqlc init (#959) ### Cmd/sqlc - Bump version to v1.7.1-devel (#913) - Bump version to v1.8.0 ### Codegen - Generate valid enum names for symbols (#972) ### Postgresql - Support generated columns - Add test for PRIMARY KEY INCLUDE - Add tests for CREATE TABLE PARTITION OF - CREATE TRIGGER EXECUTE FUNCTION - Add support for renaming types (#971) ### Sql/ast - Resolve return values from functions (#964) ### Workflows - Only run tests once (#924) ## [1.7.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.7.0) Released 2021-02-28 ### Bug Fixes - Struct tag formatting (#833) ### Documentation - Include all the existing Markdown files (#877) - Split docs into four sections (#882) - Reorganize and consolidate documentation - Add link to Windows download (#888) - Shorten the README (#889) ### Features - Adding support for pgx/v4 - Adding support for pgx/v4 ### README - Add Go Report Card badge (#891) ### Build - Bump github.com/google/go-cmp from 0.5.3 to 0.5.4 (#813) - Bump github.com/lib/pq from 1.8.0 to 1.9.0 (#820) - Bump golang from 1.15.5 to 1.15.6 (#822) - Bump github.com/jackc/pgx/v4 from 4.9.2 to 4.10.0 (#823) - Bump github.com/jackc/pgx/v4 from 4.10.0 to 4.10.1 (#839) - Bump golang from 1.15.6 to 1.15.7 (#855) - Bump golang from 1.15.7 to 1.15.8 (#881) - Bump github.com/spf13/cobra from 1.1.1 to 1.1.2 (#892) - Bump golang from 1.15.8 to 1.16.0 (#897) - Bump github.com/lfittl/pg_query_go from 1.0.1 to 1.0.2 (#901) - Bump github.com/spf13/cobra from 1.1.2 to 1.1.3 (#893) ### Catalog - Improve alter column type (#818) ### Ci - Uprade to Go 1.15 (#887) ### Cmd - Allow config file location to be specified (#863) ### Cmd/sqlc - Bump to version v1.6.1-devel (#807) - Bump version to v1.7.0 (#912) ### Codegen/golang - Make sure to import net package (#858) ### Compiler - Support UNION query ### Dolphin - Generate bools for tinyint(1) - Support joins in update statements (#883) - Add support for union query ### Endtoend - Add tests for INTERSECT and EXCEPT ### Go.mod - Update to go 1.15 and run 'go mod tidy' (#808) ### Mysql - Compile tinyint(1) to bool (#873) ### Sql/ast - Add enum values for SetOperation ## [1.6.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.6.0) Released 2020-11-23 ### Dolphin - Implement Rename (#651) - Skip processing view drops (#653) ### README - Update language / database support (#698) ### Astutils - Fix Params rewrite call (#674) ### Build - Bump golang from 1.14 to 1.15.3 (#765) - Bump docker/build-push-action from v1 to v2.1.0 (#764) - Bump github.com/google/go-cmp from 0.4.0 to 0.5.2 (#766) - Bump github.com/spf13/cobra from 1.0.0 to 1.1.1 (#767) - Bump github.com/jackc/pgx/v4 from 4.6.0 to 4.9.2 (#768) - Bump github.com/lfittl/pg_query_go from 1.0.0 to 1.0.1 (#773) - Bump github.com/google/go-cmp from 0.5.2 to 0.5.3 (#783) - Bump golang from 1.15.3 to 1.15.5 (#782) - Bump github.com/lib/pq from 1.4.0 to 1.8.0 (#769) ### Catalog - Improve variadic argument support (#804) ### Cmd/sqlc - Bump to version v1.6.0 (#806) ### Codegen - Fix errant database/sql imports (#789) ### Compiler - Use engine-specific reserved keywords (#677) ### Dolphi - Add list of builtin functions (#795) ### Dolphin - Update to the latest MySQL parser (#665) - Add ENUM() support (#676) - Add test for table aliasing (#684) - Add MySQL ddl_create_table test (#685) - Implete TRUNCATE table (#697) - Represent tinyint as int32 (#797) - Add support for coalesce (#802) - Add function signatures (#796) ### Endtoend - Add MySQL json test (#692) - Add MySQL update set multiple test (#696) ### Examples - Use generated enum constants in db_test (#678) - Port ondeck to MySQL (#680) - Add MySQL authors example (#682) ### Internal/cmd - Print correct config file on parse failure (#749) ### Kotlin - Remove runtime dependency (#774) ### Metadata - Support multiple comment prefixes (#683) ### Postgresql - Support string concat operator (#701) ### Sql/catalog - Add support for variadic functions (#798) ## [1.5.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.5.0) Released 2020-08-05 ### Documentation - Build sqlc using Go 1.14 (#549) ### Cmd - Add debugging support (#573) ### Cmd/sqlc - Bump version to v1.4.1-devel (#548) - Bump version to v1.5.0 ### Compiler - Support calling functions with defaults (#635) - Skip func args without a paramRef (#636) - Return a single column from coalesce (#639) ### Config - Add emit_empty_slices to version one (#552) ### Contrib - Add generated code for contrib ### Dinosql - Remove deprecated package (#554) ### Dolphin - Add support for column aliasing (#566) - Implement star expansion for subqueries (#619) - Implement exapansion with reserved words (#620) - Implement parameter refs (#621) - Implement limit and offest (#622) - Implement inserts (#623) - Implement delete (#624) - Implement simple update statements (#625) - Implement INSERT ... SELECT (#626) - Use test driver instead of TiDB driver (#629) - Implement named parameters via sqlc.arg() (#632) ### Endtoend - Add MySQL test for SELECT * JOIN (#565) - Add MySQL test for inflection (#567) ### Engine - Create engine package (#556) ### Equinox - Use the new equinox-io/setup action (#586) ### Examples - Run tests for MySQL booktest (#627) ### Golang - Add support for the money type (#561) - Generate correct types for int2 and int8 (#579) ### Internal - Rm catalog, pg, postgres packages (#555) ### Mod - Downgrade TiDB package to fix build (#603) ### Mysql - Upgrade to the latest vitess commit (#562) - Support to infer type of a duplicated arg (#615) - Allow some builtin functions to be nullable (#616) ### Postgresql - Generate all functions in pg_catalog (#550) - Remove pg_catalog schema from tests (#638) - Move contrib code to a package ### Sql/catalog - Fix comparison of pg_catalog types (#637) ### Tools - Generate functions for all of contrib ### Workflow - Migrate to equinox-io/setup-release-tool (#614) ## [1.4.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.4.0) Released 2020-06-17 ### Dockerfile - Add version build argument (#487) ### MySQL - Prevent Panic when WHERE clause contains parenthesis. (#531) ### README - Document emit_exact_table_names (#486) ### All - Remove the exp build tag (#507) ### Catalog - Support functions with table parameters (#541) ### Cmd - Bump to version 1.3.1-devel (#485) ### Cmd/sqlc - Bump version to v1.4.0 (#547) ### Codegen - Add the new codegen packages (#513) - Add the :execresult query annotation (#542) ### Compiler - Validate function calls (#505) - Port bottom of parseQuery (#510) - Don't mutate table name (#517) - Enable experimental parser by default (#518) - Apply rename rules to enum constants (#523) - Temp fix for typecast function parameters (#530) ### Endtoend - Standardize JSON formatting (#490) - Add per-test configuration files (#521) - Read expected stderr failures from disk (#527) ### Internal/dinosql - Check parameter style before ref (#488) - Remove unneeded column suffix (#492) - Support named function arguments (#494) ### Internal/postgresql - Fix NamedArgExpr rewrite (#491) ### Multierr - Move dinosql.ParserErr to a new package (#496) ### Named - Port parameter style validation to SQL (#504) ### Parser - Support columns from subselect statements (#489) ### Rewrite - Move parameter rewrite to package (#499) ### Sqlite - Use convert functions instead of the listener (#519) ### Sqlpath - Move ReadSQLFiles into a separate package (#495) ### Validation - Move query validation to separate package (#498) ## [1.3.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.3.0) Released 2020-05-12 ### Makefile - Update target (#449) ### README - Add Myles as a sponsor (#469) ### Testing - Make sure all Go examples build (#480) ### Cmd - Bump version to v1.3.0 (#484) ### Cmd/sqlc - Bump version to v1.2.1-devel (#442) ### Dinosql - Inline addFile (#446) - Add PostgreSQL support for TRUNCATE (#448) ### Gen - Emit json.RawMessage for JSON columns (#461) ### Go.mod - Use latest lib/pq (#471) ### Parser - Use same function to load SQL files (#483) ### Postgresql - Fix panic walking CreateTableAsStmt (#475) ## [1.2.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.2.0) Released 2020-04-07 ### Documentation - Publish to Docker Hub (#422) ### README - Docker installation docs (#424) ### Cmd/sqlc - Bump version to v1.1.1-devel (#407) - Bump version to v1.2.0 (#441) ### Gen - Add special case for "campus" (#435) - Properly quote reserved keywords on expansion (#436) ### Migrations - Move migration parsing to new package (#427) ### Parser - Generate correct types for SELECT EXISTS (#411) ## [1.1.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.1.0) Released 2020-03-17 ### README - Add installation instructions (#350) - Add section on running tests (#357) - Fix typo (#371) ### Ast - Add AST for ALTER TABLE ADD / DROP COLUMN (#376) - Add support for CREATE TYPE as ENUM (#388) - Add support for CREATE / DROP SCHEMA (#389) ### Astutils - Apply changes to the ValuesList slice (#372) ### Cmd - Return v1.0.0 (#348) - Return next bug fix version (#349) ### Cmd/sqlc - Bump version to v1.1.0 (#406) ### Compiler - Wire up the experimental parsers ### Config - Remove "emit_single_file" option (#367) ### Dolphin - Add experimental parser for MySQL ### Gen - Add option to emit single file for Go (#366) - Add support for the ltree extension (#385) ### Go.mod - Add packages for MySQL and SQLite parsers ### Internal/dinosql - Support Postgres macaddr type in Go (#358) ### Internal/endtoend - Remove %w (#354) ### Kotlin - Add Query class to support timeout and cancellation (#368) ### Postgresql - Add experimental parser for MySQL ### Sql - Add generic SQL AST ### Sql/ast - Port support for COMMENT ON (#391) - Implement DROP TYPE (#397) - Implement ALTER TABLE RENAME (#398) - Implement ALTER TABLE RENAME column (#399) - Implement ALTER TABLE SET SCHEMA (#400) ### Sql/catalog - Port tests over from catalog pkg (#402) ### Sql/errors - Add a new errors package (#390) ### Sqlite - Add experimental parser for SQLite ## [1.0.0](https://github.com/sqlc-dev/sqlc/releases/tag/v1.0.0) Released 2020-02-18 ### Documentation - Add documentation for query commands (#270) - Add named parameter documentation (#332) ### README - Add sponsors section (#333) ### Cmd - Remove parse subcommand (#322) ### Config - Parse V2 config format - Add support for YAML (#336) ### Examples - Add the jets and booktest examples (#237) - Move sqlc.json into examples folder (#238) - Add the authors example (#241) - Add build tag to authors tests (#319) ### Internal - Allow CTE to be used with UPDATE (#268) - Remove the PackageMap from settings (#295) ### Internal/config - Create new config package (#313) ### Internal/dinosql - Emit Querier interface (#240) - Strip leading "go-" or trailing "-go" from import (#262) - Overrides can now be basic types (#271) - Import needed types for Querier (#285) - Handle schema-scoped enums (#310) - Ignore golang-migrate rollbacks (#320) ### Internal/endtoend - Move more tests to the record/replay framework - Add update test for named params (#329) ### Internal/mysql - Fix flaky test (#242) - Port tests to endtoend package (#315) ### Internal/parser - Resolve nested CTEs (#324) - Error if last query is missing (#325) - Support joins with aliases (#326) - Remove print statement (#327) ### Internal/sqlc - Add support for composite types (#311) ### Kotlin - Support primitives - Arrays, enums, and dates - Generate examples - README for examples - Factor out db setup extension - Fix enums, use List instead of Array - Port Go tests for examples - Rewrite numbered params to positional params - Always use use, fix indents - Unbox query params ### Parser - Attach range vars to insert params - Attach range vars to insert params (#342) - Remove dead code (#343) ## [0.1.0](https://github.com/sqlc-dev/sqlc/releases/tag/v0.1.0) Released 2020-01-07 ### Documentation - Replace remaining references to DinoSQL with sqlc (#149) ### README - Fix download links (#66) - Add LIMIT 1 to query that should return one (#99) ### Catalog - Support "ALTER TABLE ... DROP CONSTRAINT ..." (#34) - Differentiate functions with different argument types (#51) ### Ci - Enable tests on pull requests ### Cmd - Include filenames in error messages (#69) - Do not output any changes on error (#72) ### Dinosql/internal - Add lower and upper functions (#215) - Ignore alter sequence commands (#219) ### Gen - Add DO NOT EDIT comments to generated code (#50) - Include all schemas when generating models (#90) - Prefix structs with schema name (#91) - Generate single import for uuid package (#98) - Use same import logic for all Go files - Pick correct struct to return for queries (#107) - Create consistent JSON tags (#110) - Add Close method to Queries struct (#127) - Ignore empty override settings (#128) - Turn SQL comments into Go comments (#136) ### Internal/catalog - Parse unnamed function arguments (#166) ### Internal/dinosql - Prepare() with no GoQueries still valid (#95) - Fix multiline comment rendering (#142) - Dereference alias nodes on walk (#158) - Ignore sql-migrate rollbacks (#160) - Sort imported packages (#165) - Add support for timestamptz (#169) - Error on missing queries (#180) - Use more database/sql null types (#182) - Support the pg_temp schema (#183) - Override columns with array type (#184) - Implement robust expansion - Implement robust expansion (#186) - Add COMMENT ON support (#191) - Add DATE support - Add DATE support (#196) - Filter out invalid characters (#198) - Quote reserved keywords (#205) - Return parser errors first (#207) - Implement advisory locks (#212) - Error on duplicate query names (#221) - Fix incorrect enum names (#223) - Add support for numeric types - Add support for numeric types (#228) ### Internal/dinosql/testdata/ondeck - Add Makefile (#156) ### Ondeck - Move all tests to GitHub CI (#58) ### ParseQuery - Return either a query or an error (#178) ### Parser - Use schema when resolving catalog refs (#82) - Support function calls in expressions (#104) - Correctly handle single files (#119) - Return error if missing RETURNING (#131) - Add support for mathmatical operators (#132) - Add support for simple case expressions (#134) - Error on mismatched INSERT input (#135) - Set IsArray on joined columns (#139) ### Pg - Store functions in the catalog (#41) - Add location to errors (#73) ================================================ FILE: docs/reference/cli.md ================================================ # 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 source code from SQL help Help about any command init Create an empty sqlc.yaml settings file 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 Flags: -f, --file string specify an alternate config file (default: sqlc.yaml) -h, --help help for sqlc --no-database disable database connections (default: false) --no-remote disable remote execution (default: false) Use "sqlc [command] --help" for more information about a command. ``` ================================================ FILE: docs/reference/config.md ================================================ # Configuration The `sqlc` tool is configured via a `sqlc.(yaml|yml)` or `sqlc.json` file. This file must be in the directory where the `sqlc` command is run. ## Version 2 ```yaml version: "2" cloud: project: "" sql: - schema: "postgresql/schema.sql" queries: "postgresql/query.sql" engine: "postgresql" gen: go: package: "authors" out: "postgresql" database: managed: true rules: - sqlc/db-prepare - schema: "mysql/schema.sql" queries: "mysql/query.sql" engine: "mysql" gen: go: package: "authors" out: "mysql" ``` ### 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`: - Directory of SQL migrations or path to single SQL file; or a list of paths. - `queries`: - Directory of SQL queries or path to single SQL file; or a list of paths. - `codegen`: - A collection of mappings to configure code generators. See [codegen](#codegen) for the supported keys. - `gen`: - A mapping to configure built-in code generators. See [gen](#gen) for the supported keys. - `database`: - 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. - `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 The `codegen` mapping supports the following keys: - `out`: - Output directory for generated code. - `plugin`: - The name of the plugin. Must be defined in the `plugins` collection. - `options`: - A mapping of plugin-specific options. ```yaml version: '2' plugins: - name: py wasm: url: https://github.com/sqlc-dev/sqlc-gen-python/releases/download/v0.16.0-alpha/sqlc-gen-python.wasm sha256: 428476c7408fd4c032da4ec74e8a7344f4fa75e0f98a5a3302f238283b9b95f2 sql: - schema: "schema.sql" queries: "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 ``` ### database The `database` mapping supports the following keys: - `managed`: - If true, connect to a [managed database](../howto/managed-databases.md). Defaults to `false`. - `uri`: - Database connection URI The `uri` string can contain references to environment variables using the `${...}` syntax. In the following example, the connection string will have the value of the `PG_PASSWORD` environment variable set as its password. ```yaml version: '2' sql: - schema: schema.sql queries: query.sql engine: postgresql database: uri: postgresql://postgres:${PG_PASSWORD}@localhost:5432/authors gen: go: package: authors out: postgresql ``` ### analyzer The `analyzer` mapping supports the following keys: - `database`: - If false, do not use the configured database for query analysis. Defaults to `true`. ### gen The `gen` mapping supports the following keys: #### go - `package`: - The package name to use for the generated code. Defaults to `out` basename. - `out`: - 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`: - If true, include support for prepared queries. Defaults to `false`. - `emit_interface`: - If true, output a `Querier` interface in the generated package. Defaults to `false`. - `emit_exact_table_names`: - If true, struct names will mirror table names. Otherwise, sqlc attempts to singularize plural table names. Defaults to `false`. - `emit_empty_slices`: - If true, slices returned by `:many` queries will be empty instead of `nil`. Defaults to `false`. - `emit_exported_queries`: - If true, autogenerated SQL statement can be exported to be accessed by another package. - `emit_json_tags`: - If true, add JSON tags to generated structs. Defaults to `false`. - `emit_result_struct_pointers`: - If true, query results are returned as pointers to structs. Queries returning multiple results are returned as slices of pointers. Defaults to `false`. - `emit_params_struct_pointers`: - If true, parameters are passed as pointers to structs. Defaults to `false`. - `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, 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`: - `camel` for camelCase, `pascal` for PascalCase, `snake` for snake_case or `none` to use the column name in the DB. Defaults to `none`. - `omit_unused_structs`: - If `true`, sqlc won't generate table and enum structs that aren't used in queries for a given package. Defaults to `false`. - `output_batch_file_name`: - Customize the name of the batch file. Defaults to `batch.go`. - `output_db_file_name`: - Customize the name of the db file. Defaults to `db.go`. - `output_models_file_name`: - Customize the name of the models file. Defaults to `models.go`. - `output_querier_file_name`: - Customize the name of the querier file. Defaults to `querier.go`. - `output_copyfrom_file_name`: - Customize the name of the copyfrom file. Defaults to `copyfrom.go`. - `output_files_suffix`: - If specified the suffix will be added to the name of the generated files. - `query_parameter_limit`: - The number of positional arguments that will be generated for Go functions. To always emit a parameter struct, set this to `0`. Defaults to `1`. - `rename`: - Customize the name of generated struct fields. See [Renaming fields](../howto/rename.md) for usage information. - `overrides`: - 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. #### kotlin > Removed in v1.17.0 and replaced by the [sqlc-gen-kotlin](https://github.com/sqlc-dev/sqlc-gen-kotlin) plugin. Follow the [migration guide](../guides/migrating-to-sqlc-gen-kotlin) to switch. - `package`: - The package name to use for the generated code. - `out`: - Output directory for generated code. - `emit_exact_table_names`: - If true, use the exact table name for generated models. Otherwise, guess a singular form. Defaults to `false`. #### python > Removed in v1.17.0 and replaced by the [sqlc-gen-python](https://github.com/sqlc-dev/sqlc-gen-python) plugin. Follow the [migration guide](../guides/migrating-to-sqlc-gen-python) to switch. - `package`: - The package name to use for the generated code. - `out`: - Output directory for generated code. - `emit_exact_table_names`: - If true, use the exact table name for generated models. Otherwise, guess a singular form. Defaults to `false`. - `emit_sync_querier`: - If true, generate a class with synchronous methods. Defaults to `false`. - `emit_async_querier`: - If true, generate a class with asynchronous methods. Defaults to `false`. - `emit_pydantic_models`: - If true, generate classes that inherit from `pydantic.BaseModel`. Otherwise, define classes using the `dataclass` decorator. Defaults to `false`. #### json - `out`: - Output directory for the generated JSON. - `filename`: - Filename for the generated JSON document. Defaults to `codegen_request.json`. - `indent`: - Indent string to use in the JSON document. Defaults to ` `. ### plugins Each mapping in the `plugins` collection has the following keys: - `name`: - The name of this plugin. Required - `env` - A list of environment variables to pass to the plugin. By default, no environment variables are passed. - `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. - `sha256` - The SHA256 checksum for the downloaded file. ```yaml version: "2" plugins: - name: "py" wasm: url: "https://github.com/sqlc-dev/sqlc-gen-python/releases/download/v0.16.0-alpha/sqlc-gen-python.wasm" sha256: "428476c7408fd4c032da4ec74e8a7344f4fa75e0f98a5a3302f238283b9b95f2" - name: "js" env: - PATH process: cmd: "sqlc-gen-json" ``` ### rules Each mapping in the `rules` collection has the following keys: - `name`: - The name of this rule. Required - `rule`: - A [Common Expression Language (CEL)](https://github.com/google/cel-spec) expression. Required. - `message`: - An optional message shown when this rule evaluates to `true`. See the [vet](../howto/vet.md) documentation for a list of built-in rules and help writing custom rules. ```yaml version: "2" sql: - schema: "query.sql" queries: "query.sql" engine: "postgresql" gen: go: package: "authors" out: "db" rules: - no-pg - no-delete - only-one-param - no-exec rules: - name: no-pg message: "invalid engine: postgresql" rule: | config.engine == "postgresql" - name: no-delete message: "don't use delete statements" rule: | query.sql.contains("DELETE") - name: only-one-param message: "too many parameters" rule: | query.params.size() > 1 - name: no-exec message: "don't use exec" rule: | query.cmd == "exec" ``` ### Global overrides Sometimes, the same configuration must be done across various specifications of code generation. Then a global definition for type overriding and field renaming can be done using the `overrides` mapping the following manner: ```yaml version: "2" overrides: go: rename: id: "Identifier" overrides: - db_type: "pg_catalog.timestamptz" nullable: true engine: "postgresql" go_type: import: "gopkg.in/guregu/null.v4" package: "null" type: "Time" sql: - schema: "postgresql/schema.sql" queries: "postgresql/query.sql" engine: "postgresql" gen: go: package: "authors" out: "postgresql" - schema: "mysql/schema.sql" queries: "mysql/query.sql" engine: "mysql" gen: go: package: "authors" out: "mysql" ``` With the previous configuration, whenever a struct field is generated from a table column that is called `id`, it will generated as `Identifier`. Also, whenever there is a nullable `timestamp with time zone` column in a Postgres table, it will be generated as `null.Time`. Note that the mapping for global type overrides has a field called `engine` that is absent in the regular type overrides. This field is only used when there are multiple definitions using multiple engines. Otherwise, the value of the `engine` key defaults to the engine that is currently being used. Currently, type overrides and field renaming, both global and regular, are only fully supported in Go. ## Version 1 ```yaml version: "1" packages: - name: "db" path: "internal/db" queries: "./sql/query/" schema: "./sql/schema/" engine: "postgresql" emit_db_tags: false emit_prepared_queries: true emit_interface: false emit_exact_table_names: false emit_empty_slices: false emit_exported_queries: false emit_json_tags: true emit_result_struct_pointers: false emit_params_struct_pointers: false emit_methods_with_db_argument: false emit_pointers_for_null_types: false emit_enum_valid_method: false emit_all_enum_values: false build_tags: "some_tag" json_tags_case_style: "camel" omit_unused_structs: false output_batch_file_name: "batch.go" output_db_file_name: "db.go" output_models_file_name: "models.go" output_querier_file_name: "querier.go" output_copyfrom_file_name: "copyfrom.go" query_parameter_limit: 1 ``` ### packages Each mapping in the `packages` collection has the following keys: - `name`: - The package name to use for the generated code. Defaults to `path` basename. - `path`: - Output directory for generated code. - `queries`: - Directory of SQL queries or path to single SQL file; or a list of paths. - `schema`: - Directory of SQL migrations or path to single SQL file; or a list of paths. - `engine`: - 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`: - If true, include support for prepared queries. Defaults to `false`. - `emit_interface`: - If true, output a `Querier` interface in the generated package. Defaults to `false`. - `emit_exact_table_names`: - If true, struct names will mirror table names. Otherwise, sqlc attempts to singularize plural table names. Defaults to `false`. - `emit_empty_slices`: - If true, slices returned by `:many` queries will be empty instead of `nil`. Defaults to `false`. - `emit_exported_queries`: - If true, autogenerated SQL statement can be exported to be accessed by another package. - `emit_json_tags`: - If true, add JSON tags to generated structs. Defaults to `false`. - `emit_result_struct_pointers`: - If true, query results are returned as pointers to structs. Queries returning multiple results are returned as slices of pointers. Defaults to `false`. - `emit_params_struct_pointers`: - If true, parameters are passed as pointers to structs. Defaults to `false`. - `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`. - `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. - `build_tags`: - If set, add a `//go:build ` directive at the beginning of each generated Go file. - `json_tags_case_style`: - `camel` for camelCase, `pascal` for PascalCase, `snake` for snake_case or `none` to use the column name in the DB. Defaults to `none`. - `omit_unused_structs`: - If `true`, sqlc won't generate table and enum structs that aren't used in queries for a given package. Defaults to `false`. - `output_batch_file_name`: - Customize the name of the batch file. Defaults to `batch.go`. - `output_db_file_name`: - Customize the name of the db file. Defaults to `db.go`. - `output_models_file_name`: - Customize the name of the models file. Defaults to `models.go`. - `output_querier_file_name`: - Customize the name of the querier file. Defaults to `querier.go`. - `output_copyfrom_file_name`: - Customize the name of the copyfrom file. Defaults to `copyfrom.go`. - `output_files_suffix`: - If specified the suffix will be added to the name of the generated files. - `query_parameter_limit`: - Positional arguments that will be generated in Go functions (`>= 0`). To always emit a parameter struct, you would need to set it to `0`. Defaults to `1`. ### overrides See the version 1 configuration section of the [Overriding types](../howto/overrides.md#version-1-configuration) guide for details. ### rename Struct field names are generated from column names using a simple algorithm: split the column name on underscores and capitalize the first letter of each part. ``` account -> Account spotify_url -> SpotifyUrl app_id -> AppID ``` If you're not happy with a field's generated name, use the `rename` mapping to pick a new name. The keys are column names and the values are the struct field name to use. ```yaml version: "1" packages: [...] rename: spotify_url: "SpotifyURL" ``` ================================================ FILE: docs/reference/datatypes.md ================================================ # Datatypes `sqlc` attempts to make reasonable default choices when mapping internal 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.md#overrides) in your `sqlc` config file. ## Arrays PostgreSQL [arrays](https://www.postgresql.org/docs/current/arrays.html) are materialized as Go slices. ```sql CREATE TABLE places ( name text not null, tags text[] ); ``` ```go package db type Place struct { Name string Tags []string } ``` ## Dates and times All date and time types are returned as `time.Time` structs. For null time or date values, the `NullTime` type from `database/sql` is used. The `pgx/v5` sql package uses the appropriate pgx types. For MySQL users relying on `github.com/go-sql-driver/mysql`, ensure that `parseTime=true` is added to your database connection string. ```sql CREATE TABLE authors ( id SERIAL PRIMARY KEY, created_at timestamp NOT NULL DEFAULT NOW(), updated_at timestamp ); ``` ```go package db import ( "database/sql" "time" ) type Author struct { ID int CreatedAt time.Time UpdatedAt sql.NullTime } ``` ## Enums PostgreSQL [enums](https://www.postgresql.org/docs/current/datatype-enum.html) are mapped to an aliased string type. ```sql CREATE TYPE status AS ENUM ( 'open', 'closed' ); CREATE TABLE stores ( name text PRIMARY KEY, status status NOT NULL ); ``` ```go package db type Status string const ( StatusOpen Status = "open" StatusClosed Status = "closed" ) type Store struct { Name string Status Status } ``` ## Null For structs, null values are represented using the appropriate type from the `database/sql` or `pgx` package. ```sql CREATE TABLE authors ( id SERIAL PRIMARY KEY, name text NOT NULL, bio text ); ``` ```go package db import ( "database/sql" ) type Author struct { ID int Name string Bio sql.NullString } ``` ## UUIDs The Go standard library does not come with a `uuid` package. For UUID support, sqlc uses the excellent `github.com/google/uuid` package. The pgx/v5 sql package uses `pgtype.UUID`. ```sql CREATE TABLE records ( id uuid PRIMARY KEY ); ``` ```go package db import ( "github.com/google/uuid" ) type Author struct { ID uuid.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": [ { "column": "*.uuid", "go_type": "github.com/google/uuid.UUID" } ] } ``` ## 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 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 type BookData struct { Genres []string `json:"genres"` Title string `json:"title"` Published bool `json:"published"` } ``` ```sql CREATE TABLE books ( data jsonb ); ``` ```json { "overrides": [ { "column": "books.data", "go_type": { "import":"example.com/db", "package": "dto", "type":"BookData", "pointer": true } } ] } ``` ```go package db import ( "example.com/db/dto" ) type Book struct { Data *dto.BookData } ``` ## 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. See [Overriding types](../howto/overrides.md) for more information. ```sql -- Multipolygons in British National Grid (epsg:27700) create table shapes( id serial, name varchar, geom geometry(Multipolygon, 27700) ); -- name: GetShapes :many SELECT * FROM shapes; ``` ```json { "version": "1", "packages": [ { "path": "db", "engine": "postgresql", "schema": "query.sql", "queries": "query.sql" } ], "overrides": [ { "db_type": "geometry", "go_type": "github.com/twpayne/go-geom.MultiPolygon" }, { "db_type": "geometry", "go_type": "github.com/twpayne/go-geom.MultiPolygon", "nullable": true } ] } ``` ================================================ FILE: docs/reference/environment-variables.md ================================================ # Environment variables ## SQLCEXPERIMENT The `SQLCEXPERIMENT` variable controls experimental features within sqlc. It is a comma-separated list of experiment names. This is modeled after Go's [GOEXPERIMENT](https://pkg.go.dev/internal/goexperiment) environment variable. Experiment names can be prefixed with `no` to explicitly disable them. ``` SQLCEXPERIMENT=foo,bar # enable foo and bar experiments SQLCEXPERIMENT=nofoo # explicitly disable foo experiment SQLCEXPERIMENT=foo,nobar # enable foo, disable bar ``` Currently, no experiments are defined. Experiments will be documented here as they are introduced. ## SQLCCACHE The `SQLCCACHE` environment variable dictates where `sqlc` will store cached WASM-based plugins and modules. By default `sqlc` follows the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html). ## SQLCDEBUG The `SQLCDEBUG` variable controls debugging variables within the runtime. It is a comma-separated list of name=val pairs settings. ### dumpast The `dumpast` command shows the SQL AST that was generated by the parser. Note that this is the generic SQL AST, not the engine-specific SQL AST. ``` SQLCDEBUG=dumpast=1 ``` ``` ([]interface {}) (len=1 cap=1) { (*catalog.Catalog)(0xc0004f48c0)({ Comment: (string) "", DefaultSchema: (string) (len=6) "public", Name: (string) "", Schemas: ([]*catalog.Schema) (len=3 cap=4) { (*catalog.Schema)(0xc0004f4930)({ Name: (string) (len=6) "public", Tables: ([]*catalog.Table) (len=1 cap=1) { (*catalog.Table)(0xc00052ff20)({ Rel: (*ast.TableName)(0xc00052fda0)({ Catalog: (string) "", Schema: (string) "", Name: (string) (len=7) "authors" }), ``` ### dumpcatalog The `dumpcatalog` command outputs the entire catalog. If you're using MySQL or PostgreSQL, this can be a bit overwhelming. Expect this output to change in future versions. ``` SQLCDEBUG=dumpcatalog=1 ``` ``` ([]interface {}) (len=1 cap=1) { (*catalog.Catalog)(0xc00050d1f0)({ Comment: (string) "", DefaultSchema: (string) (len=6) "public", Name: (string) "", Schemas: ([]*catalog.Schema) (len=3 cap=4) { (*catalog.Schema)(0xc00050d260)({ Name: (string) (len=6) "public", Tables: ([]*catalog.Table) (len=1 cap=1) { (*catalog.Table)(0xc0000c0840)({ Rel: (*ast.TableName)(0xc0000c06c0)({ Catalog: (string) "", Schema: (string) "", Name: (string) (len=7) "authors" }), ``` ### trace The `trace` command is helpful for tracking down performance issues. `SQLCDEBUG=trace=1` By default, the trace output is written to `trace.out` in the current working directory. You can configure a different path if needed. `SQLCDEBUG=trace=name.out` View the execution trace using the Go `trace` tool. ``` go tool trace trace.out ``` There's a ton of different views for the trace output, but here's an example log showing the execution time for each package. ``` 0.000043897 . 1 task sqlc (id 1, parent 0) created 0.000144923 . 101026 1 region generate started (duration: 47.619781ms) 0.001048975 . 904052 1 region package started (duration: 14.588456ms) 0.001054616 . 5641 1 name=authors dir=/Users/kyle/projects/sqlc/examples/python language=python 0.001071257 . 16641 1 region parse started (duration: 7.966549ms) 0.009043960 . 7972703 1 region codegen started (duration: 6.587086ms) 0.009171704 . 127744 1 new goroutine 35: text/template/parse.lex·dwrap·1 0.010361654 . 1189950 1 new goroutine 36: text/template/parse.lex·dwrap·1 0.015641815 . 5280161 1 region package started (duration: 10.904938ms) 0.015644943 . 3128 1 name=booktest dir=/Users/kyle/projects/sqlc/examples/python language=python 0.015647431 . 2488 1 region parse started (duration: 4.207749ms) 0.019860308 . 4212877 1 region codegen started (duration: 6.681624ms) 0.020028488 . 168180 1 new goroutine 37: text/template/parse.lex·dwrap·1 0.021020310 . 991822 1 new goroutine 8: text/template/parse.lex·dwrap·1 0.026551163 . 5530853 1 region package started (duration: 9.217294ms) 0.026554368 . 3205 1 name=jets dir=/Users/kyle/projects/sqlc/examples/python language=python 0.026556804 . 2436 1 region parse started (duration: 3.491005ms) 0.030051911 . 3495107 1 region codegen started (duration: 5.711931ms) 0.030213937 . 162026 1 new goroutine 20: text/template/parse.lex·dwrap·1 0.031099938 . 886001 1 new goroutine 38: text/template/parse.lex·dwrap·1 0.035772637 . 4672699 1 region package started (duration: 10.267039ms) 0.035775688 . 3051 1 name=ondeck dir=/Users/kyle/projects/sqlc/examples/python language=python 0.035778150 . 2462 1 region parse started (duration: 4.094518ms) 0.039877181 . 4099031 1 region codegen started (duration: 6.156341ms) 0.040010771 . 133590 1 new goroutine 39: text/template/parse.lex·dwrap·1 0.040894567 . 883796 1 new goroutine 40: text/template/parse.lex·dwrap·1 0.046042779 . 5148212 1 region writefiles started (duration: 1.718259ms) 0.047767781 . 1725002 1 task end ``` ### processplugins Setting this value to `0` disables process-based plugins. If a process-based plugin is declared in the configuration file, running any `sqlc` command will return an error. `SQLCDEBUG=processplugins=0` ### dumpvetenv The `dumpvetenv` command prints the variables available to a `sqlc vet` rule during evaluation. `SQLCDEBUG=dumpvetenv=1` ### dumpexplain The `dumpexplain` command prints the JSON-formatted result from running `EXPLAIN ...` on a query when a `sqlc vet` rule evaluation requires its output. `SQLCDEBUG=dumpexplain=1` ## SQLCTMPDIR If specified, use the given directory as the base for temporary folders. Only applies when using WASM-based codegen plugins. When not specified, this defaults to passing an empty string to [`os.MkdirTemp`](https://pkg.go.dev/os#MkdirTemp). ================================================ FILE: docs/reference/language-support.rst ================================================ Database and language support ############################# ========== ======================= ============ ============ =============== 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 ************************** 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 Python `rayakame/sqlc-gen-better-python`_ N/A Beta Beta [Any] `fdietze/sqlc-gen-from-template`_ Stable Stable Stable ======== ================================== =============== =============== =============== Plugins developed by our Community can also be found using our `github topic`_. 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 .. _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 .. _rayakame/sqlc-gen-better-python: https://github.com/rayakame/sqlc-gen-better-python .. _github topic: https://github.com/topics/sqlc-plugin ================================================ FILE: docs/reference/macros.md ================================================ # Macros ## `sqlc.arg` Attach a name to a parameter in a SQL query. This macro expands to an engine-specific parameter placeholder. The name of the parameter is noted and used during code generation. ```sql -- name: GetAuthorByName :one SELECT * FROM authors WHERE lower(name) = sqlc.arg(name); -- >>> EXPANDS TO >>> -- name: GetAuthorByName :one SELECT * FROM authors WHERE lower(name) = ?; ``` See more examples in [Naming parameters](../howto/named_parameters). ## `sqlc.embed` Embedding allows you to reuse existing model structs in more queries, resulting in less manual serialization work. First, imagine we have the following schema with students and test scores. ```sql CREATE TABLE students ( id bigserial PRIMARY KEY, name text, age integer ); CREATE TABLE test_scores ( student_id bigint, score integer, grade text ); ``` ```sql -- name: GetStudentAndScore :one SELECT sqlc.embed(students), sqlc.embed(test_scores) FROM students JOIN test_scores ON test_scores.student_id = students.id WHERE students.id = $1; -- >>> EXPANDS TO >>> -- name: GetStudentAndScore :one SELECT students.*, test_scores.* FROM students JOIN test_scores ON test_scores.student_id = students.id WHERE students.id = $1; ``` The Go method will return a struct with a field for the `Student` and field for the test `TestScore` instead of each column existing on the struct. ```go type GetStudentAndScoreRow struct { Student Student TestScore TestScore } func (q *Queries) GetStudentAndScore(ctx context.Context, id int64) (GetStudentAndScoreRow, error) { // ... } ``` See a full example in [Embedding structs](../howto/embedding). ## `sqlc.narg` The same as `sqlc.arg`, but always marks the parameter as nullable. ```sql -- name: GetAuthorByName :one SELECT * FROM authors WHERE lower(name) = sqlc.narg(name); -- >>> EXPANDS TO >>> -- name: GetAuthorByName :one SELECT * FROM authors WHERE LOWER(name) = ?; ``` See more examples in [Naming parameters](../howto/named_parameters). ## `sqlc.slice` For drivers that do not support passing slices to the IN operator, the `sqlc.slice` macro generates a dynamic query at runtime with the correct number of parameters. ```sql /* name: SelectStudents :many */ SELECT * FROM students WHERE age IN (sqlc.slice("ages")) -- >>> EXPANDS TO >>> /* name: SelectStudents :many */ SELECT id, name, age FROM authors WHERE age IN (/*SLICE:ages*/?) ``` 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.md#mysql-and-sqlite). ================================================ FILE: docs/reference/query-annotations.md ================================================ # Query annotations sqlc requires each query to have a small comment indicating the name and command. The format of this comment is as follows: ```sql -- name: ``` ## `:exec` The generated method will return the error from [ExecContext](https://golang.org/pkg/database/sql/#DB.ExecContext). ```sql -- name: DeleteAuthor :exec DELETE FROM authors WHERE id = $1; ``` ```go func (q *Queries) DeleteAuthor(ctx context.Context, id int64) error { _, err := q.db.ExecContext(ctx, deleteAuthor, id) return err } ``` ## `:execresult` The generated method will return the [sql.Result](https://golang.org/pkg/database/sql/#Result) returned by [ExecContext](https://golang.org/pkg/database/sql/#DB.ExecContext). ```sql -- name: DeleteAllAuthors :execresult DELETE FROM authors; ``` ```go func (q *Queries) DeleteAllAuthors(ctx context.Context) (sql.Result, error) { return q.db.ExecContext(ctx, deleteAllAuthors) } ``` ## `:execrows` The generated method will return the number of affected rows from the [result](https://golang.org/pkg/database/sql/#Result) returned by [ExecContext](https://golang.org/pkg/database/sql/#DB.ExecContext). ```sql -- name: DeleteAllAuthors :execrows DELETE FROM authors; ``` ```go func (q *Queries) DeleteAllAuthors(ctx context.Context) (int64, error) { _, err := q.db.ExecContext(ctx, deleteAllAuthors) // ... } ``` ## `:execlastid` The generated method will return the number generated by the database from the [result](https://golang.org/pkg/database/sql/#Result) returned by [ExecContext](https://golang.org/pkg/database/sql/#DB.ExecContext). ```sql -- name: InsertAuthor :execlastid INSERT INTO authors (name) VALUES (?); ``` ```go func (q *Queries) InsertAuthor(ctx context.Context, name string) (int64, error) { _, err := q.db.ExecContext(ctx, insertAuthor, name) // ... } ``` ## `:many` The generated method will return a slice of records via [QueryContext](https://golang.org/pkg/database/sql/#DB.QueryContext). ```sql -- name: ListAuthors :many SELECT * FROM authors ORDER BY name; ``` ```go func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthors) // ... } ``` ## `:one` The generated method will return a single record via [QueryRowContext](https://golang.org/pkg/database/sql/#DB.QueryRowContext). ```sql -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; ``` ```go func (q *Queries) GetAuthor(ctx context.Context, id int64) (Author, error) { row := q.db.QueryRowContext(ctx, getAuthor, id) // ... } ``` ## `:batchexec` __NOTE: This command only works with PostgreSQL using the `pgx/v4` and `pgx/v5` drivers and outputting Go code.__ The generated method will return a batch object. The batch object will have the following methods: - `Exec`, that takes a `func(int, error)` parameter, - `Close`, to close the batch operation early. ```sql -- name: DeleteBook :batchexec DELETE FROM books WHERE book_id = $1; ``` ```go type DeleteBookBatchResults struct { br pgx.BatchResults ind int } func (q *Queries) DeleteBook(ctx context.Context, bookID []int32) *DeleteBookBatchResults { //... } func (b *DeleteBookBatchResults) Exec(f func(int, error)) { //... } func (b *DeleteBookBatchResults) Close() error { //... } ``` ## `:batchmany` __NOTE: This command only works with PostgreSQL using the `pgx/v4` and `pgx/v5` drivers and outputting Go code.__ The generated method will return a batch object. The batch object will have the following methods: - `Query`, that takes a `func(int, []T, error)` parameter, where `T` is your query's return type - `Close`, to close the batch operation early. ```sql -- name: BooksByTitleYear :batchmany SELECT * FROM books WHERE title = $1 AND year = $2; ``` ```go type BooksByTitleYearBatchResults struct { br pgx.BatchResults ind int } type BooksByTitleYearParams struct { Title string `json:"title"` Year int32 `json:"year"` } func (q *Queries) BooksByTitleYear(ctx context.Context, arg []BooksByTitleYearParams) *BooksByTitleYearBatchResults { //... } func (b *BooksByTitleYearBatchResults) Query(f func(int, []Book, error)) { //... } func (b *BooksByTitleYearBatchResults) Close() error { //... } ``` ## `:batchone` __NOTE: This command only works with PostgreSQL using the `pgx/v4` and `pgx/v5` drivers and outputting Go code.__ The generated method will return a batch object. The batch object will have the following methods: - `QueryRow`, that takes a `func(int, T, error)` parameter, where `T` is your query's return type - `Close`, to close the batch operation early. ```sql -- name: CreateBook :batchone INSERT INTO books ( author_id, isbn ) VALUES ( $1, $2 ) RETURNING book_id, author_id, isbn ``` ```go type CreateBookBatchResults struct { br pgx.BatchResults ind int } type CreateBookParams struct { AuthorID int32 `json:"author_id"` Isbn string `json:"isbn"` } func (q *Queries) CreateBook(ctx context.Context, arg []CreateBookParams) *CreateBookBatchResults { //... } func (b *CreateBookBatchResults) QueryRow(f func(int, Book, error)) { //... } 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. ================================================ FILE: docs/requirements.txt ================================================ Babel==2.17.0 Jinja2==3.1.6 MarkupSafe==3.0.3 Pygments==2.19.2 Sphinx==7.4.7 certifi==2026.1.4 chardet==5.2.0 commonmark==0.9.1 docutils==0.20.1 idna==3.11 imagesize==1.4.1 myst-parser==4.0.1 packaging==25.0 pyparsing==3.3.1 pytz==2025.2 requests==2.32.5 snowballstemmer==3.0.1 sphinx-favicon==1.0.1 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==2.0.0 sphinxcontrib-serializinghtml==2.0.0 sphinxext-rediraffe==0.3.0 urllib3==2.6.2 ================================================ FILE: docs/tutorials/getting-started-mysql.md ================================================ # Getting started with MySQL This tutorial assumes that the latest version of sqlc is [installed](../overview/install.md) and ready to use. We'll generate Go code here, but other [language plugins](../reference/language-support.rst) are available. You'll naturally need the Go toolchain if you want to build and run a program with the code sqlc generates, but sqlc itself has no dependencies. 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. Initialize a new Go module named `tutorial.sqlc.dev/app` ```shell go mod init tutorial.sqlc.dev/app ``` sqlc looks for either a `sqlc.(yaml|yml)` or `sqlc.json` file in the current directory. In our new directory, create a file named `sqlc.yaml` with the following contents: ```yaml version: "2" sql: - engine: "mysql" queries: "query.sql" schema: "schema.sql" gen: go: package: "tutorial" out: "tutorial" ``` ## Schema and queries sqlc needs to know your database schema and queries in order to generate code. In the same directory, create a file named `schema.sql` with the following content: ```sql CREATE TABLE authors ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, name text NOT NULL, bio text ); ``` Next, create a `query.sql` file with the following four queries: ```sql -- name: GetAuthor :one SELECT * FROM authors WHERE id = ? LIMIT 1; -- name: ListAuthors :many SELECT * FROM authors ORDER BY name; -- name: CreateAuthor :execresult INSERT INTO authors ( name, bio ) VALUES ( ?, ? ); -- name: DeleteAuthor :exec DELETE FROM authors WHERE id = ?; ``` ## Generating code You are now ready to generate code. You shouldn't see any output when you run the `generate` subcommand, unless something goes wrong: ```shell sqlc generate ``` You should now have a `tutorial` subdirectory with three files containing Go source code. These files comprise a Go package named `tutorial`: ``` ├── go.mod ├── query.sql ├── schema.sql ├── sqlc.yaml └── tutorial ├── db.go ├── models.go └── query.sql.go ``` ## Using generated code You can use your newly-generated `tutorial` package from any Go program. Create a file named `tutorial.go` and add the following contents: ```go package main import ( "context" "database/sql" "log" "reflect" _ "github.com/go-sql-driver/mysql" "tutorial.sqlc.dev/app/tutorial" ) func run() error { ctx := context.Background() db, err := sql.Open("mysql", "user:password@/dbname?parseTime=true") if err != nil { return err } queries := tutorial.New(db) // list all authors authors, err := queries.ListAuthors(ctx) if err != nil { return err } log.Println(authors) // create an author result, err := queries.CreateAuthor(ctx, tutorial.CreateAuthorParams{ Name: "Brian Kernighan", Bio: sql.NullString{String: "Co-author of The C Programming Language and The Go Programming Language", Valid: true}, }) if err != nil { return err } insertedAuthorID, err := result.LastInsertId() if err != nil { return err } log.Println(insertedAuthorID) // get the author we just inserted fetchedAuthor, err := queries.GetAuthor(ctx, insertedAuthorID) if err != nil { return err } // prints true log.Println(reflect.DeepEqual(insertedAuthorID, fetchedAuthor.ID)) return nil } func main() { if err := run(); err != nil { log.Fatal(err) } } ``` Before this code will compile you'll need to fetch the relevant MySQL driver: ```shell go get github.com/go-sql-driver/mysql go build ./... ``` The program should compile without errors. To make that possible, sqlc generates readable, **idiomatic** Go code that you otherwise would've had to write yourself. Take a look in `tutorial/query.sql.go`. Of course for this program to run successfully you'll need to compile after replacing the database connection parameters in the call to `sql.Open()` with the correct parameters for your database. And your database must have the `authors` table as defined in `schema.sql`. 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 ``` ================================================ FILE: docs/tutorials/getting-started-postgresql.md ================================================ # Getting started with PostgreSQL This tutorial assumes that the latest version of sqlc is [installed](../overview/install.md) and ready to use. We'll generate Go code here, but other [language plugins](../reference/language-support.rst) are available. You'll naturally need the Go toolchain if you want to build and run a program with the code sqlc generates, but sqlc itself has no dependencies. 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. Initialize a new Go module named `tutorial.sqlc.dev/app`: ```shell go mod init tutorial.sqlc.dev/app ``` sqlc looks for either a `sqlc.(yaml|yml)` or `sqlc.json` file in the current directory. In our new directory, create a file named `sqlc.yaml` with the following contents: ```yaml version: "2" sql: - engine: "postgresql" queries: "query.sql" schema: "schema.sql" gen: go: package: "tutorial" out: "tutorial" sql_package: "pgx/v5" ``` ## Schema and queries sqlc needs to know your database schema and queries in order to generate code. In the same directory, create a file named `schema.sql` with the following content: ```sql CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ``` Next, create a `query.sql` file with the following five queries: ```sql -- 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: UpdateAuthor :exec UPDATE authors set name = $2, bio = $3 WHERE id = $1; -- name: DeleteAuthor :exec DELETE FROM authors WHERE id = $1; ``` If you prefer, you can alter the `UpdateAuthor` query to return the updated record: ```sql -- name: UpdateAuthor :one UPDATE authors set name = $2, bio = $3 WHERE id = $1 RETURNING *; ``` ## Generating code You are now ready to generate code. You shouldn't see any output when you run the `generate` subcommand, unless something goes wrong: ```shell sqlc generate ``` You should now have a `tutorial` subdirectory with three files containing Go source code. These files comprise a Go package named `tutorial`: ``` ├── go.mod ├── query.sql ├── schema.sql ├── sqlc.yaml └── tutorial ├── db.go ├── models.go └── query.sql.go ``` ## Using generated code You can use your newly-generated `tutorial` package from any Go program. Create a file named `tutorial.go` and add the following contents: ```go package main import ( "context" "log" "reflect" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgtype" "tutorial.sqlc.dev/app/tutorial" ) func run() error { ctx := context.Background() conn, err := pgx.Connect(ctx, "user=pqgotest dbname=pqgotest sslmode=verify-full") if err != nil { return err } defer conn.Close(ctx) queries := tutorial.New(conn) // list all authors authors, err := queries.ListAuthors(ctx) if err != nil { return err } log.Println(authors) // create an author insertedAuthor, err := queries.CreateAuthor(ctx, tutorial.CreateAuthorParams{ Name: "Brian Kernighan", Bio: pgtype.Text{String: "Co-author of The C Programming Language and The Go Programming Language", Valid: true}, }) if err != nil { return err } log.Println(insertedAuthor) // get the author we just inserted fetchedAuthor, err := queries.GetAuthor(ctx, insertedAuthor.ID) if err != nil { return err } // prints true log.Println(reflect.DeepEqual(insertedAuthor, fetchedAuthor)) return nil } func main() { if err := run(); err != nil { log.Fatal(err) } } ``` Before this code will compile you'll need to fetch the relevant PostgreSQL driver. You can use `lib/pq` with the standard library's `database/sql` package, but in this tutorial we've used `pgx/v5`: ```shell go get github.com/jackc/pgx/v5 go build ./... ``` The program should compile without errors. To make that possible, sqlc generates readable, **idiomatic** Go code that you otherwise would've had to write yourself. Take a look in `tutorial/query.sql.go`. Of course for this program to run successfully you'll need to compile after replacing the database connection parameters in the call to `pgx.Connect()` with the correct parameters for your database. And your database must have the `authors` table as defined in `schema.sql`. You should now have a working program using sqlc's generated Go source code, and hopefully can see how you'd use sqlc in your own real-world applications. ## 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 ``` ================================================ FILE: docs/tutorials/getting-started-sqlite.md ================================================ # Getting started with SQLite This tutorial assumes that the latest version of sqlc is [installed](../overview/install.md) and ready to use. We'll generate Go code here, but other [language plugins](../reference/language-support.rst) are available. You'll naturally need the Go toolchain if you want to build and run a program with the code sqlc generates, but sqlc itself has no dependencies. ## Setting up Create a new directory called `sqlc-tutorial` and open it up. Initialize a new Go module named `tutorial.sqlc.dev/app` ```shell go mod init tutorial.sqlc.dev/app ``` sqlc looks for either a `sqlc.(yaml|yml)` or `sqlc.json` file in the current directory. In our new directory, create a file named `sqlc.yaml` with the following contents: ```yaml version: "2" sql: - engine: "sqlite" queries: "query.sql" schema: "schema.sql" gen: go: package: "tutorial" out: "tutorial" ``` ## Schema and queries sqlc needs to know your database schema and queries in order to generate code. In the same directory, create a file named `schema.sql` with the following content: ```sql CREATE TABLE authors ( id INTEGER PRIMARY KEY, name text NOT NULL, bio text ); ``` Next, create a `query.sql` file with the following five queries: ```sql -- name: GetAuthor :one SELECT * FROM authors WHERE id = ? LIMIT 1; -- name: ListAuthors :many SELECT * FROM authors ORDER BY name; -- name: CreateAuthor :one INSERT INTO authors ( name, bio ) VALUES ( ?, ? ) RETURNING *; -- name: UpdateAuthor :exec UPDATE authors set name = ?, bio = ? WHERE id = ?; -- name: DeleteAuthor :exec DELETE FROM authors WHERE id = ?; ``` If you prefer, you can alter the `UpdateAuthor` query to return the updated record: ```sql -- name: UpdateAuthor :one UPDATE authors set name = ?, bio = ? WHERE id = ? RETURNING *; ``` ## Generating code You are now ready to generate code. You shouldn't see any output when you run the `generate` subcommand, unless something goes wrong: ```shell sqlc generate ``` You should now have a `tutorial` subdirectory with three files containing Go source code. These files comprise a Go package named `tutorial`: ``` ├── go.mod ├── query.sql ├── schema.sql ├── sqlc.yaml └── tutorial ├── db.go ├── models.go └── query.sql.go ``` ## Using generated code You can use your newly-generated `tutorial` package from any Go program. Create a file named `tutorial.go` and add the following contents: ```go package main import ( "context" "database/sql" _ "embed" "log" "reflect" _ "modernc.org/sqlite" "tutorial.sqlc.dev/app/tutorial" ) //go:embed schema.sql var ddl string func run() error { ctx := context.Background() db, err := sql.Open("sqlite", ":memory:") if err != nil { return err } // create tables if _, err := db.ExecContext(ctx, ddl); err != nil { return err } queries := tutorial.New(db) // list all authors authors, err := queries.ListAuthors(ctx) if err != nil { return err } log.Println(authors) // create an author insertedAuthor, err := queries.CreateAuthor(ctx, tutorial.CreateAuthorParams{ Name: "Brian Kernighan", Bio: sql.NullString{String: "Co-author of The C Programming Language and The Go Programming Language", Valid: true}, }) if err != nil { return err } log.Println(insertedAuthor) // get the author we just inserted fetchedAuthor, err := queries.GetAuthor(ctx, insertedAuthor.ID) if err != nil { return err } // prints true log.Println(reflect.DeepEqual(insertedAuthor, fetchedAuthor)) return nil } func main() { if err := run(); err != nil { log.Fatal(err) } } ``` Before this code will compile you'll need to fetch the relevant SQLite driver: ```shell go get modernc.org/sqlite go build ./... ``` The program should compile without errors, and run successfully. To make that possible, sqlc generates readable, **idiomatic** Go code that you otherwise would've had to write yourself. Take a look in `tutorial/query.sql.go`. You should now have a working program using sqlc's generated Go source code, and hopefully can see how you'd use sqlc in your own real-world applications. ================================================ FILE: examples/authors/mysql/db.go ================================================ // 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, } } ================================================ FILE: examples/authors/mysql/db_test.go ================================================ //go:build examples package authors import ( "context" "database/sql" "testing" _ "github.com/go-sql-driver/mysql" "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func TestAuthors(t *testing.T) { 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 authors, err := db.ListAuthors(ctx) if err != nil { t.Fatal(err) } t.Log(authors) // create an author result, err := db.CreateAuthor(ctx, CreateAuthorParams{ Name: "Brian Kernighan", Bio: sql.NullString{String: "Co-author of The C Programming Language and The Go Programming Language", Valid: true}, }) if err != nil { t.Fatal(err) } authorID, err := result.LastInsertId() if err != nil { t.Fatal(err) } t.Log(authorID) // get the author we just inserted fetchedAuthor, err := db.GetAuthor(ctx, authorID) if err != nil { t.Fatal(err) } t.Log(fetchedAuthor) } ================================================ FILE: examples/authors/mysql/models.go ================================================ // 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 } ================================================ FILE: examples/authors/mysql/query.sql ================================================ /* name: GetAuthor :one */ SELECT * FROM authors WHERE id = ? LIMIT 1; /* name: ListAuthors :many */ SELECT * FROM authors ORDER BY name; /* name: CreateAuthor :execresult */ INSERT INTO authors ( name, bio ) VALUES ( ?, ? ); /* name: DeleteAuthor :exec */ DELETE FROM authors WHERE id = ?; ================================================ FILE: examples/authors/mysql/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package authors import ( "context" "database/sql" ) const createAuthor = `-- name: CreateAuthor :execresult INSERT INTO authors ( name, bio ) VALUES ( ?, ? ) ` type CreateAuthorParams struct { Name string Bio sql.NullString } func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (sql.Result, error) { return q.db.ExecContext(ctx, createAuthor, arg.Name, arg.Bio) } 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 getAuthor = `-- name: GetAuthor :one SELECT id, name, bio FROM authors WHERE id = ? 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 } ================================================ FILE: examples/authors/mysql/schema.sql ================================================ CREATE TABLE authors ( id BIGINT PRIMARY KEY AUTO_INCREMENT, name text NOT NULL, bio text ); ================================================ FILE: examples/authors/postgresql/db.go ================================================ // 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, } } ================================================ FILE: examples/authors/postgresql/db_test.go ================================================ //go:build examples package authors import ( "context" "testing" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgtype" "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func TestAuthors(t *testing.T) { ctx := context.Background() uri := local.PostgreSQL(t, []string{"schema.sql"}) db, err := pgx.Connect(ctx, uri) if err != nil { t.Fatal(err) } defer db.Close(ctx) q := New(db) // list all authors authors, err := q.ListAuthors(ctx) if err != nil { t.Fatal(err) } t.Log(authors) // create an author insertedAuthor, err := q.CreateAuthor(ctx, CreateAuthorParams{ Name: "Brian Kernighan", Bio: pgtype.Text{String: "Co-author of The C Programming Language and The Go Programming Language", Valid: true}, }) if err != nil { t.Fatal(err) } t.Log(insertedAuthor) // get the author we just inserted fetchedAuthor, err := q.GetAuthor(ctx, insertedAuthor.ID) if err != nil { t.Fatal(err) } t.Log(fetchedAuthor) } ================================================ FILE: examples/authors/postgresql/models.go ================================================ // 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 } ================================================ FILE: examples/authors/postgresql/query.sql ================================================ -- 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; ================================================ FILE: examples/authors/postgresql/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package authors import ( "context" "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) 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.Exec(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.QueryRow(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.Query(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: examples/authors/postgresql/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: examples/authors/sqlc.yaml ================================================ version: '2' cloud: project: "01HAQMMECEYQYKFJN8MP16QC41" sql: - name: postgresql schema: postgresql/schema.sql queries: postgresql/query.sql engine: postgresql database: uri: "${VET_TEST_EXAMPLES_POSTGRES_AUTHORS}" analyzer: database: false rules: - sqlc/db-prepare - postgresql-query-too-costly gen: go: package: authors sql_package: pgx/v5 out: postgresql - name: mysql schema: mysql/schema.sql queries: mysql/query.sql engine: mysql database: uri: "${VET_TEST_EXAMPLES_MYSQL_AUTHORS}" rules: - sqlc/db-prepare # - mysql-query-too-costly gen: go: package: authors out: mysql - name: sqlite schema: sqlite/schema.sql queries: sqlite/query.sql engine: sqlite database: uri: file:authors?mode=memory&cache=shared rules: - sqlc/db-prepare gen: go: package: authors out: sqlite rules: - name: postgresql-query-too-costly message: "Too costly" rule: "postgresql.explain.plan.total_cost > 300.0" - name: mysql-query-too-costly message: "Too costly" rule: "has(mysql.explain.query_block.cost_info) && double(mysql.explain.query_block.cost_info.query_cost) > 2.0" ================================================ FILE: examples/authors/sqlite/db.go ================================================ // 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, } } ================================================ FILE: examples/authors/sqlite/db_test.go ================================================ //go:build examples package authors import ( "context" "database/sql" "testing" "github.com/sqlc-dev/sqlc/internal/sqltest" ) func TestAuthors(t *testing.T) { sdb, cleanup := sqltest.SQLite(t, []string{"schema.sql"}) defer sdb.Close() defer cleanup() ctx := context.Background() db := New(sdb) // list all authors authors, err := db.ListAuthors(ctx) if err != nil { t.Fatal(err) } t.Log(authors) // create an author result, err := db.CreateAuthor(ctx, CreateAuthorParams{ Name: "Brian Kernighan", Bio: sql.NullString{String: "Co-author of The C Programming Language and The Go Programming Language", Valid: true}, }) if err != nil { t.Fatal(err) } authorID, err := result.LastInsertId() if err != nil { t.Fatal(err) } t.Log(authorID) // get the author we just inserted fetchedAuthor, err := db.GetAuthor(ctx, authorID) if err != nil { t.Fatal(err) } t.Log(fetchedAuthor) } ================================================ FILE: examples/authors/sqlite/models.go ================================================ // 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 } ================================================ FILE: examples/authors/sqlite/query.sql ================================================ /* name: GetAuthor :one */ SELECT * FROM authors WHERE id = ? LIMIT 1; /* name: ListAuthors :many */ SELECT * FROM authors ORDER BY name; /* name: CreateAuthor :execresult */ INSERT INTO authors ( name, bio ) VALUES ( ?, ? ); /* name: DeleteAuthor :exec */ DELETE FROM authors WHERE id = ?; ================================================ FILE: examples/authors/sqlite/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package authors import ( "context" "database/sql" ) const createAuthor = `-- name: CreateAuthor :execresult INSERT INTO authors ( name, bio ) VALUES ( ?, ? ) ` type CreateAuthorParams struct { Name string Bio sql.NullString } func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (sql.Result, error) { return q.db.ExecContext(ctx, createAuthor, arg.Name, arg.Bio) } 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 getAuthor = `-- name: GetAuthor :one SELECT id, name, bio FROM authors WHERE id = ? 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 } ================================================ FILE: examples/authors/sqlite/schema.sql ================================================ CREATE TABLE authors ( id integer PRIMARY KEY AUTOINCREMENT, name text NOT NULL, bio text ); ================================================ FILE: examples/batch/postgresql/batch.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: batch.go package batch import ( "context" "errors" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgtype" ) var ( ErrBatchAlreadyClosed = errors.New("batch already closed") ) const booksByYear = `-- name: BooksByYear :batchmany SELECT book_id, author_id, isbn, book_type, title, year, available, tags FROM books WHERE year = $1 ` type BooksByYearBatchResults struct { br pgx.BatchResults tot int closed bool } func (q *Queries) BooksByYear(ctx context.Context, year []int32) *BooksByYearBatchResults { batch := &pgx.Batch{} for _, a := range year { vals := []interface{}{ a, } batch.Queue(booksByYear, vals...) } br := q.db.SendBatch(ctx, batch) return &BooksByYearBatchResults{br, len(year), false} } func (b *BooksByYearBatchResults) Query(f func(int, []Book, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var items []Book if b.closed { if f != nil { f(t, items, ErrBatchAlreadyClosed) } continue } err := func() error { rows, err := b.br.Query() if err != nil { return err } defer rows.Close() for rows.Next() { var i Book if err := rows.Scan( &i.BookID, &i.AuthorID, &i.Isbn, &i.BookType, &i.Title, &i.Year, &i.Available, &i.Tags, ); err != nil { return err } items = append(items, i) } return rows.Err() }() if f != nil { f(t, items, err) } } } func (b *BooksByYearBatchResults) Close() error { b.closed = true return b.br.Close() } const createBook = `-- name: CreateBook :batchone INSERT INTO books ( author_id, isbn, book_type, title, year, available, tags ) VALUES ( $1, $2, $3, $4, $5, $6, $7 ) RETURNING book_id, author_id, isbn, book_type, title, year, available, tags ` type CreateBookBatchResults struct { br pgx.BatchResults tot int closed bool } type CreateBookParams struct { AuthorID int32 `json:"author_id"` Isbn string `json:"isbn"` BookType BookType `json:"book_type"` Title string `json:"title"` Year int32 `json:"year"` Available pgtype.Timestamptz `json:"available"` Tags []string `json:"tags"` } func (q *Queries) CreateBook(ctx context.Context, arg []CreateBookParams) *CreateBookBatchResults { batch := &pgx.Batch{} for _, a := range arg { vals := []interface{}{ a.AuthorID, a.Isbn, a.BookType, a.Title, a.Year, a.Available, a.Tags, } batch.Queue(createBook, vals...) } br := q.db.SendBatch(ctx, batch) return &CreateBookBatchResults{br, len(arg), false} } func (b *CreateBookBatchResults) QueryRow(f func(int, Book, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var i Book if b.closed { if f != nil { f(t, i, ErrBatchAlreadyClosed) } continue } row := b.br.QueryRow() err := row.Scan( &i.BookID, &i.AuthorID, &i.Isbn, &i.BookType, &i.Title, &i.Year, &i.Available, &i.Tags, ) if f != nil { f(t, i, err) } } } func (b *CreateBookBatchResults) Close() error { b.closed = true return b.br.Close() } const deleteBook = `-- name: DeleteBook :batchexec DELETE FROM books WHERE book_id = $1 ` type DeleteBookBatchResults struct { br pgx.BatchResults tot int closed bool } func (q *Queries) DeleteBook(ctx context.Context, bookID []int32) *DeleteBookBatchResults { batch := &pgx.Batch{} for _, a := range bookID { vals := []interface{}{ a, } batch.Queue(deleteBook, vals...) } br := q.db.SendBatch(ctx, batch) return &DeleteBookBatchResults{br, len(bookID), false} } func (b *DeleteBookBatchResults) 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 *DeleteBookBatchResults) Close() error { b.closed = true return b.br.Close() } const deleteBookNamedFunc = `-- name: DeleteBookNamedFunc :batchexec DELETE FROM books WHERE book_id = $1 ` type DeleteBookNamedFuncBatchResults struct { br pgx.BatchResults tot int closed bool } func (q *Queries) DeleteBookNamedFunc(ctx context.Context, bookID []int32) *DeleteBookNamedFuncBatchResults { batch := &pgx.Batch{} for _, a := range bookID { vals := []interface{}{ a, } batch.Queue(deleteBookNamedFunc, vals...) } br := q.db.SendBatch(ctx, batch) return &DeleteBookNamedFuncBatchResults{br, len(bookID), false} } func (b *DeleteBookNamedFuncBatchResults) 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 *DeleteBookNamedFuncBatchResults) Close() error { b.closed = true return b.br.Close() } const deleteBookNamedSign = `-- name: DeleteBookNamedSign :batchexec DELETE FROM books WHERE book_id = $1 ` type DeleteBookNamedSignBatchResults struct { br pgx.BatchResults tot int closed bool } func (q *Queries) DeleteBookNamedSign(ctx context.Context, bookID []int32) *DeleteBookNamedSignBatchResults { batch := &pgx.Batch{} for _, a := range bookID { vals := []interface{}{ a, } batch.Queue(deleteBookNamedSign, vals...) } br := q.db.SendBatch(ctx, batch) return &DeleteBookNamedSignBatchResults{br, len(bookID), false} } func (b *DeleteBookNamedSignBatchResults) 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 *DeleteBookNamedSignBatchResults) Close() error { b.closed = true return b.br.Close() } const getBiography = `-- name: GetBiography :batchone SELECT biography FROM authors WHERE author_id = $1 ` type GetBiographyBatchResults struct { br pgx.BatchResults tot int closed bool } func (q *Queries) GetBiography(ctx context.Context, authorID []int32) *GetBiographyBatchResults { batch := &pgx.Batch{} for _, a := range authorID { vals := []interface{}{ a, } batch.Queue(getBiography, vals...) } br := q.db.SendBatch(ctx, batch) return &GetBiographyBatchResults{br, len(authorID), false} } func (b *GetBiographyBatchResults) QueryRow(f func(int, []byte, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var biography []byte if b.closed { if f != nil { f(t, biography, ErrBatchAlreadyClosed) } continue } row := b.br.QueryRow() err := row.Scan(&biography) if f != nil { f(t, biography, err) } } } func (b *GetBiographyBatchResults) Close() error { b.closed = true return b.br.Close() } const updateBook = `-- name: UpdateBook :batchexec UPDATE books SET title = $1, tags = $2 WHERE book_id = $3 ` type UpdateBookBatchResults struct { br pgx.BatchResults tot int closed bool } type UpdateBookParams struct { Title string `json:"title"` Tags []string `json:"tags"` BookID int32 `json:"book_id"` } func (q *Queries) UpdateBook(ctx context.Context, arg []UpdateBookParams) *UpdateBookBatchResults { batch := &pgx.Batch{} for _, a := range arg { vals := []interface{}{ a.Title, a.Tags, a.BookID, } batch.Queue(updateBook, vals...) } br := q.db.SendBatch(ctx, batch) return &UpdateBookBatchResults{br, len(arg), false} } func (b *UpdateBookBatchResults) 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 *UpdateBookBatchResults) Close() error { b.closed = true return b.br.Close() } ================================================ FILE: examples/batch/postgresql/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package batch 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, } } ================================================ FILE: examples/batch/postgresql/db_test.go ================================================ //go:build examples package batch import ( "context" "testing" "time" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgtype" "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func TestBatchBooks(t *testing.T) { uri := local.PostgreSQL(t, []string{"schema.sql"}) ctx := context.Background() db, err := pgx.Connect(ctx, uri) if err != nil { t.Fatal(err) } defer db.Close(ctx) dq := New(db) // create an author a, err := dq.CreateAuthor(ctx, "Unknown Master") if err != nil { t.Fatal(err) } now := pgtype.Timestamptz{Time: time.Now(), Valid: true} // batch insert new books newBooksParams := []CreateBookParams{ { AuthorID: a.AuthorID, Isbn: "1", Title: "my book title", BookType: BookTypeFICTION, Year: 2016, Available: now, Tags: []string{}, }, { AuthorID: a.AuthorID, Isbn: "2", Title: "the second book", BookType: BookTypeFICTION, Year: 2016, Available: now, Tags: []string{"cool", "unique"}, }, { AuthorID: a.AuthorID, Isbn: "3", Title: "the third book", BookType: BookTypeFICTION, Year: 2001, Available: now, Tags: []string{"cool"}, }, { AuthorID: a.AuthorID, Isbn: "4", Title: "4th place finisher", BookType: BookTypeNONFICTION, Year: 2011, Available: now, Tags: []string{"other"}, }, } newBooks := make([]Book, len(newBooksParams)) var cnt int dq.CreateBook(ctx, newBooksParams).QueryRow(func(i int, b Book, err error) { if err != nil { t.Fatalf("failed inserting book (%s): %s", b.Title, err) } newBooks[i] = b cnt = i }) // first i was 0, so add 1 cnt++ numBooksExpected := len(newBooks) if cnt != numBooksExpected { t.Fatalf("expected to insert %d books; got %d", numBooksExpected, cnt) } // batch update the title and tags updateBooksParams := []UpdateBookParams{ { BookID: newBooks[1].BookID, Title: "changed second title", Tags: []string{"cool", "disastor"}, }, } dq.UpdateBook(ctx, updateBooksParams).Exec(func(i int, err error) { if err != nil { t.Fatalf("error updating book %d: %s", updateBooksParams[i].BookID, err) } }) // batch many to retrieve books by year selectBooksByTitleYearParams := []int32{2001, 2016} var books0 []Book dq.BooksByYear(ctx, selectBooksByTitleYearParams).Query(func(i int, books []Book, err error) { if err != nil { t.Fatal(err) } t.Logf("num books for %d: %d", selectBooksByTitleYearParams[i], len(books)) books0 = append(books0, books...) }) for _, book := range books0 { t.Logf("Book %d (%s): %s available: %s\n", book.BookID, book.BookType, book.Title, book.Available.Time.Format(time.RFC822Z)) author, err := dq.GetAuthor(ctx, book.AuthorID) if err != nil { t.Fatal(err) } t.Logf("Book %d author: %s\n", book.BookID, author.Name) } // batch delete books deleteBooksParams := make([]int32, len(newBooks)) for i, book := range newBooks { deleteBooksParams[i] = book.BookID } batchDelete := dq.DeleteBook(ctx, deleteBooksParams) numDeletesProcessed := 0 wantNumDeletesProcessed := 2 batchDelete.Exec(func(i int, err error) { if err != nil && err.Error() != "batch already closed" { t.Fatalf("error deleting book %d: %s", deleteBooksParams[i], err) } if err == nil { numDeletesProcessed++ } if i == wantNumDeletesProcessed-1 { // close batch operation before processing all errors from delete operation if err := batchDelete.Close(); err != nil { t.Fatalf("failed to close batch operation: %s", err) } } }) if numDeletesProcessed != wantNumDeletesProcessed { t.Fatalf("expected Close to short-circuit record processing (expected %d; got %d)", wantNumDeletesProcessed, numDeletesProcessed) } } ================================================ FILE: examples/batch/postgresql/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package batch import ( "database/sql/driver" "fmt" "github.com/jackc/pgx/v5/pgtype" ) type BookType string const ( BookTypeFICTION BookType = "FICTION" BookTypeNONFICTION BookType = "NONFICTION" ) func (e *BookType) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = BookType(s) case string: *e = BookType(s) default: return fmt.Errorf("unsupported scan type for BookType: %T", src) } return nil } type NullBookType struct { BookType BookType `json:"book_type"` Valid bool `json:"valid"` // Valid is true if BookType is not NULL } // Scan implements the Scanner interface. func (ns *NullBookType) Scan(value interface{}) error { if value == nil { ns.BookType, ns.Valid = "", false return nil } ns.Valid = true return ns.BookType.Scan(value) } // Value implements the driver Valuer interface. func (ns NullBookType) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.BookType), nil } type Author struct { AuthorID int32 `json:"author_id"` Name string `json:"name"` Biography []byte `json:"biography"` } type Book struct { BookID int32 `json:"book_id"` AuthorID int32 `json:"author_id"` Isbn string `json:"isbn"` BookType BookType `json:"book_type"` Title string `json:"title"` Year int32 `json:"year"` Available pgtype.Timestamptz `json:"available"` Tags []string `json:"tags"` } ================================================ FILE: examples/batch/postgresql/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package batch import ( "context" "github.com/jackc/pgx/v5/pgconn" ) type Querier interface { BooksByYear(ctx context.Context, year []int32) *BooksByYearBatchResults CreateAuthor(ctx context.Context, name string) (Author, error) CreateBook(ctx context.Context, arg []CreateBookParams) *CreateBookBatchResults DeleteBook(ctx context.Context, bookID []int32) *DeleteBookBatchResults DeleteBookExecResult(ctx context.Context, bookID int32) (pgconn.CommandTag, error) DeleteBookNamedFunc(ctx context.Context, bookID []int32) *DeleteBookNamedFuncBatchResults DeleteBookNamedSign(ctx context.Context, bookID []int32) *DeleteBookNamedSignBatchResults GetAuthor(ctx context.Context, authorID int32) (Author, error) GetBiography(ctx context.Context, authorID []int32) *GetBiographyBatchResults UpdateBook(ctx context.Context, arg []UpdateBookParams) *UpdateBookBatchResults } var _ Querier = (*Queries)(nil) ================================================ FILE: examples/batch/postgresql/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE author_id = $1; -- name: DeleteBookExecResult :execresult DELETE FROM books WHERE book_id = $1; -- name: DeleteBook :batchexec DELETE FROM books WHERE book_id = $1; -- name: DeleteBookNamedFunc :batchexec DELETE FROM books WHERE book_id = sqlc.arg (book_id); -- name: DeleteBookNamedSign :batchexec DELETE FROM books WHERE book_id = @book_id; -- name: BooksByYear :batchmany SELECT * FROM books WHERE year = $1; -- name: CreateAuthor :one INSERT INTO authors (name) VALUES ($1) RETURNING *; -- name: CreateBook :batchone INSERT INTO books ( author_id, isbn, book_type, title, year, available, tags ) VALUES ( $1, $2, $3, $4, $5, $6, $7 ) RETURNING *; -- name: UpdateBook :batchexec UPDATE books SET title = $1, tags = $2 WHERE book_id = $3; -- name: GetBiography :batchone SELECT biography FROM authors WHERE author_id = $1; ================================================ FILE: examples/batch/postgresql/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package batch import ( "context" "github.com/jackc/pgx/v5/pgconn" ) const createAuthor = `-- name: CreateAuthor :one INSERT INTO authors (name) VALUES ($1) RETURNING author_id, name, biography ` func (q *Queries) CreateAuthor(ctx context.Context, name string) (Author, error) { row := q.db.QueryRow(ctx, createAuthor, name) var i Author err := row.Scan(&i.AuthorID, &i.Name, &i.Biography) return i, err } const deleteBookExecResult = `-- name: DeleteBookExecResult :execresult DELETE FROM books WHERE book_id = $1 ` func (q *Queries) DeleteBookExecResult(ctx context.Context, bookID int32) (pgconn.CommandTag, error) { return q.db.Exec(ctx, deleteBookExecResult, bookID) } const getAuthor = `-- name: GetAuthor :one SELECT author_id, name, biography FROM authors WHERE author_id = $1 ` func (q *Queries) GetAuthor(ctx context.Context, authorID int32) (Author, error) { row := q.db.QueryRow(ctx, getAuthor, authorID) var i Author err := row.Scan(&i.AuthorID, &i.Name, &i.Biography) return i, err } ================================================ FILE: examples/batch/postgresql/schema.sql ================================================ CREATE TABLE authors ( author_id SERIAL PRIMARY KEY, name text NOT NULL DEFAULT '', biography JSONB ); CREATE TYPE book_type AS ENUM ( 'FICTION', 'NONFICTION' ); CREATE TABLE books ( book_id SERIAL PRIMARY KEY, author_id integer NOT NULL REFERENCES authors(author_id), isbn text NOT NULL DEFAULT '' UNIQUE, book_type book_type NOT NULL DEFAULT 'FICTION', title text NOT NULL DEFAULT '', year integer NOT NULL DEFAULT 2000, available timestamp with time zone NOT NULL DEFAULT 'NOW()', tags varchar[] NOT NULL DEFAULT '{}' ); ================================================ FILE: examples/batch/sqlc.json ================================================ { "version": "1", "cloud": { "project": "01HAQMMECEYQYKFJN8MP16QC41" }, "packages": [ { "path": "postgresql", "name": "batch", "schema": "postgresql/schema.sql", "queries": "postgresql/query.sql", "engine": "postgresql", "database": { "uri": "${VET_TEST_EXAMPLES_POSTGRES_BATCH}" }, "analyzer": { "database": false }, "rules": [ "sqlc/db-prepare" ], "sql_package": "pgx/v5", "emit_json_tags": true, "emit_prepared_queries": true, "emit_interface": true } ] } ================================================ FILE: examples/booktest/mysql/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package booktest 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, } } ================================================ FILE: examples/booktest/mysql/db_test.go ================================================ //go:build examples package booktest import ( "context" "database/sql" "testing" "time" _ "github.com/go-sql-driver/mysql" "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func TestBooks(t *testing.T) { 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 result, err := dq.CreateAuthor(ctx, "Unknown Master") if err != nil { t.Fatal(err) } authorID, err := result.LastInsertId() if err != nil { t.Fatal(err) } // create transaction tx, err := db.Begin() if err != nil { t.Fatal(err) } tq := dq.WithTx(tx) // save first book now := time.Now() _, err = tq.CreateBook(ctx, CreateBookParams{ AuthorID: int32(authorID), Isbn: "1", Title: "my book title", BookType: BooksBookTypeFICTION, Yr: 2016, Available: now, }) if err != nil { t.Fatal(err) } // save second book result, err = tq.CreateBook(ctx, CreateBookParams{ AuthorID: int32(authorID), Isbn: "2", Title: "the second book", BookType: BooksBookTypeFICTION, Yr: 2016, Available: now, Tags: "cool,unique", }) if err != nil { t.Fatal(err) } bookOneID, err := result.LastInsertId() if err != nil { t.Fatal(err) } // update the title and tags err = tq.UpdateBook(ctx, UpdateBookParams{ BookID: int32(bookOneID), Title: "changed second title", Tags: "cool,disastor", }) if err != nil { t.Fatal(err) } // save third book _, err = tq.CreateBook(ctx, CreateBookParams{ AuthorID: int32(authorID), Isbn: "3", Title: "the third book", BookType: BooksBookTypeFICTION, Yr: 2001, Available: now, Tags: "cool", }) if err != nil { t.Fatal(err) } // save fourth book result, err = tq.CreateBook(ctx, CreateBookParams{ AuthorID: int32(authorID), Isbn: "4", Title: "4th place finisher", BookType: BooksBookTypeNONFICTION, Yr: 2011, Available: now, Tags: "other", }) if err != nil { t.Fatal(err) } bookThreeID, err := result.LastInsertId() if err != nil { t.Fatal(err) } // tx commit err = tx.Commit() if err != nil { t.Fatal(err) } // upsert, changing ISBN and title err = dq.UpdateBookISBN(ctx, UpdateBookISBNParams{ BookID: int32(bookThreeID), Isbn: "NEW ISBN", Title: "never ever gonna finish, a quatrain", Tags: "someother", }) if err != nil { t.Fatal(err) } // retrieve first book books0, err := dq.BooksByTitleYear(ctx, BooksByTitleYearParams{ Title: "my book title", Yr: 2016, }) if err != nil { t.Fatal(err) } for _, book := range books0 { t.Logf("Book %d (%s): %s available: %s\n", book.BookID, book.BookType, book.Title, book.Available.Format(time.RFC822Z)) author, err := dq.GetAuthor(ctx, book.AuthorID) if err != nil { t.Fatal(err) } t.Logf("Book %d author: %s\n", book.BookID, author.Name) } // find a book with either "cool" or "other" tag t.Logf("---------\nTag search results:\n") res, err := dq.BooksByTags(ctx, "cool") if err != nil { t.Fatal(err) } for _, ab := range res { 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) // get book 4 and delete b5, err := dq.GetBook(ctx, int32(bookThreeID)) if err != nil { t.Fatal(err) } if err := dq.DeleteBook(ctx, b5.BookID); err != nil { t.Fatal(err) } } ================================================ FILE: examples/booktest/mysql/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package booktest import ( "database/sql/driver" "fmt" "time" ) type BooksBookType string const ( BooksBookTypeFICTION BooksBookType = "FICTION" BooksBookTypeNONFICTION BooksBookType = "NONFICTION" ) func (e *BooksBookType) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = BooksBookType(s) case string: *e = BooksBookType(s) default: return fmt.Errorf("unsupported scan type for BooksBookType: %T", src) } return nil } type NullBooksBookType struct { BooksBookType BooksBookType Valid bool // Valid is true if BooksBookType is not NULL } // Scan implements the Scanner interface. func (ns *NullBooksBookType) Scan(value interface{}) error { if value == nil { ns.BooksBookType, ns.Valid = "", false return nil } ns.Valid = true return ns.BooksBookType.Scan(value) } // Value implements the driver Valuer interface. func (ns NullBooksBookType) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.BooksBookType), nil } type Author struct { AuthorID int32 Name string } type Book struct { BookID int32 AuthorID int32 Isbn string BookType BooksBookType Title string Yr int32 Available time.Time Tags string } ================================================ FILE: examples/booktest/mysql/query.sql ================================================ /* name: GetAuthor :one */ SELECT * FROM authors WHERE author_id = ?; /* name: GetBook :one */ SELECT * FROM books WHERE book_id = ?; /* name: DeleteBook :exec */ DELETE FROM books WHERE book_id = ?; /* name: BooksByTitleYear :many */ SELECT * FROM books WHERE title = ? AND yr = ?; /* name: BooksByTags :many */ SELECT book_id, title, name, isbn, tags FROM books LEFT JOIN authors ON books.author_id = authors.author_id WHERE tags = ?; /* name: CreateAuthor :execresult */ INSERT INTO authors (name) VALUES (?); /* name: CreateBook :execresult */ INSERT INTO books ( author_id, isbn, book_type, title, yr, available, tags ) VALUES ( ?, ?, ?, ?, ?, ?, ? ); /* name: UpdateBook :exec */ UPDATE books SET title = ?, tags = ? WHERE book_id = ?; /* name: UpdateBookISBN :exec */ UPDATE books SET title = ?, tags = ?, isbn = ? WHERE book_id = ?; /* name: DeleteAuthorBeforeYear :exec */ DELETE FROM books WHERE yr < ? AND author_id = ?; -- WHERE yr < sqlc.arg(min_publish_year) AND author_id = ?; ================================================ FILE: examples/booktest/mysql/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package booktest import ( "context" "database/sql" "time" ) const 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 = ? ` type BooksByTagsRow struct { BookID int32 Title string Name sql.NullString Isbn string Tags string } func (q *Queries) BooksByTags(ctx context.Context, tags string) ([]BooksByTagsRow, error) { rows, err := q.db.QueryContext(ctx, booksByTags, tags) if err != nil { return nil, err } defer rows.Close() var items []BooksByTagsRow for rows.Next() { var i BooksByTagsRow if err := rows.Scan( &i.BookID, &i.Title, &i.Name, &i.Isbn, &i.Tags, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const booksByTitleYear = `-- name: BooksByTitleYear :many SELECT book_id, author_id, isbn, book_type, title, yr, available, tags FROM books WHERE title = ? AND yr = ? ` type BooksByTitleYearParams struct { Title string Yr int32 } func (q *Queries) BooksByTitleYear(ctx context.Context, arg BooksByTitleYearParams) ([]Book, error) { rows, err := q.db.QueryContext(ctx, booksByTitleYear, arg.Title, arg.Yr) if err != nil { return nil, err } defer rows.Close() var items []Book for rows.Next() { var i Book if err := rows.Scan( &i.BookID, &i.AuthorID, &i.Isbn, &i.BookType, &i.Title, &i.Yr, &i.Available, &i.Tags, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const createAuthor = `-- name: CreateAuthor :execresult INSERT INTO authors (name) VALUES (?) ` func (q *Queries) CreateAuthor(ctx context.Context, name string) (sql.Result, error) { return q.db.ExecContext(ctx, createAuthor, name) } const createBook = `-- name: CreateBook :execresult INSERT INTO books ( author_id, isbn, book_type, title, yr, available, tags ) VALUES ( ?, ?, ?, ?, ?, ?, ? ) ` type CreateBookParams struct { AuthorID int32 Isbn string BookType BooksBookType Title string Yr int32 Available time.Time Tags string } func (q *Queries) CreateBook(ctx context.Context, arg CreateBookParams) (sql.Result, error) { return q.db.ExecContext(ctx, createBook, arg.AuthorID, arg.Isbn, arg.BookType, arg.Title, arg.Yr, arg.Available, arg.Tags, ) } const deleteAuthorBeforeYear = `-- name: DeleteAuthorBeforeYear :exec DELETE FROM books WHERE yr < ? AND author_id = ? ` type DeleteAuthorBeforeYearParams struct { Yr int32 AuthorID int32 } func (q *Queries) DeleteAuthorBeforeYear(ctx context.Context, arg DeleteAuthorBeforeYearParams) error { _, err := q.db.ExecContext(ctx, deleteAuthorBeforeYear, arg.Yr, arg.AuthorID) return err } const deleteBook = `-- name: DeleteBook :exec DELETE FROM books WHERE book_id = ? ` func (q *Queries) DeleteBook(ctx context.Context, bookID int32) error { _, err := q.db.ExecContext(ctx, deleteBook, bookID) return err } const getAuthor = `-- name: GetAuthor :one SELECT author_id, name FROM authors WHERE author_id = ? ` func (q *Queries) GetAuthor(ctx context.Context, authorID int32) (Author, error) { row := q.db.QueryRowContext(ctx, getAuthor, authorID) var i Author err := row.Scan(&i.AuthorID, &i.Name) return i, err } const getBook = `-- name: GetBook :one SELECT book_id, author_id, isbn, book_type, title, yr, available, tags FROM books WHERE book_id = ? ` func (q *Queries) GetBook(ctx context.Context, bookID int32) (Book, error) { row := q.db.QueryRowContext(ctx, getBook, bookID) var i Book err := row.Scan( &i.BookID, &i.AuthorID, &i.Isbn, &i.BookType, &i.Title, &i.Yr, &i.Available, &i.Tags, ) return i, err } const updateBook = `-- name: UpdateBook :exec UPDATE books SET title = ?, tags = ? WHERE book_id = ? ` type UpdateBookParams struct { Title string Tags string BookID int32 } func (q *Queries) UpdateBook(ctx context.Context, arg UpdateBookParams) error { _, err := q.db.ExecContext(ctx, updateBook, arg.Title, arg.Tags, arg.BookID) return err } const updateBookISBN = `-- name: UpdateBookISBN :exec UPDATE books SET title = ?, tags = ?, isbn = ? WHERE book_id = ? ` type UpdateBookISBNParams struct { Title string Tags string Isbn string BookID int32 } func (q *Queries) UpdateBookISBN(ctx context.Context, arg UpdateBookISBNParams) error { _, err := q.db.ExecContext(ctx, updateBookISBN, arg.Title, arg.Tags, arg.Isbn, arg.BookID, ) return err } ================================================ FILE: examples/booktest/mysql/schema.sql ================================================ CREATE TABLE authors ( author_id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, name text NOT NULL ) ENGINE=InnoDB; CREATE INDEX authors_name_idx ON authors(name(255)); CREATE TABLE books ( book_id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, author_id integer NOT NULL, isbn varchar(255) NOT NULL DEFAULT '' UNIQUE, book_type ENUM('FICTION', 'NONFICTION') NOT NULL DEFAULT 'FICTION', title text NOT NULL, yr integer NOT NULL DEFAULT 2000, available datetime NOT NULL DEFAULT NOW(), tags text NOT NULL -- CONSTRAINT FOREIGN KEY (author_id) REFERENCES authors(author_id) ) ENGINE=InnoDB; CREATE INDEX books_title_idx ON books(title(255), yr); /* CREATE FUNCTION say_hello(s text) RETURNS text DETERMINISTIC RETURN CONCAT('hello ', s); */ ================================================ FILE: examples/booktest/postgresql/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package booktest 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, } } ================================================ FILE: examples/booktest/postgresql/db_test.go ================================================ //go:build examples package booktest import ( "context" "testing" "time" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgtype" "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func TestBooks(t *testing.T) { ctx := context.Background() uri := local.PostgreSQL(t, []string{"schema.sql"}) db, err := pgx.Connect(ctx, uri) if err != nil { t.Fatal(err) } defer db.Close(ctx) dq := New(db) // create an author a, err := dq.CreateAuthor(ctx, "Unknown Master") if err != nil { t.Fatal(err) } // create transaction tx, err := db.Begin(ctx) if err != nil { t.Fatal(err) } tq := dq.WithTx(tx) // save first book now := pgtype.Timestamptz{Time: time.Now(), Valid: true} _, err = tq.CreateBook(ctx, CreateBookParams{ AuthorID: a.AuthorID, Isbn: "1", Title: "my book title", BookType: BookTypeFICTION, Year: 2016, Available: now, Tags: []string{}, }) if err != nil { t.Fatal(err) } // save second book b1, err := tq.CreateBook(ctx, CreateBookParams{ AuthorID: a.AuthorID, Isbn: "2", Title: "the second book", BookType: BookTypeFICTION, Year: 2016, Available: now, Tags: []string{"cool", "unique"}, }) if err != nil { t.Fatal(err) } // update the title and tags err = tq.UpdateBook(ctx, UpdateBookParams{ BookID: b1.BookID, Title: "changed second title", Tags: []string{"cool", "disastor"}, }) if err != nil { t.Fatal(err) } // save third book _, err = tq.CreateBook(ctx, CreateBookParams{ AuthorID: a.AuthorID, Isbn: "3", Title: "the third book", BookType: BookTypeFICTION, Year: 2001, Available: now, Tags: []string{"cool"}, }) if err != nil { t.Fatal(err) } // save fourth book b3, err := tq.CreateBook(ctx, CreateBookParams{ AuthorID: a.AuthorID, Isbn: "4", Title: "4th place finisher", BookType: BookTypeNONFICTION, Year: 2011, Available: now, Tags: []string{"other"}, }) if err != nil { t.Fatal(err) } // tx commit err = tx.Commit(ctx) if err != nil { t.Fatal(err) } // upsert, changing ISBN and title err = dq.UpdateBookISBN(ctx, UpdateBookISBNParams{ BookID: b3.BookID, Isbn: "NEW ISBN", Title: "never ever gonna finish, a quatrain", Tags: []string{"someother"}, }) if err != nil { t.Fatal(err) } // retrieve first book books0, err := dq.BooksByTitleYear(ctx, BooksByTitleYearParams{ Title: "my book title", Year: 2016, }) if err != nil { t.Fatal(err) } for _, book := range books0 { t.Logf("Book %d (%s): %s available: %s\n", book.BookID, book.BookType, book.Title, book.Available.Time.Format(time.RFC822Z)) author, err := dq.GetAuthor(ctx, book.AuthorID) if err != nil { t.Fatal(err) } t.Logf("Book %d author: %s\n", book.BookID, author.Name) } // find a book with either "cool" or "other" tag t.Logf("---------\nTag search results:\n") res, err := dq.BooksByTags(ctx, []string{"cool", "other", "someother"}) if err != nil { t.Fatal(err) } for _, ab := range res { t.Logf("Book %d: '%s', Author: '%s', ISBN: '%s' Tags: '%v'\n", ab.BookID, ab.Title, ab.Name.String, ab.Isbn, ab.Tags) } // 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) if err != nil { t.Fatal(err) } if err := dq.DeleteBook(ctx, b5.BookID); err != nil { t.Fatal(err) } } ================================================ FILE: examples/booktest/postgresql/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package booktest import ( "database/sql/driver" "fmt" "github.com/jackc/pgx/v5/pgtype" ) type BookType string const ( BookTypeFICTION BookType = "FICTION" BookTypeNONFICTION BookType = "NONFICTION" ) func (e *BookType) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = BookType(s) case string: *e = BookType(s) default: return fmt.Errorf("unsupported scan type for BookType: %T", src) } return nil } type NullBookType struct { BookType BookType Valid bool // Valid is true if BookType is not NULL } // Scan implements the Scanner interface. func (ns *NullBookType) Scan(value interface{}) error { if value == nil { ns.BookType, ns.Valid = "", false return nil } ns.Valid = true return ns.BookType.Scan(value) } // Value implements the driver Valuer interface. func (ns NullBookType) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.BookType), nil } type Author struct { AuthorID int32 Name string } type Book struct { BookID int32 AuthorID int32 Isbn string BookType BookType Title string Year int32 Available pgtype.Timestamptz Tags []string } ================================================ FILE: examples/booktest/postgresql/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE author_id = $1; -- name: GetBook :one SELECT * FROM books WHERE book_id = $1; -- name: DeleteBook :exec DELETE FROM books WHERE book_id = $1; -- name: BooksByTitleYear :many SELECT * FROM books WHERE title = $1 AND year = $2; -- name: BooksByTags :many SELECT book_id, title, name, isbn, tags FROM books LEFT JOIN authors ON books.author_id = authors.author_id WHERE tags && $1::varchar[]; -- name: CreateAuthor :one INSERT INTO authors (name) VALUES ($1) RETURNING *; -- name: CreateBook :one INSERT INTO books ( author_id, isbn, book_type, title, year, available, tags ) VALUES ( $1, $2, $3, $4, $5, $6, $7 ) RETURNING *; -- name: UpdateBook :exec UPDATE books SET title = $1, tags = $2 WHERE book_id = $3; -- name: UpdateBookISBN :exec UPDATE books SET title = $1, tags = $2, isbn = $4 WHERE book_id = $3; -- name: SayHello :one select * from say_hello($1); ================================================ FILE: examples/booktest/postgresql/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package booktest import ( "context" "github.com/jackc/pgx/v5/pgtype" ) const 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 && $1::varchar[] ` type BooksByTagsRow struct { BookID int32 Title string Name pgtype.Text Isbn string Tags []string } func (q *Queries) BooksByTags(ctx context.Context, dollar_1 []string) ([]BooksByTagsRow, error) { rows, err := q.db.Query(ctx, booksByTags, dollar_1) if err != nil { return nil, err } defer rows.Close() var items []BooksByTagsRow for rows.Next() { var i BooksByTagsRow if err := rows.Scan( &i.BookID, &i.Title, &i.Name, &i.Isbn, &i.Tags, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const booksByTitleYear = `-- name: BooksByTitleYear :many SELECT book_id, author_id, isbn, book_type, title, year, available, tags FROM books WHERE title = $1 AND year = $2 ` type BooksByTitleYearParams struct { Title string Year int32 } func (q *Queries) BooksByTitleYear(ctx context.Context, arg BooksByTitleYearParams) ([]Book, error) { rows, err := q.db.Query(ctx, booksByTitleYear, arg.Title, arg.Year) if err != nil { return nil, err } defer rows.Close() var items []Book for rows.Next() { var i Book if err := rows.Scan( &i.BookID, &i.AuthorID, &i.Isbn, &i.BookType, &i.Title, &i.Year, &i.Available, &i.Tags, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const createAuthor = `-- name: CreateAuthor :one INSERT INTO authors (name) VALUES ($1) RETURNING author_id, name ` func (q *Queries) CreateAuthor(ctx context.Context, name string) (Author, error) { row := q.db.QueryRow(ctx, createAuthor, name) var i Author err := row.Scan(&i.AuthorID, &i.Name) return i, err } const createBook = `-- name: CreateBook :one INSERT INTO books ( author_id, isbn, book_type, title, year, available, tags ) VALUES ( $1, $2, $3, $4, $5, $6, $7 ) RETURNING book_id, author_id, isbn, book_type, title, year, available, tags ` type CreateBookParams struct { AuthorID int32 Isbn string BookType BookType Title string Year int32 Available pgtype.Timestamptz Tags []string } func (q *Queries) CreateBook(ctx context.Context, arg CreateBookParams) (Book, error) { row := q.db.QueryRow(ctx, createBook, arg.AuthorID, arg.Isbn, arg.BookType, arg.Title, arg.Year, arg.Available, arg.Tags, ) var i Book err := row.Scan( &i.BookID, &i.AuthorID, &i.Isbn, &i.BookType, &i.Title, &i.Year, &i.Available, &i.Tags, ) return i, err } const deleteBook = `-- name: DeleteBook :exec DELETE FROM books WHERE book_id = $1 ` func (q *Queries) DeleteBook(ctx context.Context, bookID int32) error { _, err := q.db.Exec(ctx, deleteBook, bookID) return err } const getAuthor = `-- name: GetAuthor :one SELECT author_id, name FROM authors WHERE author_id = $1 ` func (q *Queries) GetAuthor(ctx context.Context, authorID int32) (Author, error) { row := q.db.QueryRow(ctx, getAuthor, authorID) var i Author err := row.Scan(&i.AuthorID, &i.Name) return i, err } const getBook = `-- name: GetBook :one SELECT book_id, author_id, isbn, book_type, title, year, available, tags FROM books WHERE book_id = $1 ` func (q *Queries) GetBook(ctx context.Context, bookID int32) (Book, error) { row := q.db.QueryRow(ctx, getBook, bookID) var i Book err := row.Scan( &i.BookID, &i.AuthorID, &i.Isbn, &i.BookType, &i.Title, &i.Year, &i.Available, &i.Tags, ) 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 WHERE book_id = $3 ` type UpdateBookParams struct { Title string Tags []string BookID int32 } func (q *Queries) UpdateBook(ctx context.Context, arg UpdateBookParams) error { _, err := q.db.Exec(ctx, updateBook, arg.Title, arg.Tags, arg.BookID) return err } const updateBookISBN = `-- name: UpdateBookISBN :exec UPDATE books SET title = $1, tags = $2, isbn = $4 WHERE book_id = $3 ` type UpdateBookISBNParams struct { Title string Tags []string BookID int32 Isbn string } func (q *Queries) UpdateBookISBN(ctx context.Context, arg UpdateBookISBNParams) error { _, err := q.db.Exec(ctx, updateBookISBN, arg.Title, arg.Tags, arg.BookID, arg.Isbn, ) return err } ================================================ FILE: examples/booktest/postgresql/schema.sql ================================================ CREATE TABLE authors ( author_id SERIAL PRIMARY KEY, name text NOT NULL DEFAULT '' ); CREATE INDEX authors_name_idx ON authors(name); CREATE TYPE book_type AS ENUM ( 'FICTION', 'NONFICTION' ); CREATE TABLE books ( book_id SERIAL PRIMARY KEY, author_id integer NOT NULL REFERENCES authors(author_id), isbn text NOT NULL DEFAULT '' UNIQUE, book_type book_type NOT NULL DEFAULT 'FICTION', title text NOT NULL DEFAULT '', year integer NOT NULL DEFAULT 2000, available timestamp with time zone NOT NULL DEFAULT 'NOW()', tags varchar[] NOT NULL DEFAULT '{}' ); CREATE INDEX books_title_idx ON books(title, year); CREATE FUNCTION say_hello(s text) RETURNS text AS $$ BEGIN RETURN CONCAT('hello ', s); END; $$ LANGUAGE plpgsql; CREATE INDEX books_title_lower_idx ON books(title); ================================================ FILE: examples/booktest/sqlc.json ================================================ { "version": "1", "cloud": { "project": "01HAQMMECEYQYKFJN8MP16QC41" }, "packages": [ { "name": "booktest", "path": "postgresql", "schema": "postgresql/schema.sql", "queries": "postgresql/query.sql", "engine": "postgresql", "sql_package": "pgx/v5", "database": { "uri": "${VET_TEST_EXAMPLES_POSTGRES_BOOKTEST}" }, "analyzer": { "database": false }, "rules": [ "sqlc/db-prepare" ] }, { "name": "booktest", "path": "mysql", "schema": "mysql/schema.sql", "queries": "mysql/query.sql", "engine": "mysql", "database": { "uri": "${VET_TEST_EXAMPLES_MYSQL_BOOKTEST}" }, "rules": [ "sqlc/db-prepare" ] }, { "name": "booktest", "path": "sqlite", "schema": "sqlite/schema.sql", "queries": "sqlite/query.sql", "engine": "sqlite", "database": { "uri": "file:booktest?mode=memory&cache=shared" }, "rules": [ "sqlc/db-prepare" ] } ] } ================================================ FILE: examples/booktest/sqlite/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package booktest 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, } } ================================================ FILE: examples/booktest/sqlite/db_test.go ================================================ //go:build examples package booktest import ( "context" "testing" "time" "github.com/sqlc-dev/sqlc/internal/sqltest" ) // TODO: Enum is not yet supported const ( BooksBookTypeFICTION string = "FICTION" BooksBookTypeNONFICTION string = "NONFICTION" ) func TestBooks(t *testing.T) { db, cleanup := sqltest.SQLite(t, []string{"schema.sql"}) defer db.Close() defer cleanup() ctx := context.Background() dq := New(db) // create an author a, err := dq.CreateAuthor(ctx, "Unknown Master") if err != nil { t.Fatal(err) } // create transaction tx, err := db.Begin() if err != nil { t.Fatal(err) } tq := dq.WithTx(tx) // save first book now := time.Now() _, err = tq.CreateBook(ctx, CreateBookParams{ AuthorID: a.AuthorID, Isbn: "1", Title: "my book title", BookType: BooksBookTypeFICTION, Yr: 2016, Available: now, Tag: "", }) if err != nil { t.Fatal(err) } // save second book b1, err := tq.CreateBook(ctx, CreateBookParams{ AuthorID: a.AuthorID, Isbn: "2", Title: "the second book", BookType: BooksBookTypeFICTION, Yr: 2016, Available: now, Tag: "unique", }) if err != nil { t.Fatal(err) } // update the title and tags err = tq.UpdateBook(ctx, UpdateBookParams{ BookID: b1.BookID, Title: "changed second title", Tag: "disastor", }) if err != nil { t.Fatal(err) } // save third book _, err = tq.CreateBook(ctx, CreateBookParams{ AuthorID: a.AuthorID, Isbn: "3", Title: "the third book", BookType: BooksBookTypeFICTION, Yr: 2001, Available: now, Tag: "cool", }) if err != nil { t.Fatal(err) } // save fourth book b3, err := tq.CreateBook(ctx, CreateBookParams{ AuthorID: a.AuthorID, Isbn: "4", Title: "4th place finisher", BookType: BooksBookTypeFICTION, Yr: 2011, Available: now, Tag: "other", }) if err != nil { t.Fatal(err) } // tx commit err = tx.Commit() if err != nil { t.Fatal(err) } // upsert, changing ISBN and title err = dq.UpdateBookISBN(ctx, UpdateBookISBNParams{ BookID: b3.BookID, Isbn: "NEW ISBN", Title: "never ever gonna finish, a quatrain", Tag: "someother", }) if err != nil { t.Fatal(err) } // retrieve first book books0, err := dq.BooksByTitleYear(ctx, BooksByTitleYearParams{ Title: "my book title", Yr: 2016, }) if err != nil { t.Fatal(err) } for _, book := range books0 { t.Logf("Book %d (%s): %s available: %s\n", book.BookID, book.BookType, book.Title, book.Available.Format(time.RFC822Z)) author, err := dq.GetAuthor(ctx, book.AuthorID) if err != nil { t.Fatal(err) } t.Logf("Book %d author: %s\n", book.BookID, author.Name) } // find a book with either "cool" or "other" or "someother" tag t.Logf("---------\nTag search results:\n") res, err := dq.BooksByTags(ctx, []string{"cool", "other", "someother"}) if err != nil { t.Fatal(err) } for _, ab := range res { t.Logf("Book %d: '%s', Author: '%s', ISBN: '%s' Tag: '%v'\n", ab.BookID, ab.Title, ab.Name.String, ab.Isbn, ab.Tag) } // TODO: call say_hello(varchar) // get book 4 and delete b5, err := dq.GetBook(ctx, b3.BookID) if err != nil { t.Fatal(err) } if err := dq.DeleteBook(ctx, b5.BookID); err != nil { t.Fatal(err) } } ================================================ FILE: examples/booktest/sqlite/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package booktest import ( "time" ) type Author struct { AuthorID int64 Name string } type Book struct { BookID int64 AuthorID int64 Isbn string BookType string Title string Yr int64 Available time.Time Tag string } ================================================ FILE: examples/booktest/sqlite/query.sql ================================================ /* name: GetAuthor :one */ SELECT * FROM authors WHERE author_id = ?; /* name: GetBook :one */ SELECT * FROM books WHERE book_id = ?; /* name: DeleteBook :exec */ DELETE FROM books WHERE book_id = ?; /* name: BooksByTitleYear :many */ SELECT * FROM books WHERE title = ? AND yr = ?; /* name: BooksByTags :many */ SELECT book_id, title, name, isbn, tag FROM books LEFT JOIN authors ON books.author_id = authors.author_id WHERE tag IN (sqlc.slice(tags)); /* name: CreateAuthor :one */ INSERT INTO authors (name) VALUES (?) RETURNING *; /* name: CreateBook :one */ INSERT INTO books ( author_id, isbn, book_type, title, yr, available, tag ) VALUES ( ?, ?, ?, ?, ?, ?, ? ) RETURNING *; /* name: UpdateBook :exec */ UPDATE books SET title = ?1, tag = ?2 WHERE book_id = ?3; /* name: UpdateBookISBN :exec */ UPDATE books SET title = ?1, tag = ?2, isbn = ?4 WHERE book_id = ?3; /* name: DeleteAuthorBeforeYear :exec */ DELETE FROM books WHERE yr < ? AND author_id = ?; ================================================ FILE: examples/booktest/sqlite/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package booktest import ( "context" "database/sql" "strings" "time" ) const booksByTags = `-- name: BooksByTags :many SELECT book_id, title, name, isbn, tag FROM books LEFT JOIN authors ON books.author_id = authors.author_id WHERE tag IN (/*SLICE:tags*/?) ` type BooksByTagsRow struct { BookID int64 Title string Name sql.NullString Isbn string Tag string } func (q *Queries) BooksByTags(ctx context.Context, tags []string) ([]BooksByTagsRow, error) { query := booksByTags var queryParams []interface{} if len(tags) > 0 { for _, v := range tags { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:tags*/?", strings.Repeat(",?", len(tags))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:tags*/?", "NULL", 1) } rows, err := q.db.QueryContext(ctx, query, queryParams...) if err != nil { return nil, err } defer rows.Close() var items []BooksByTagsRow for rows.Next() { var i BooksByTagsRow if err := rows.Scan( &i.BookID, &i.Title, &i.Name, &i.Isbn, &i.Tag, ); 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 booksByTitleYear = `-- name: BooksByTitleYear :many SELECT book_id, author_id, isbn, book_type, title, yr, available, tag FROM books WHERE title = ? AND yr = ? ` type BooksByTitleYearParams struct { Title string Yr int64 } func (q *Queries) BooksByTitleYear(ctx context.Context, arg BooksByTitleYearParams) ([]Book, error) { rows, err := q.db.QueryContext(ctx, booksByTitleYear, arg.Title, arg.Yr) if err != nil { return nil, err } defer rows.Close() var items []Book for rows.Next() { var i Book if err := rows.Scan( &i.BookID, &i.AuthorID, &i.Isbn, &i.BookType, &i.Title, &i.Yr, &i.Available, &i.Tag, ); 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 createAuthor = `-- name: CreateAuthor :one INSERT INTO authors (name) VALUES (?) RETURNING author_id, name ` func (q *Queries) CreateAuthor(ctx context.Context, name string) (Author, error) { row := q.db.QueryRowContext(ctx, createAuthor, name) var i Author err := row.Scan(&i.AuthorID, &i.Name) return i, err } const createBook = `-- name: CreateBook :one INSERT INTO books ( author_id, isbn, book_type, title, yr, available, tag ) VALUES ( ?, ?, ?, ?, ?, ?, ? ) RETURNING book_id, author_id, isbn, book_type, title, yr, available, tag ` type CreateBookParams struct { AuthorID int64 Isbn string BookType string Title string Yr int64 Available time.Time Tag string } func (q *Queries) CreateBook(ctx context.Context, arg CreateBookParams) (Book, error) { row := q.db.QueryRowContext(ctx, createBook, arg.AuthorID, arg.Isbn, arg.BookType, arg.Title, arg.Yr, arg.Available, arg.Tag, ) var i Book err := row.Scan( &i.BookID, &i.AuthorID, &i.Isbn, &i.BookType, &i.Title, &i.Yr, &i.Available, &i.Tag, ) return i, err } const deleteAuthorBeforeYear = `-- name: DeleteAuthorBeforeYear :exec DELETE FROM books WHERE yr < ? AND author_id = ? ` type DeleteAuthorBeforeYearParams struct { Yr int64 AuthorID int64 } func (q *Queries) DeleteAuthorBeforeYear(ctx context.Context, arg DeleteAuthorBeforeYearParams) error { _, err := q.db.ExecContext(ctx, deleteAuthorBeforeYear, arg.Yr, arg.AuthorID) return err } const deleteBook = `-- name: DeleteBook :exec DELETE FROM books WHERE book_id = ? ` func (q *Queries) DeleteBook(ctx context.Context, bookID int64) error { _, err := q.db.ExecContext(ctx, deleteBook, bookID) return err } const getAuthor = `-- name: GetAuthor :one SELECT author_id, name FROM authors WHERE author_id = ? ` func (q *Queries) GetAuthor(ctx context.Context, authorID int64) (Author, error) { row := q.db.QueryRowContext(ctx, getAuthor, authorID) var i Author err := row.Scan(&i.AuthorID, &i.Name) return i, err } const getBook = `-- name: GetBook :one SELECT book_id, author_id, isbn, book_type, title, yr, available, tag FROM books WHERE book_id = ? ` func (q *Queries) GetBook(ctx context.Context, bookID int64) (Book, error) { row := q.db.QueryRowContext(ctx, getBook, bookID) var i Book err := row.Scan( &i.BookID, &i.AuthorID, &i.Isbn, &i.BookType, &i.Title, &i.Yr, &i.Available, &i.Tag, ) return i, err } const updateBook = `-- name: UpdateBook :exec UPDATE books SET title = ?1, tag = ?2 WHERE book_id = ?3 ` type UpdateBookParams struct { Title string Tag string BookID int64 } func (q *Queries) UpdateBook(ctx context.Context, arg UpdateBookParams) error { _, err := q.db.ExecContext(ctx, updateBook, arg.Title, arg.Tag, arg.BookID) return err } const updateBookISBN = `-- name: UpdateBookISBN :exec UPDATE books SET title = ?1, tag = ?2, isbn = ?4 WHERE book_id = ?3 ` type UpdateBookISBNParams struct { Title string Tag string BookID int64 Isbn string } func (q *Queries) UpdateBookISBN(ctx context.Context, arg UpdateBookISBNParams) error { _, err := q.db.ExecContext(ctx, updateBookISBN, arg.Title, arg.Tag, arg.BookID, arg.Isbn, ) return err } ================================================ FILE: examples/booktest/sqlite/schema.sql ================================================ CREATE TABLE authors ( author_id integer NOT NULL PRIMARY KEY AUTOINCREMENT, name text NOT NULL ); CREATE INDEX authors_name_idx ON authors(name); CREATE TABLE books ( book_id integer NOT NULL PRIMARY KEY AUTOINCREMENT, author_id integer NOT NULL, isbn varchar(255) NOT NULL DEFAULT '' UNIQUE, book_type text NOT NULL DEFAULT 'FICTION', title text NOT NULL, yr integer NOT NULL DEFAULT 2000, available datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, tag text NOT NULL, CHECK (book_type = 'FICTION' OR book_type = 'NONFICTION') ); CREATE INDEX books_title_idx ON books(title, yr); ================================================ FILE: examples/jets/README.md ================================================ This database schema and query selection is taken from the [SQLBoiler](https://github.com/volatiletech/sqlboiler#features--examples) README. ================================================ FILE: examples/jets/postgresql/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package jets 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, } } ================================================ FILE: examples/jets/postgresql/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package jets type Jet struct { ID int32 PilotID int32 Age int32 Name string Color string } type Language struct { ID int32 Language string } type Pilot struct { ID int32 Name string } type PilotLanguage struct { PilotID int32 LanguageID int32 } ================================================ FILE: examples/jets/postgresql/query-building.sql ================================================ -- name: CountPilots :one SELECT COUNT(*) FROM pilots; -- name: ListPilots :many SELECT * FROM pilots LIMIT 5; -- name: DeletePilot :exec DELETE FROM pilots WHERE id = $1; ================================================ FILE: examples/jets/postgresql/query-building.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query-building.sql package jets import ( "context" ) const countPilots = `-- name: CountPilots :one SELECT COUNT(*) FROM pilots ` func (q *Queries) CountPilots(ctx context.Context) (int64, error) { row := q.db.QueryRow(ctx, countPilots) var count int64 err := row.Scan(&count) return count, err } const deletePilot = `-- name: DeletePilot :exec DELETE FROM pilots WHERE id = $1 ` func (q *Queries) DeletePilot(ctx context.Context, id int32) error { _, err := q.db.Exec(ctx, deletePilot, id) return err } const listPilots = `-- name: ListPilots :many SELECT id, name FROM pilots LIMIT 5 ` func (q *Queries) ListPilots(ctx context.Context) ([]Pilot, error) { rows, err := q.db.Query(ctx, listPilots) if err != nil { return nil, err } defer rows.Close() var items []Pilot for rows.Next() { var i Pilot if err := rows.Scan(&i.ID, &i.Name); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: examples/jets/postgresql/schema.sql ================================================ CREATE TABLE pilots ( id integer NOT NULL, name text NOT NULL ); ALTER TABLE pilots ADD CONSTRAINT pilot_pkey PRIMARY KEY (id); CREATE TABLE jets ( id integer NOT NULL, pilot_id integer NOT NULL, age integer NOT NULL, name text NOT NULL, color text NOT NULL ); ALTER TABLE jets ADD CONSTRAINT jet_pkey PRIMARY KEY (id); ALTER TABLE jets ADD CONSTRAINT jet_pilots_fkey FOREIGN KEY (pilot_id) REFERENCES pilots(id); CREATE TABLE languages ( id integer NOT NULL, language text NOT NULL ); ALTER TABLE languages ADD CONSTRAINT language_pkey PRIMARY KEY (id); -- Join table CREATE TABLE pilot_languages ( pilot_id integer NOT NULL, language_id integer NOT NULL ); -- Composite primary key ALTER TABLE pilot_languages ADD CONSTRAINT pilot_language_pkey PRIMARY KEY (pilot_id, language_id); ALTER TABLE pilot_languages ADD CONSTRAINT pilot_language_pilots_fkey FOREIGN KEY (pilot_id) REFERENCES pilots(id); ALTER TABLE pilot_languages ADD CONSTRAINT pilot_language_languages_fkey FOREIGN KEY (language_id) REFERENCES languages(id); ================================================ FILE: examples/jets/sqlc.json ================================================ { "version": "1", "cloud": { "project": "01HAQMMECEYQYKFJN8MP16QC41" }, "packages": [ { "path": "postgresql", "name": "jets", "schema": "postgresql/schema.sql", "queries": "postgresql/query-building.sql", "engine": "postgresql", "sql_package": "pgx/v5", "database": { "uri": "${VET_TEST_EXAMPLES_POSTGRES_JETS}" }, "analyzer": { "database": false }, "rules": [ "sqlc/db-prepare" ] } ] } ================================================ FILE: examples/ondeck/mysql/city.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: city.sql package ondeck import ( "context" ) const createCity = `-- name: CreateCity :exec INSERT INTO city ( name, slug ) VALUES ( ?, ? ) ` type CreateCityParams struct { Name string `json:"name"` Slug string `json:"slug"` } func (q *Queries) CreateCity(ctx context.Context, arg CreateCityParams) error { _, err := q.exec(ctx, q.createCityStmt, createCity, arg.Name, arg.Slug) return err } const getCity = `-- name: GetCity :one SELECT slug, name FROM city WHERE slug = ? ` func (q *Queries) GetCity(ctx context.Context, slug string) (City, error) { row := q.queryRow(ctx, q.getCityStmt, getCity, slug) var i City err := row.Scan(&i.Slug, &i.Name) return i, err } const listCities = `-- name: ListCities :many SELECT slug, name FROM city ORDER BY name ` func (q *Queries) ListCities(ctx context.Context) ([]City, error) { rows, err := q.query(ctx, q.listCitiesStmt, listCities) if err != nil { return nil, err } defer rows.Close() var items []City for rows.Next() { var i City if err := rows.Scan(&i.Slug, &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 } const updateCityName = `-- name: UpdateCityName :exec UPDATE city SET name = ? WHERE slug = ? ` type UpdateCityNameParams struct { Name string `json:"name"` Slug string `json:"slug"` } func (q *Queries) UpdateCityName(ctx context.Context, arg UpdateCityNameParams) error { _, err := q.exec(ctx, q.updateCityNameStmt, updateCityName, arg.Name, arg.Slug) return err } ================================================ FILE: examples/ondeck/mysql/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package ondeck import ( "context" "database/sql" "fmt" ) 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} } func Prepare(ctx context.Context, db DBTX) (*Queries, error) { q := Queries{db: db} var err error if q.createCityStmt, err = db.PrepareContext(ctx, createCity); err != nil { return nil, fmt.Errorf("error preparing query CreateCity: %w", err) } if q.createVenueStmt, err = db.PrepareContext(ctx, createVenue); err != nil { return nil, fmt.Errorf("error preparing query CreateVenue: %w", err) } if q.deleteVenueStmt, err = db.PrepareContext(ctx, deleteVenue); err != nil { return nil, fmt.Errorf("error preparing query DeleteVenue: %w", err) } if q.getCityStmt, err = db.PrepareContext(ctx, getCity); err != nil { return nil, fmt.Errorf("error preparing query GetCity: %w", err) } if q.getVenueStmt, err = db.PrepareContext(ctx, getVenue); err != nil { return nil, fmt.Errorf("error preparing query GetVenue: %w", err) } if q.listCitiesStmt, err = db.PrepareContext(ctx, listCities); err != nil { return nil, fmt.Errorf("error preparing query ListCities: %w", err) } if q.listVenuesStmt, err = db.PrepareContext(ctx, listVenues); err != nil { return nil, fmt.Errorf("error preparing query ListVenues: %w", err) } if q.updateCityNameStmt, err = db.PrepareContext(ctx, updateCityName); err != nil { return nil, fmt.Errorf("error preparing query UpdateCityName: %w", err) } if q.updateVenueNameStmt, err = db.PrepareContext(ctx, updateVenueName); err != nil { return nil, fmt.Errorf("error preparing query UpdateVenueName: %w", err) } if q.venueCountByCityStmt, err = db.PrepareContext(ctx, venueCountByCity); err != nil { return nil, fmt.Errorf("error preparing query VenueCountByCity: %w", err) } return &q, nil } func (q *Queries) Close() error { var err error if q.createCityStmt != nil { if cerr := q.createCityStmt.Close(); cerr != nil { err = fmt.Errorf("error closing createCityStmt: %w", cerr) } } if q.createVenueStmt != nil { if cerr := q.createVenueStmt.Close(); cerr != nil { err = fmt.Errorf("error closing createVenueStmt: %w", cerr) } } if q.deleteVenueStmt != nil { if cerr := q.deleteVenueStmt.Close(); cerr != nil { err = fmt.Errorf("error closing deleteVenueStmt: %w", cerr) } } if q.getCityStmt != nil { if cerr := q.getCityStmt.Close(); cerr != nil { err = fmt.Errorf("error closing getCityStmt: %w", cerr) } } if q.getVenueStmt != nil { if cerr := q.getVenueStmt.Close(); cerr != nil { err = fmt.Errorf("error closing getVenueStmt: %w", cerr) } } if q.listCitiesStmt != nil { if cerr := q.listCitiesStmt.Close(); cerr != nil { err = fmt.Errorf("error closing listCitiesStmt: %w", cerr) } } if q.listVenuesStmt != nil { if cerr := q.listVenuesStmt.Close(); cerr != nil { err = fmt.Errorf("error closing listVenuesStmt: %w", cerr) } } if q.updateCityNameStmt != nil { if cerr := q.updateCityNameStmt.Close(); cerr != nil { err = fmt.Errorf("error closing updateCityNameStmt: %w", cerr) } } if q.updateVenueNameStmt != nil { if cerr := q.updateVenueNameStmt.Close(); cerr != nil { err = fmt.Errorf("error closing updateVenueNameStmt: %w", cerr) } } if q.venueCountByCityStmt != nil { if cerr := q.venueCountByCityStmt.Close(); cerr != nil { err = fmt.Errorf("error closing venueCountByCityStmt: %w", cerr) } } return err } func (q *Queries) exec(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) (sql.Result, error) { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).ExecContext(ctx, args...) case stmt != nil: return stmt.ExecContext(ctx, args...) default: return q.db.ExecContext(ctx, query, args...) } } func (q *Queries) query(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) (*sql.Rows, error) { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).QueryContext(ctx, args...) case stmt != nil: return stmt.QueryContext(ctx, args...) default: return q.db.QueryContext(ctx, query, args...) } } func (q *Queries) queryRow(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) *sql.Row { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).QueryRowContext(ctx, args...) case stmt != nil: return stmt.QueryRowContext(ctx, args...) default: return q.db.QueryRowContext(ctx, query, args...) } } type Queries struct { db DBTX tx *sql.Tx createCityStmt *sql.Stmt createVenueStmt *sql.Stmt deleteVenueStmt *sql.Stmt getCityStmt *sql.Stmt getVenueStmt *sql.Stmt listCitiesStmt *sql.Stmt listVenuesStmt *sql.Stmt updateCityNameStmt *sql.Stmt updateVenueNameStmt *sql.Stmt venueCountByCityStmt *sql.Stmt } func (q *Queries) WithTx(tx *sql.Tx) *Queries { return &Queries{ db: tx, tx: tx, createCityStmt: q.createCityStmt, createVenueStmt: q.createVenueStmt, deleteVenueStmt: q.deleteVenueStmt, getCityStmt: q.getCityStmt, getVenueStmt: q.getVenueStmt, listCitiesStmt: q.listCitiesStmt, listVenuesStmt: q.listVenuesStmt, updateCityNameStmt: q.updateCityNameStmt, updateVenueNameStmt: q.updateVenueNameStmt, venueCountByCityStmt: q.venueCountByCityStmt, } } ================================================ FILE: examples/ondeck/mysql/db_test.go ================================================ //go:build examples package ondeck import ( "context" "database/sql" "strings" "testing" _ "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 { if len(vals) == 0 { return sql.NullString{} } return sql.NullString{ Valid: true, String: strings.Join(vals, ","), } } func runOnDeckQueries(t *testing.T, q *Queries) { ctx := context.Background() err := q.CreateCity(ctx, CreateCityParams{ Slug: "san-francisco", Name: "San Francisco", }) if err != nil { t.Fatal(err) } city, err := q.GetCity(ctx, "san-francisco") if err != nil { t.Fatal(err) } venueResult, err := q.CreateVenue(ctx, CreateVenueParams{ Slug: "the-fillmore", Name: "The Fillmore", City: city.Slug, SpotifyPlaylist: "spotify:uri", Status: VenueStatusOpen, Statuses: join(string(VenueStatusOpen), string(VenueStatusClosed)), Tags: join("rock", "punk"), }) if err != nil { t.Fatal(err) } venueID, err := venueResult.LastInsertId() if err != nil { t.Fatal(err) } venue, err := q.GetVenue(ctx, GetVenueParams{ Slug: "the-fillmore", City: city.Slug, }) if err != nil { t.Fatal(err) } if diff := cmp.Diff(venue.ID, uint64(venueID)); diff != "" { t.Errorf("venue ID mismatch:\n%s", diff) } { actual, err := q.VenueCountByCity(ctx) if err != nil { t.Error(err) } if diff := cmp.Diff(actual, []VenueCountByCityRow{ {city.Slug, int64(1)}, }); diff != "" { t.Errorf("venue count mismatch:\n%s", diff) } } { actual, err := q.ListCities(ctx) if err != nil { t.Error(err) } if diff := cmp.Diff(actual, []City{city}); diff != "" { t.Errorf("list city mismatch:\n%s", diff) } } { actual, err := q.ListVenues(ctx, city.Slug) if err != nil { t.Error(err) } if diff := cmp.Diff(actual, []Venue{venue}); diff != "" { t.Errorf("list venue mismatch:\n%s", diff) } } { err := q.UpdateCityName(ctx, UpdateCityNameParams{ Slug: city.Slug, Name: "SF", }) if err != nil { t.Error(err) } } { expected := "Fillmore" err := q.UpdateVenueName(ctx, UpdateVenueNameParams{ Slug: venue.Slug, Name: expected, }) if err != nil { t.Error(err) } fresh, err := q.GetVenue(ctx, GetVenueParams{ Slug: venue.Slug, City: city.Slug, }) if diff := cmp.Diff(expected, fresh.Name); diff != "" { t.Errorf("update venue mismatch:\n%s", diff) } } { err := q.DeleteVenue(ctx, DeleteVenueParams{ Slug: venue.Slug, Slug_2: venue.Slug, }) if err != nil { t.Error(err) } } } func TestPrepared(t *testing.T) { t.Parallel() 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(), db) if err != nil { t.Fatal(err) } runOnDeckQueries(t, q) } func TestQueries(t *testing.T) { t.Parallel() 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(db)) } ================================================ FILE: examples/ondeck/mysql/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package ondeck import ( "database/sql" "database/sql/driver" "fmt" "time" ) type VenueStatus string const ( VenueStatusOpen VenueStatus = "open" VenueStatusClosed VenueStatus = "closed" ) func (e *VenueStatus) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = VenueStatus(s) case string: *e = VenueStatus(s) default: return fmt.Errorf("unsupported scan type for VenueStatus: %T", src) } return nil } type NullVenueStatus struct { VenueStatus VenueStatus `json:"venue_status"` Valid bool `json:"valid"` // Valid is true if VenueStatus is not NULL } // Scan implements the Scanner interface. func (ns *NullVenueStatus) Scan(value interface{}) error { if value == nil { ns.VenueStatus, ns.Valid = "", false return nil } ns.Valid = true return ns.VenueStatus.Scan(value) } // Value implements the driver Valuer interface. func (ns NullVenueStatus) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.VenueStatus), nil } type City struct { Slug string `json:"slug"` Name string `json:"name"` } // Venues are places where muisc happens type Venue struct { ID uint64 `json:"id"` // Venues can be either open or closed Status VenueStatus `json:"status"` Statuses sql.NullString `json:"statuses"` // This value appears in public URLs Slug string `json:"slug"` Name string `json:"name"` City string `json:"city"` SpotifyPlaylist string `json:"spotify_playlist"` SongkickID sql.NullString `json:"songkick_id"` Tags sql.NullString `json:"tags"` CreatedAt time.Time `json:"created_at"` } ================================================ FILE: examples/ondeck/mysql/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package ondeck import ( "context" "database/sql" ) type Querier interface { CreateCity(ctx context.Context, arg CreateCityParams) error CreateVenue(ctx context.Context, arg CreateVenueParams) (sql.Result, error) DeleteVenue(ctx context.Context, arg DeleteVenueParams) error GetCity(ctx context.Context, slug string) (City, error) GetVenue(ctx context.Context, arg GetVenueParams) (Venue, error) ListCities(ctx context.Context) ([]City, error) ListVenues(ctx context.Context, city string) ([]Venue, error) UpdateCityName(ctx context.Context, arg UpdateCityNameParams) error UpdateVenueName(ctx context.Context, arg UpdateVenueNameParams) error VenueCountByCity(ctx context.Context) ([]VenueCountByCityRow, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: examples/ondeck/mysql/query/city.sql ================================================ /* name: ListCities :many */ SELECT * FROM city ORDER BY name; /* name: GetCity :one */ SELECT * FROM city WHERE slug = ?; /* name: CreateCity :exec */ INSERT INTO city ( name, slug ) VALUES ( ?, ? ); /* name: UpdateCityName :exec */ UPDATE city SET name = ? WHERE slug = ?; ================================================ FILE: examples/ondeck/mysql/query/venue.sql ================================================ /* name: ListVenues :many */ SELECT * FROM venue WHERE city = ? ORDER BY name; /* name: DeleteVenue :exec */ DELETE FROM venue WHERE slug = ? AND slug = ?; /* name: GetVenue :one */ SELECT * FROM venue WHERE slug = ? AND city = ?; /* name: CreateVenue :execresult */ INSERT INTO venue ( slug, name, city, created_at, spotify_playlist, status, statuses, tags ) VALUES ( ?, ?, ?, NOW(), ?, ?, ?, ? ); /* name: UpdateVenueName :exec */ UPDATE venue SET name = ? WHERE slug = ?; /* name: VenueCountByCity :many */ SELECT city, count(*) FROM venue GROUP BY 1 ORDER BY 1; ================================================ FILE: examples/ondeck/mysql/schema/0001_city.sql ================================================ CREATE TABLE city ( slug varchar(255) PRIMARY KEY, name text NOT NULL ); ================================================ FILE: examples/ondeck/mysql/schema/0002_venue.sql ================================================ CREATE TABLE venues ( id SERIAL primary key, dropped text, status ENUM('open', 'closed') not null COMMENT 'Venues can be either open or closed', statuses text, -- status[], slug text not null COMMENT 'This value appears in public URLs', name varchar(255) not null, city varchar(255) not null references city(slug), spotify_playlist varchar(255) not null, songkick_id text, tags text -- text[] ) COMMENT='Venues are places where muisc happens'; ================================================ FILE: examples/ondeck/mysql/schema/0003_add_column.sql ================================================ ALTER TABLE venues RENAME TO venue; ALTER TABLE venue ADD COLUMN created_at TIMESTAMP NOT NULL DEFAULT NOW(); ALTER TABLE venue DROP COLUMN dropped; ================================================ FILE: examples/ondeck/mysql/venue.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: venue.sql package ondeck import ( "context" "database/sql" ) const createVenue = `-- name: CreateVenue :execresult INSERT INTO venue ( slug, name, city, created_at, spotify_playlist, status, statuses, tags ) VALUES ( ?, ?, ?, NOW(), ?, ?, ?, ? ) ` type CreateVenueParams struct { Slug string `json:"slug"` Name string `json:"name"` City string `json:"city"` SpotifyPlaylist string `json:"spotify_playlist"` Status VenueStatus `json:"status"` Statuses sql.NullString `json:"statuses"` Tags sql.NullString `json:"tags"` } func (q *Queries) CreateVenue(ctx context.Context, arg CreateVenueParams) (sql.Result, error) { return q.exec(ctx, q.createVenueStmt, createVenue, arg.Slug, arg.Name, arg.City, arg.SpotifyPlaylist, arg.Status, arg.Statuses, arg.Tags, ) } const deleteVenue = `-- name: DeleteVenue :exec DELETE FROM venue WHERE slug = ? AND slug = ? ` type DeleteVenueParams struct { Slug string `json:"slug"` Slug_2 string `json:"slug_2"` } func (q *Queries) DeleteVenue(ctx context.Context, arg DeleteVenueParams) error { _, err := q.exec(ctx, q.deleteVenueStmt, deleteVenue, arg.Slug, arg.Slug_2) return err } const getVenue = `-- name: GetVenue :one SELECT id, status, statuses, slug, name, city, spotify_playlist, songkick_id, tags, created_at FROM venue WHERE slug = ? AND city = ? ` type GetVenueParams struct { Slug string `json:"slug"` City string `json:"city"` } func (q *Queries) GetVenue(ctx context.Context, arg GetVenueParams) (Venue, error) { row := q.queryRow(ctx, q.getVenueStmt, getVenue, arg.Slug, arg.City) var i Venue err := row.Scan( &i.ID, &i.Status, &i.Statuses, &i.Slug, &i.Name, &i.City, &i.SpotifyPlaylist, &i.SongkickID, &i.Tags, &i.CreatedAt, ) return i, err } const 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 ` func (q *Queries) ListVenues(ctx context.Context, city string) ([]Venue, error) { rows, err := q.query(ctx, q.listVenuesStmt, listVenues, city) if err != nil { return nil, err } defer rows.Close() var items []Venue for rows.Next() { var i Venue if err := rows.Scan( &i.ID, &i.Status, &i.Statuses, &i.Slug, &i.Name, &i.City, &i.SpotifyPlaylist, &i.SongkickID, &i.Tags, &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 } const updateVenueName = `-- name: UpdateVenueName :exec UPDATE venue SET name = ? WHERE slug = ? ` type UpdateVenueNameParams struct { Name string `json:"name"` Slug string `json:"slug"` } func (q *Queries) UpdateVenueName(ctx context.Context, arg UpdateVenueNameParams) error { _, err := q.exec(ctx, q.updateVenueNameStmt, updateVenueName, arg.Name, arg.Slug) return err } const venueCountByCity = `-- name: VenueCountByCity :many SELECT city, count(*) FROM venue GROUP BY 1 ORDER BY 1 ` type VenueCountByCityRow struct { City string `json:"city"` Count int64 `json:"count"` } func (q *Queries) VenueCountByCity(ctx context.Context) ([]VenueCountByCityRow, error) { rows, err := q.query(ctx, q.venueCountByCityStmt, venueCountByCity) if err != nil { return nil, err } defer rows.Close() var items []VenueCountByCityRow for rows.Next() { var i VenueCountByCityRow if err := rows.Scan(&i.City, &i.Count); 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 } ================================================ FILE: examples/ondeck/postgresql/city.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: city.sql package ondeck import ( "context" ) const createCity = `-- name: CreateCity :one INSERT INTO city ( name, slug ) VALUES ( $1, $2 ) RETURNING slug, name ` type CreateCityParams struct { Name string `json:"name"` Slug string `json:"slug"` } // Create a new city. The slug must be unique. // This is the second line of the comment // This is the third line func (q *Queries) CreateCity(ctx context.Context, arg CreateCityParams) (City, error) { row := q.queryRow(ctx, q.createCityStmt, createCity, arg.Name, arg.Slug) var i City err := row.Scan(&i.Slug, &i.Name) return i, err } const getCity = `-- name: GetCity :one SELECT slug, name FROM city WHERE slug = $1 ` func (q *Queries) GetCity(ctx context.Context, slug string) (City, error) { row := q.queryRow(ctx, q.getCityStmt, getCity, slug) var i City err := row.Scan(&i.Slug, &i.Name) return i, err } const listCities = `-- name: ListCities :many SELECT slug, name FROM city ORDER BY name ` func (q *Queries) ListCities(ctx context.Context) ([]City, error) { rows, err := q.query(ctx, q.listCitiesStmt, listCities) if err != nil { return nil, err } defer rows.Close() var items []City for rows.Next() { var i City if err := rows.Scan(&i.Slug, &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 } const updateCityName = `-- name: UpdateCityName :exec UPDATE city SET name = $2 WHERE slug = $1 ` type UpdateCityNameParams struct { Slug string `json:"slug"` Name string `json:"name"` } func (q *Queries) UpdateCityName(ctx context.Context, arg UpdateCityNameParams) error { _, err := q.exec(ctx, q.updateCityNameStmt, updateCityName, arg.Slug, arg.Name) return err } ================================================ FILE: examples/ondeck/postgresql/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package ondeck import ( "context" "database/sql" "fmt" ) 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} } func Prepare(ctx context.Context, db DBTX) (*Queries, error) { q := Queries{db: db} var err error if q.createCityStmt, err = db.PrepareContext(ctx, createCity); err != nil { return nil, fmt.Errorf("error preparing query CreateCity: %w", err) } if q.createVenueStmt, err = db.PrepareContext(ctx, createVenue); err != nil { return nil, fmt.Errorf("error preparing query CreateVenue: %w", err) } if q.deleteVenueStmt, err = db.PrepareContext(ctx, deleteVenue); err != nil { return nil, fmt.Errorf("error preparing query DeleteVenue: %w", err) } if q.getCityStmt, err = db.PrepareContext(ctx, getCity); err != nil { return nil, fmt.Errorf("error preparing query GetCity: %w", err) } if q.getVenueStmt, err = db.PrepareContext(ctx, getVenue); err != nil { return nil, fmt.Errorf("error preparing query GetVenue: %w", err) } if q.listCitiesStmt, err = db.PrepareContext(ctx, listCities); err != nil { return nil, fmt.Errorf("error preparing query ListCities: %w", err) } if q.listVenuesStmt, err = db.PrepareContext(ctx, listVenues); err != nil { return nil, fmt.Errorf("error preparing query ListVenues: %w", err) } if q.updateCityNameStmt, err = db.PrepareContext(ctx, updateCityName); err != nil { return nil, fmt.Errorf("error preparing query UpdateCityName: %w", err) } if q.updateVenueNameStmt, err = db.PrepareContext(ctx, updateVenueName); err != nil { return nil, fmt.Errorf("error preparing query UpdateVenueName: %w", err) } if q.venueCountByCityStmt, err = db.PrepareContext(ctx, venueCountByCity); err != nil { return nil, fmt.Errorf("error preparing query VenueCountByCity: %w", err) } return &q, nil } func (q *Queries) Close() error { var err error if q.createCityStmt != nil { if cerr := q.createCityStmt.Close(); cerr != nil { err = fmt.Errorf("error closing createCityStmt: %w", cerr) } } if q.createVenueStmt != nil { if cerr := q.createVenueStmt.Close(); cerr != nil { err = fmt.Errorf("error closing createVenueStmt: %w", cerr) } } if q.deleteVenueStmt != nil { if cerr := q.deleteVenueStmt.Close(); cerr != nil { err = fmt.Errorf("error closing deleteVenueStmt: %w", cerr) } } if q.getCityStmt != nil { if cerr := q.getCityStmt.Close(); cerr != nil { err = fmt.Errorf("error closing getCityStmt: %w", cerr) } } if q.getVenueStmt != nil { if cerr := q.getVenueStmt.Close(); cerr != nil { err = fmt.Errorf("error closing getVenueStmt: %w", cerr) } } if q.listCitiesStmt != nil { if cerr := q.listCitiesStmt.Close(); cerr != nil { err = fmt.Errorf("error closing listCitiesStmt: %w", cerr) } } if q.listVenuesStmt != nil { if cerr := q.listVenuesStmt.Close(); cerr != nil { err = fmt.Errorf("error closing listVenuesStmt: %w", cerr) } } if q.updateCityNameStmt != nil { if cerr := q.updateCityNameStmt.Close(); cerr != nil { err = fmt.Errorf("error closing updateCityNameStmt: %w", cerr) } } if q.updateVenueNameStmt != nil { if cerr := q.updateVenueNameStmt.Close(); cerr != nil { err = fmt.Errorf("error closing updateVenueNameStmt: %w", cerr) } } if q.venueCountByCityStmt != nil { if cerr := q.venueCountByCityStmt.Close(); cerr != nil { err = fmt.Errorf("error closing venueCountByCityStmt: %w", cerr) } } return err } func (q *Queries) exec(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) (sql.Result, error) { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).ExecContext(ctx, args...) case stmt != nil: return stmt.ExecContext(ctx, args...) default: return q.db.ExecContext(ctx, query, args...) } } func (q *Queries) query(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) (*sql.Rows, error) { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).QueryContext(ctx, args...) case stmt != nil: return stmt.QueryContext(ctx, args...) default: return q.db.QueryContext(ctx, query, args...) } } func (q *Queries) queryRow(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) *sql.Row { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).QueryRowContext(ctx, args...) case stmt != nil: return stmt.QueryRowContext(ctx, args...) default: return q.db.QueryRowContext(ctx, query, args...) } } type Queries struct { db DBTX tx *sql.Tx createCityStmt *sql.Stmt createVenueStmt *sql.Stmt deleteVenueStmt *sql.Stmt getCityStmt *sql.Stmt getVenueStmt *sql.Stmt listCitiesStmt *sql.Stmt listVenuesStmt *sql.Stmt updateCityNameStmt *sql.Stmt updateVenueNameStmt *sql.Stmt venueCountByCityStmt *sql.Stmt } func (q *Queries) WithTx(tx *sql.Tx) *Queries { return &Queries{ db: tx, tx: tx, createCityStmt: q.createCityStmt, createVenueStmt: q.createVenueStmt, deleteVenueStmt: q.deleteVenueStmt, getCityStmt: q.getCityStmt, getVenueStmt: q.getVenueStmt, listCitiesStmt: q.listCitiesStmt, listVenuesStmt: q.listVenuesStmt, updateCityNameStmt: q.updateCityNameStmt, updateVenueNameStmt: q.updateVenueNameStmt, venueCountByCityStmt: q.venueCountByCityStmt, } } ================================================ FILE: examples/ondeck/postgresql/db_test.go ================================================ //go:build examples package ondeck import ( "context" "database/sql" "testing" "github.com/google/go-cmp/cmp" _ "github.com/lib/pq" "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func runOnDeckQueries(t *testing.T, q *Queries) { ctx := context.Background() city, err := q.CreateCity(ctx, CreateCityParams{ Slug: "san-francisco", Name: "San Francisco", }) if err != nil { t.Fatal(err) } venueID, err := q.CreateVenue(ctx, CreateVenueParams{ Slug: "the-fillmore", Name: "The Fillmore", City: city.Slug, SpotifyPlaylist: "spotify:uri", Status: StatusOpen, Statuses: []Status{StatusOpen, StatusClosed}, Tags: []string{"rock", "punk"}, }) if err != nil { t.Fatal(err) } venue, err := q.GetVenue(ctx, GetVenueParams{ Slug: "the-fillmore", City: city.Slug, }) if err != nil { t.Fatal(err) } if diff := cmp.Diff(venue.ID, venueID); diff != "" { t.Errorf("venue ID mismatch:\n%s", diff) } { actual, err := q.GetCity(ctx, city.Slug) if err != nil { t.Error(err) } if diff := cmp.Diff(actual, city); diff != "" { t.Errorf("get city mismatch:\n%s", diff) } } { actual, err := q.VenueCountByCity(ctx) if err != nil { t.Error(err) } if diff := cmp.Diff(actual, []VenueCountByCityRow{ {city.Slug, 1}, }); diff != "" { t.Errorf("venue county mismatch:\n%s", diff) } } { actual, err := q.ListCities(ctx) if err != nil { t.Error(err) } if diff := cmp.Diff(actual, []City{city}); diff != "" { t.Errorf("list city mismatch:\n%s", diff) } } { actual, err := q.ListVenues(ctx, city.Slug) if err != nil { t.Error(err) } if diff := cmp.Diff(actual, []Venue{venue}); diff != "" { t.Errorf("list venue mismatch:\n%s", diff) } } { err := q.UpdateCityName(ctx, UpdateCityNameParams{ Slug: city.Slug, Name: "SF", }) if err != nil { t.Error(err) } } { id, err := q.UpdateVenueName(ctx, UpdateVenueNameParams{ Slug: venue.Slug, Name: "Fillmore", }) if err != nil { t.Error(err) } if diff := cmp.Diff(id, venue.ID); diff != "" { t.Errorf("update venue mismatch:\n%s", diff) } } { err := q.DeleteVenue(ctx, venue.Slug) if err != nil { t.Error(err) } } } func TestPrepared(t *testing.T) { t.Parallel() uri := local.PostgreSQL(t, []string{"schema"}) db, err := sql.Open("postgres", uri) if err != nil { t.Fatalf("%s: %s", uri, err) } defer db.Close() q, err := Prepare(context.Background(), db) if err != nil { t.Fatal(err) } runOnDeckQueries(t, q) } func TestQueries(t *testing.T) { t.Parallel() uri := local.PostgreSQL(t, []string{"schema"}) db, err := sql.Open("postgres", uri) if err != nil { t.Fatalf("%s: %s", uri, err) } defer db.Close() runOnDeckQueries(t, New(db)) } ================================================ FILE: examples/ondeck/postgresql/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package ondeck import ( "database/sql" "database/sql/driver" "fmt" "time" ) // Venues can be either open or closed type Status string const ( StatusOpen Status = "op!en" StatusClosed Status = "clo@sed" ) func (e *Status) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Status(s) case string: *e = Status(s) default: return fmt.Errorf("unsupported scan type for Status: %T", src) } return nil } type NullStatus struct { Status Status `json:"status"` Valid bool `json:"valid"` // Valid is true if Status is not NULL } // Scan implements the Scanner interface. func (ns *NullStatus) Scan(value interface{}) error { if value == nil { ns.Status, ns.Valid = "", false return nil } ns.Valid = true return ns.Status.Scan(value) } // Value implements the driver Valuer interface. func (ns NullStatus) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Status), nil } type City struct { Slug string `json:"slug"` Name string `json:"name"` } // Venues are places where muisc happens type Venue struct { ID int32 `json:"id"` Status Status `json:"status"` Statuses []Status `json:"statuses"` // This value appears in public URLs Slug string `json:"slug"` Name string `json:"name"` City string `json:"city"` SpotifyPlaylist string `json:"spotify_playlist"` SongkickID sql.NullString `json:"songkick_id"` Tags []string `json:"tags"` CreatedAt time.Time `json:"created_at"` } ================================================ FILE: examples/ondeck/postgresql/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package ondeck import ( "context" ) type Querier interface { // Create a new city. The slug must be unique. // This is the second line of the comment // This is the third line CreateCity(ctx context.Context, arg CreateCityParams) (City, error) CreateVenue(ctx context.Context, arg CreateVenueParams) (int32, error) DeleteVenue(ctx context.Context, slug string) error GetCity(ctx context.Context, slug string) (City, error) GetVenue(ctx context.Context, arg GetVenueParams) (Venue, error) ListCities(ctx context.Context) ([]City, error) ListVenues(ctx context.Context, city string) ([]Venue, error) UpdateCityName(ctx context.Context, arg UpdateCityNameParams) error UpdateVenueName(ctx context.Context, arg UpdateVenueNameParams) (int32, error) VenueCountByCity(ctx context.Context) ([]VenueCountByCityRow, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: examples/ondeck/postgresql/query/city.sql ================================================ -- name: ListCities :many SELECT * FROM city ORDER BY name; -- name: GetCity :one SELECT * FROM city WHERE slug = $1; -- name: CreateCity :one -- Create a new city. The slug must be unique. -- This is the second line of the comment -- This is the third line INSERT INTO city ( name, slug ) VALUES ( $1, $2 ) RETURNING *; -- name: UpdateCityName :exec UPDATE city SET name = $2 WHERE slug = $1; ================================================ FILE: examples/ondeck/postgresql/query/venue.sql ================================================ -- name: ListVenues :many SELECT * FROM venue WHERE city = $1 ORDER BY name; -- name: DeleteVenue :exec DELETE FROM venue WHERE slug = $1 AND slug = $1; -- name: GetVenue :one SELECT * FROM venue WHERE slug = $1 AND city = $2; -- name: CreateVenue :one INSERT INTO venue ( slug, name, city, created_at, spotify_playlist, status, statuses, tags ) VALUES ( $1, $2, $3, NOW(), $4, $5, $6, $7 ) RETURNING id; -- name: UpdateVenueName :one UPDATE venue SET name = $2 WHERE slug = $1 RETURNING id; -- name: VenueCountByCity :many SELECT city, count(*) FROM venue GROUP BY 1 ORDER BY 1; ================================================ FILE: examples/ondeck/postgresql/schema/0001_city.sql ================================================ CREATE TABLE city ( slug text PRIMARY KEY, name text NOT NULL ) ================================================ FILE: examples/ondeck/postgresql/schema/0002_venue.sql ================================================ CREATE TYPE status AS ENUM ('op!en', 'clo@sed'); COMMENT ON TYPE status IS 'Venues can be either open or closed'; CREATE TABLE venues ( id SERIAL primary key, dropped text, status status not null, statuses status[], slug text not null, name varchar(255) not null, city text not null references city(slug), spotify_playlist varchar not null, songkick_id text, tags text[] ); COMMENT ON TABLE venues IS 'Venues are places where muisc happens'; COMMENT ON COLUMN venues.slug IS 'This value appears in public URLs'; ================================================ FILE: examples/ondeck/postgresql/schema/0003_add_column.sql ================================================ ALTER TABLE venues RENAME TO venue; ALTER TABLE venue ADD COLUMN created_at TIMESTAMP NOT NULL DEFAULT NOW(); ALTER TABLE venue DROP COLUMN dropped; ================================================ FILE: examples/ondeck/postgresql/venue.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: venue.sql package ondeck import ( "context" "github.com/lib/pq" ) const createVenue = `-- name: CreateVenue :one INSERT INTO venue ( slug, name, city, created_at, spotify_playlist, status, statuses, tags ) VALUES ( $1, $2, $3, NOW(), $4, $5, $6, $7 ) RETURNING id ` type CreateVenueParams struct { Slug string `json:"slug"` Name string `json:"name"` City string `json:"city"` SpotifyPlaylist string `json:"spotify_playlist"` Status Status `json:"status"` Statuses []Status `json:"statuses"` Tags []string `json:"tags"` } func (q *Queries) CreateVenue(ctx context.Context, arg CreateVenueParams) (int32, error) { row := q.queryRow(ctx, q.createVenueStmt, createVenue, arg.Slug, arg.Name, arg.City, arg.SpotifyPlaylist, arg.Status, pq.Array(arg.Statuses), pq.Array(arg.Tags), ) var id int32 err := row.Scan(&id) return id, err } const deleteVenue = `-- name: DeleteVenue :exec DELETE FROM venue WHERE slug = $1 AND slug = $1 ` func (q *Queries) DeleteVenue(ctx context.Context, slug string) error { _, err := q.exec(ctx, q.deleteVenueStmt, deleteVenue, slug) return err } const getVenue = `-- name: GetVenue :one SELECT id, status, statuses, slug, name, city, spotify_playlist, songkick_id, tags, created_at FROM venue WHERE slug = $1 AND city = $2 ` type GetVenueParams struct { Slug string `json:"slug"` City string `json:"city"` } func (q *Queries) GetVenue(ctx context.Context, arg GetVenueParams) (Venue, error) { row := q.queryRow(ctx, q.getVenueStmt, getVenue, arg.Slug, arg.City) var i Venue err := row.Scan( &i.ID, &i.Status, pq.Array(&i.Statuses), &i.Slug, &i.Name, &i.City, &i.SpotifyPlaylist, &i.SongkickID, pq.Array(&i.Tags), &i.CreatedAt, ) return i, err } const listVenues = `-- name: ListVenues :many SELECT id, status, statuses, slug, name, city, spotify_playlist, songkick_id, tags, created_at FROM venue WHERE city = $1 ORDER BY name ` func (q *Queries) ListVenues(ctx context.Context, city string) ([]Venue, error) { rows, err := q.query(ctx, q.listVenuesStmt, listVenues, city) if err != nil { return nil, err } defer rows.Close() var items []Venue for rows.Next() { var i Venue if err := rows.Scan( &i.ID, &i.Status, pq.Array(&i.Statuses), &i.Slug, &i.Name, &i.City, &i.SpotifyPlaylist, &i.SongkickID, pq.Array(&i.Tags), &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 } const updateVenueName = `-- name: UpdateVenueName :one UPDATE venue SET name = $2 WHERE slug = $1 RETURNING id ` type UpdateVenueNameParams struct { Slug string `json:"slug"` Name string `json:"name"` } func (q *Queries) UpdateVenueName(ctx context.Context, arg UpdateVenueNameParams) (int32, error) { row := q.queryRow(ctx, q.updateVenueNameStmt, updateVenueName, arg.Slug, arg.Name) var id int32 err := row.Scan(&id) return id, err } const venueCountByCity = `-- name: VenueCountByCity :many SELECT city, count(*) FROM venue GROUP BY 1 ORDER BY 1 ` type VenueCountByCityRow struct { City string `json:"city"` Count int64 `json:"count"` } func (q *Queries) VenueCountByCity(ctx context.Context) ([]VenueCountByCityRow, error) { rows, err := q.query(ctx, q.venueCountByCityStmt, venueCountByCity) if err != nil { return nil, err } defer rows.Close() var items []VenueCountByCityRow for rows.Next() { var i VenueCountByCityRow if err := rows.Scan(&i.City, &i.Count); 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 } ================================================ FILE: examples/ondeck/sqlc.json ================================================ { "version": "1", "cloud": { "project": "01HAQMMECEYQYKFJN8MP16QC41" }, "packages": [ { "path": "postgresql", "name": "ondeck", "schema": "postgresql/schema", "queries": "postgresql/query", "engine": "postgresql", "sql_package": "database/sql", "database": { "uri": "${VET_TEST_EXAMPLES_POSTGRES_ONDECK}" }, "analyzer": { "database": false }, "rules": [ "sqlc/db-prepare" ], "emit_json_tags": true, "emit_prepared_queries": true, "emit_interface": true }, { "path": "mysql", "name": "ondeck", "schema": "mysql/schema", "queries": "mysql/query", "engine": "mysql", "database": { "uri": "${VET_TEST_EXAMPLES_MYSQL_ONDECK}" }, "rules": [ "sqlc/db-prepare" ], "emit_json_tags": true, "emit_prepared_queries": true, "emit_interface": true }, { "path": "sqlite", "name": "ondeck", "schema": "sqlite/schema", "queries": "sqlite/query", "engine": "sqlite", "database": { "uri": "file:ondeck?mode=memory&cache=shared" }, "rules": [ "sqlc/db-prepare" ], "emit_json_tags": true, "emit_prepared_queries": true, "emit_interface": true } ] } ================================================ FILE: examples/ondeck/sqlite/city.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: city.sql package ondeck import ( "context" ) const createCity = `-- name: CreateCity :exec INSERT INTO city ( name, slug ) VALUES ( ?, ? ) ` type CreateCityParams struct { Name string `json:"name"` Slug string `json:"slug"` } func (q *Queries) CreateCity(ctx context.Context, arg CreateCityParams) error { _, err := q.exec(ctx, q.createCityStmt, createCity, arg.Name, arg.Slug) return err } const getCity = `-- name: GetCity :one SELECT slug, name FROM city WHERE slug = ? ` func (q *Queries) GetCity(ctx context.Context, slug string) (City, error) { row := q.queryRow(ctx, q.getCityStmt, getCity, slug) var i City err := row.Scan(&i.Slug, &i.Name) return i, err } const listCities = `-- name: ListCities :many SELECT slug, name FROM city ORDER BY name ` func (q *Queries) ListCities(ctx context.Context) ([]City, error) { rows, err := q.query(ctx, q.listCitiesStmt, listCities) if err != nil { return nil, err } defer rows.Close() var items []City for rows.Next() { var i City if err := rows.Scan(&i.Slug, &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 } const updateCityName = `-- name: UpdateCityName :exec UPDATE city SET name = ? WHERE slug = ? ` type UpdateCityNameParams struct { Name string `json:"name"` Slug string `json:"slug"` } func (q *Queries) UpdateCityName(ctx context.Context, arg UpdateCityNameParams) error { _, err := q.exec(ctx, q.updateCityNameStmt, updateCityName, arg.Name, arg.Slug) return err } ================================================ FILE: examples/ondeck/sqlite/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package ondeck import ( "context" "database/sql" "fmt" ) 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} } func Prepare(ctx context.Context, db DBTX) (*Queries, error) { q := Queries{db: db} var err error if q.createCityStmt, err = db.PrepareContext(ctx, createCity); err != nil { return nil, fmt.Errorf("error preparing query CreateCity: %w", err) } if q.createVenueStmt, err = db.PrepareContext(ctx, createVenue); err != nil { return nil, fmt.Errorf("error preparing query CreateVenue: %w", err) } if q.deleteVenueStmt, err = db.PrepareContext(ctx, deleteVenue); err != nil { return nil, fmt.Errorf("error preparing query DeleteVenue: %w", err) } if q.getCityStmt, err = db.PrepareContext(ctx, getCity); err != nil { return nil, fmt.Errorf("error preparing query GetCity: %w", err) } if q.getVenueStmt, err = db.PrepareContext(ctx, getVenue); err != nil { return nil, fmt.Errorf("error preparing query GetVenue: %w", err) } if q.listCitiesStmt, err = db.PrepareContext(ctx, listCities); err != nil { return nil, fmt.Errorf("error preparing query ListCities: %w", err) } if q.listVenuesStmt, err = db.PrepareContext(ctx, listVenues); err != nil { return nil, fmt.Errorf("error preparing query ListVenues: %w", err) } if q.updateCityNameStmt, err = db.PrepareContext(ctx, updateCityName); err != nil { return nil, fmt.Errorf("error preparing query UpdateCityName: %w", err) } if q.updateVenueNameStmt, err = db.PrepareContext(ctx, updateVenueName); err != nil { return nil, fmt.Errorf("error preparing query UpdateVenueName: %w", err) } if q.venueCountByCityStmt, err = db.PrepareContext(ctx, venueCountByCity); err != nil { return nil, fmt.Errorf("error preparing query VenueCountByCity: %w", err) } return &q, nil } func (q *Queries) Close() error { var err error if q.createCityStmt != nil { if cerr := q.createCityStmt.Close(); cerr != nil { err = fmt.Errorf("error closing createCityStmt: %w", cerr) } } if q.createVenueStmt != nil { if cerr := q.createVenueStmt.Close(); cerr != nil { err = fmt.Errorf("error closing createVenueStmt: %w", cerr) } } if q.deleteVenueStmt != nil { if cerr := q.deleteVenueStmt.Close(); cerr != nil { err = fmt.Errorf("error closing deleteVenueStmt: %w", cerr) } } if q.getCityStmt != nil { if cerr := q.getCityStmt.Close(); cerr != nil { err = fmt.Errorf("error closing getCityStmt: %w", cerr) } } if q.getVenueStmt != nil { if cerr := q.getVenueStmt.Close(); cerr != nil { err = fmt.Errorf("error closing getVenueStmt: %w", cerr) } } if q.listCitiesStmt != nil { if cerr := q.listCitiesStmt.Close(); cerr != nil { err = fmt.Errorf("error closing listCitiesStmt: %w", cerr) } } if q.listVenuesStmt != nil { if cerr := q.listVenuesStmt.Close(); cerr != nil { err = fmt.Errorf("error closing listVenuesStmt: %w", cerr) } } if q.updateCityNameStmt != nil { if cerr := q.updateCityNameStmt.Close(); cerr != nil { err = fmt.Errorf("error closing updateCityNameStmt: %w", cerr) } } if q.updateVenueNameStmt != nil { if cerr := q.updateVenueNameStmt.Close(); cerr != nil { err = fmt.Errorf("error closing updateVenueNameStmt: %w", cerr) } } if q.venueCountByCityStmt != nil { if cerr := q.venueCountByCityStmt.Close(); cerr != nil { err = fmt.Errorf("error closing venueCountByCityStmt: %w", cerr) } } return err } func (q *Queries) exec(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) (sql.Result, error) { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).ExecContext(ctx, args...) case stmt != nil: return stmt.ExecContext(ctx, args...) default: return q.db.ExecContext(ctx, query, args...) } } func (q *Queries) query(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) (*sql.Rows, error) { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).QueryContext(ctx, args...) case stmt != nil: return stmt.QueryContext(ctx, args...) default: return q.db.QueryContext(ctx, query, args...) } } func (q *Queries) queryRow(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) *sql.Row { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).QueryRowContext(ctx, args...) case stmt != nil: return stmt.QueryRowContext(ctx, args...) default: return q.db.QueryRowContext(ctx, query, args...) } } type Queries struct { db DBTX tx *sql.Tx createCityStmt *sql.Stmt createVenueStmt *sql.Stmt deleteVenueStmt *sql.Stmt getCityStmt *sql.Stmt getVenueStmt *sql.Stmt listCitiesStmt *sql.Stmt listVenuesStmt *sql.Stmt updateCityNameStmt *sql.Stmt updateVenueNameStmt *sql.Stmt venueCountByCityStmt *sql.Stmt } func (q *Queries) WithTx(tx *sql.Tx) *Queries { return &Queries{ db: tx, tx: tx, createCityStmt: q.createCityStmt, createVenueStmt: q.createVenueStmt, deleteVenueStmt: q.deleteVenueStmt, getCityStmt: q.getCityStmt, getVenueStmt: q.getVenueStmt, listCitiesStmt: q.listCitiesStmt, listVenuesStmt: q.listVenuesStmt, updateCityNameStmt: q.updateCityNameStmt, updateVenueNameStmt: q.updateVenueNameStmt, venueCountByCityStmt: q.venueCountByCityStmt, } } ================================================ FILE: examples/ondeck/sqlite/db_test.go ================================================ //go:build examples package ondeck import ( "context" "database/sql" "strings" "testing" "github.com/sqlc-dev/sqlc/internal/sqltest" "github.com/google/go-cmp/cmp" ) // TODO: Enum is not yet supported const ( VenuesStatusOpen string = "open" VenuesStatusClosed string = "closed" ) func join(vals ...string) sql.NullString { if len(vals) == 0 { return sql.NullString{} } return sql.NullString{ Valid: true, String: strings.Join(vals, ","), } } func runOnDeckQueries(t *testing.T, q *Queries) { ctx := context.Background() err := q.CreateCity(ctx, CreateCityParams{ Slug: "san-francisco", Name: "San Francisco", }) if err != nil { t.Fatal(err) } city, err := q.GetCity(ctx, "san-francisco") if err != nil { t.Fatal(err) } venueResult, err := q.CreateVenue(ctx, CreateVenueParams{ Slug: "the-fillmore", Name: "The Fillmore", City: city.Slug, SpotifyPlaylist: "spotify:uri", Status: VenuesStatusOpen, Statuses: join(string(VenuesStatusOpen), string(VenuesStatusClosed)), Tags: join("rock", "punk"), }) if err != nil { t.Fatal(err) } venueID, err := venueResult.LastInsertId() if err != nil { t.Fatal(err) } venue, err := q.GetVenue(ctx, GetVenueParams{ Slug: "the-fillmore", City: city.Slug, }) if err != nil { t.Fatal(err) } if diff := cmp.Diff(venue.ID, venueID); diff != "" { t.Errorf("venue ID mismatch:\n%s", diff) } { actual, err := q.VenueCountByCity(ctx) if err != nil { t.Error(err) } if diff := cmp.Diff(actual, []VenueCountByCityRow{ {city.Slug, int64(1)}, }); diff != "" { t.Errorf("venue count mismatch:\n%s", diff) } } { actual, err := q.ListCities(ctx) if err != nil { t.Error(err) } if diff := cmp.Diff(actual, []City{city}); diff != "" { t.Errorf("list city mismatch:\n%s", diff) } } { actual, err := q.ListVenues(ctx, city.Slug) if err != nil { t.Error(err) } if diff := cmp.Diff(actual, []Venue{venue}); diff != "" { t.Errorf("list venue mismatch:\n%s", diff) } } { err := q.UpdateCityName(ctx, UpdateCityNameParams{ Slug: city.Slug, Name: "SF", }) if err != nil { t.Error(err) } } { expected := "Fillmore" err := q.UpdateVenueName(ctx, UpdateVenueNameParams{ Slug: venue.Slug, Name: expected, }) if err != nil { t.Error(err) } fresh, err := q.GetVenue(ctx, GetVenueParams{ Slug: venue.Slug, City: city.Slug, }) if diff := cmp.Diff(expected, fresh.Name); diff != "" { t.Errorf("update venue mismatch:\n%s", diff) } } { err := q.DeleteVenue(ctx, DeleteVenueParams{ Slug: venue.Slug, Slug_2: venue.Slug, }) if err != nil { t.Error(err) } } } 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) if err != nil { t.Fatal(err) } runOnDeckQueries(t, q) } func TestQueries(t *testing.T) { t.Parallel() sdb, cleanup := sqltest.SQLite(t, []string{"schema"}) defer sdb.Close() defer cleanup() runOnDeckQueries(t, New(sdb)) } ================================================ FILE: examples/ondeck/sqlite/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package ondeck import ( "database/sql" "time" ) type City struct { Slug string `json:"slug"` Name string `json:"name"` } type Venue struct { ID int64 `json:"id"` Status string `json:"status"` Statuses sql.NullString `json:"statuses"` Slug string `json:"slug"` Name string `json:"name"` City string `json:"city"` SpotifyPlaylist string `json:"spotify_playlist"` SongkickID sql.NullString `json:"songkick_id"` Tags sql.NullString `json:"tags"` CreatedAt time.Time `json:"created_at"` } ================================================ FILE: examples/ondeck/sqlite/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package ondeck import ( "context" "database/sql" ) type Querier interface { CreateCity(ctx context.Context, arg CreateCityParams) error CreateVenue(ctx context.Context, arg CreateVenueParams) (sql.Result, error) DeleteVenue(ctx context.Context, arg DeleteVenueParams) error GetCity(ctx context.Context, slug string) (City, error) GetVenue(ctx context.Context, arg GetVenueParams) (Venue, error) ListCities(ctx context.Context) ([]City, error) ListVenues(ctx context.Context, city string) ([]Venue, error) UpdateCityName(ctx context.Context, arg UpdateCityNameParams) error UpdateVenueName(ctx context.Context, arg UpdateVenueNameParams) error VenueCountByCity(ctx context.Context) ([]VenueCountByCityRow, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: examples/ondeck/sqlite/query/city.sql ================================================ /* name: ListCities :many */ SELECT * FROM city ORDER BY name; /* name: GetCity :one */ SELECT * FROM city WHERE slug = ?; /* name: CreateCity :exec */ INSERT INTO city ( name, slug ) VALUES ( ?, ? ); /* name: UpdateCityName :exec */ UPDATE city SET name = ? WHERE slug = ?; ================================================ FILE: examples/ondeck/sqlite/query/venue.sql ================================================ /* name: ListVenues :many */ SELECT * FROM venue WHERE city = ? ORDER BY name; /* name: DeleteVenue :exec */ DELETE FROM venue WHERE slug = ? AND slug = ?; /* name: GetVenue :one */ SELECT * FROM venue WHERE slug = ? AND city = ?; /* name: CreateVenue :execresult */ INSERT INTO venue ( slug, name, city, created_at, spotify_playlist, status, statuses, tags ) VALUES ( ?, ?, ?, CURRENT_TIMESTAMP, ?, ?, ?, ? ); /* name: UpdateVenueName :exec */ UPDATE venue SET name = ? WHERE slug = ?; /* name: VenueCountByCity :many */ SELECT city, count(*) FROM venue GROUP BY 1 ORDER BY 1; ================================================ FILE: examples/ondeck/sqlite/schema/0001_city.sql ================================================ CREATE TABLE city ( slug varchar(255) PRIMARY KEY, name text NOT NULL ) ================================================ FILE: examples/ondeck/sqlite/schema/0002_venue.sql ================================================ CREATE TABLE venues ( id integer primary key AUTOINCREMENT, dropped text, status text not null, statuses text, -- status[] slug text not null, name varchar(255) not null, city text not null references city(slug), spotify_playlist varchar(255) not null, songkick_id text, tags text, -- tags[] CHECK (status = 'open' OR status = 'closed') ); ================================================ FILE: examples/ondeck/sqlite/schema/0003_add_column.sql ================================================ ALTER TABLE venues RENAME TO venue; ALTER TABLE venue ADD COLUMN created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP; ALTER TABLE venue DROP COLUMN dropped; ================================================ FILE: examples/ondeck/sqlite/venue.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: venue.sql package ondeck import ( "context" "database/sql" ) const createVenue = `-- name: CreateVenue :execresult INSERT INTO venue ( slug, name, city, created_at, spotify_playlist, status, statuses, tags ) VALUES ( ?, ?, ?, CURRENT_TIMESTAMP, ?, ?, ?, ? ) ` type CreateVenueParams struct { Slug string `json:"slug"` Name string `json:"name"` City string `json:"city"` SpotifyPlaylist string `json:"spotify_playlist"` Status string `json:"status"` Statuses sql.NullString `json:"statuses"` Tags sql.NullString `json:"tags"` } func (q *Queries) CreateVenue(ctx context.Context, arg CreateVenueParams) (sql.Result, error) { return q.exec(ctx, q.createVenueStmt, createVenue, arg.Slug, arg.Name, arg.City, arg.SpotifyPlaylist, arg.Status, arg.Statuses, arg.Tags, ) } const deleteVenue = `-- name: DeleteVenue :exec DELETE FROM venue WHERE slug = ? AND slug = ? ` type DeleteVenueParams struct { Slug string `json:"slug"` Slug_2 string `json:"slug_2"` } func (q *Queries) DeleteVenue(ctx context.Context, arg DeleteVenueParams) error { _, err := q.exec(ctx, q.deleteVenueStmt, deleteVenue, arg.Slug, arg.Slug_2) return err } const getVenue = `-- name: GetVenue :one SELECT id, status, statuses, slug, name, city, spotify_playlist, songkick_id, tags, created_at FROM venue WHERE slug = ? AND city = ? ` type GetVenueParams struct { Slug string `json:"slug"` City string `json:"city"` } func (q *Queries) GetVenue(ctx context.Context, arg GetVenueParams) (Venue, error) { row := q.queryRow(ctx, q.getVenueStmt, getVenue, arg.Slug, arg.City) var i Venue err := row.Scan( &i.ID, &i.Status, &i.Statuses, &i.Slug, &i.Name, &i.City, &i.SpotifyPlaylist, &i.SongkickID, &i.Tags, &i.CreatedAt, ) return i, err } const 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 ` func (q *Queries) ListVenues(ctx context.Context, city string) ([]Venue, error) { rows, err := q.query(ctx, q.listVenuesStmt, listVenues, city) if err != nil { return nil, err } defer rows.Close() var items []Venue for rows.Next() { var i Venue if err := rows.Scan( &i.ID, &i.Status, &i.Statuses, &i.Slug, &i.Name, &i.City, &i.SpotifyPlaylist, &i.SongkickID, &i.Tags, &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 } const updateVenueName = `-- name: UpdateVenueName :exec UPDATE venue SET name = ? WHERE slug = ? ` type UpdateVenueNameParams struct { Name string `json:"name"` Slug string `json:"slug"` } func (q *Queries) UpdateVenueName(ctx context.Context, arg UpdateVenueNameParams) error { _, err := q.exec(ctx, q.updateVenueNameStmt, updateVenueName, arg.Name, arg.Slug) return err } const venueCountByCity = `-- name: VenueCountByCity :many SELECT city, count(*) FROM venue GROUP BY 1 ORDER BY 1 ` type VenueCountByCityRow struct { City string `json:"city"` Count int64 `json:"count"` } func (q *Queries) VenueCountByCity(ctx context.Context) ([]VenueCountByCityRow, error) { rows, err := q.query(ctx, q.venueCountByCityStmt, venueCountByCity) if err != nil { return nil, err } defer rows.Close() var items []VenueCountByCityRow for rows.Next() { var i VenueCountByCityRow if err := rows.Scan(&i.City, &i.Count); 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 } ================================================ FILE: go.mod ================================================ module github.com/sqlc-dev/sqlc go 1.26.0 require ( 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/fatih/structtag v1.2.0 github.com/go-sql-driver/mysql v1.9.3 github.com/google/cel-go v0.27.0 github.com/google/go-cmp v0.7.0 github.com/jackc/pgx/v4 v4.18.3 github.com/jackc/pgx/v5 v5.8.0 github.com/jinzhu/inflection v1.0.0 github.com/lib/pq v1.11.2 github.com/ncruces/go-sqlite3 v0.30.5 github.com/pganalyze/pg_query_go/v6 v6.2.2 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.10.2 github.com/spf13/pflag v1.0.10 github.com/sqlc-dev/doubleclick v1.0.0 github.com/tetratelabs/wazero v1.11.0 github.com/wasilibs/go-pgquery v0.0.0-20250409022910-10ac41983c07 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/sync v0.19.0 google.golang.org/grpc v1.79.1 google.golang.org/protobuf v1.36.11 gopkg.in/yaml.v3 v3.0.1 ) require ( cel.dev/expr v0.25.1 // indirect filippo.io/edwards25519 v1.1.1 // 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.3 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect github.com/jackc/pgtype v1.14.0 // indirect github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/ncruces/julianday v1.0.0 // 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/rogpeppe/go-internal v1.10.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.27.0 // indirect golang.org/x/crypto v0.47.0 // indirect golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b // indirect golang.org/x/net v0.48.0 // indirect golang.org/x/sys v0.40.0 // indirect golang.org/x/text v0.33.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect ) replace github.com/go-sql-driver/mysql => github.com/sqlc-dev/mysql v0.0.0-20251129233104-d81e1cac6db2 ================================================ FILE: go.sum ================================================ cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= filippo.io/edwards25519 v1.1.1 h1:YpjwWWlNmGIDyXOn8zLzqiD+9TyIlPhGFG96P39uBpw= filippo.io/edwards25519 v1.1.1/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/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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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.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/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/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-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-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.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/cel-go v0.27.0 h1:e7ih85+4qVrBuqQWTW4FKSqZYokVuc3HnhH5keboFTo= github.com/google/cel-go v0.27.0/go.mod h1:tTJ11FWqnhw5KKpnWpvW9CJC3Y9GK4EIS0WXnBbebzw= 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/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= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= 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.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= github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc= github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= 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.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-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= github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= 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.3 h1:dE2/TrEsGX3RBprb3qryqSV9Y60iZN1C6i8IrmW9/BA= github.com/jackc/pgx/v4 v4.18.3/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw= github.com/jackc/pgx/v5 v5.8.0 h1:TYPDoleBBme0xGSAX3/+NujXXtpZn9HBONkQC7IEZSo= github.com/jackc/pgx/v5 v5.8.0/go.mod h1:QVeDInX2m9VyzvNeiCJVjCkNFqzsNb43204HshNSZKw= 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/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= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.11.2 h1:x6gxUeu39V0BHZiugWe8LXZYZ+Utk7hSJGThs8sdzfs= github.com/lib/pq v1.11.2/go.mod h1:/p+8NSbOcwzAEI7wiMXFlgydTwcgTr3OSKMsD2BitpA= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= 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/ncruces/go-sqlite3 v0.30.5 h1:6usmTQ6khriL8oWilkAZSJM/AIpAlVL2zFrlcpDldCE= github.com/ncruces/go-sqlite3 v0.30.5/go.mod h1:0I0JFflTKzfs3Ogfv8erP7CCoV/Z8uxigVDNOR0AQ5E= github.com/ncruces/julianday v1.0.0 h1:fH0OKwa7NWvniGQtxdJRxAgkBMolni2BjDHaWTxqt7M= github.com/ncruces/julianday v1.0.0/go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvza5fFc9G7g= github.com/pganalyze/pg_query_go/v6 v6.2.2 h1:O0L6zMC226R82RF3X5n0Ki6HjytDsoAzuzp4ATVAHNo= github.com/pganalyze/pg_query_go/v6 v6.2.2/go.mod h1:Cn6+j4870kJz3iYNsb0VsNG04vpSWgEvBwc590J4qD0= github.com/pingcap/errors v0.11.0/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= 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/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= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/riza-io/grpc-go v0.2.0 h1:2HxQKFVE7VuYstcJ8zqpN84VnAoJ4dCL6YFhJewNcHQ= github.com/riza-io/grpc-go v0.2.0/go.mod h1:2bDvR9KkKC3KhtlSHfR3dAXjUMT86kg4UfWFyVGWqi8= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= 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/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.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/sqlc-dev/doubleclick v1.0.0 h1:2/OApfQ2eLgcfa/Fqs8WSMA6atH0G8j9hHbQIgMfAXI= github.com/sqlc-dev/doubleclick v1.0.0/go.mod h1:ODHRroSrk/rr5neRHlWMSRijqOak8YmNaO3VAZCNl5Y= github.com/sqlc-dev/mysql v0.0.0-20251129233104-d81e1cac6db2 h1:kmCAKKtOgK6EXXQX9oPdEASIhgor7TCpWxD8NtcqVcU= github.com/sqlc-dev/mysql v0.0.0-20251129233104-d81e1cac6db2/go.mod h1:TrDMWzjNTKvJeK2GC8uspG+PWyPLiY9QKvwdWpAdlZE= 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/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.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tetratelabs/wazero v1.11.0 h1:+gKemEuKCTevU4d7ZTzlsvgd1uaToIDtlQlmNbwqYhA= github.com/tetratelabs/wazero v1.11.0/go.mod h1:eV28rsN8Q+xwjogd7f4/Pp4xFxO7uOGbLcD/LzB1wiU= 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/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0= go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8= go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI= go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= 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= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= 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.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= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= 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.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= 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= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 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.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= 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/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.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= 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= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= 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/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.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= 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= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 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-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 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-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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-20251202230838-ff82c1b0f217 h1:fCvbg86sFXwdrl5LgVcTEvNC+2txB5mgROGmRL5mrls= google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto= google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 h1:gRkg/vSppuSQoDjxyiGfN4Upv/h/DQmIR10ZU8dh4Ww= google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= google.golang.org/grpc v1.79.1 h1:zGhSi45ODB9/p3VAawt9a+O/MULLl9dpizzNNpq7flY= google.golang.org/grpc v1.79.1/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= 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-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= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= 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.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= ================================================ FILE: internal/analysis/analysis.pb.go ================================================ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 // protoc (unknown) // source: analysis/analysis.proto package analysis import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type Identifier struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Catalog string `protobuf:"bytes,1,opt,name=catalog,proto3" json:"catalog,omitempty"` Schema string `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` } func (x *Identifier) Reset() { *x = Identifier{} if protoimpl.UnsafeEnabled { mi := &file_analysis_analysis_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Identifier) String() string { return protoimpl.X.MessageStringOf(x) } func (*Identifier) ProtoMessage() {} func (x *Identifier) ProtoReflect() protoreflect.Message { mi := &file_analysis_analysis_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Identifier.ProtoReflect.Descriptor instead. func (*Identifier) Descriptor() ([]byte, []int) { return file_analysis_analysis_proto_rawDescGZIP(), []int{0} } func (x *Identifier) GetCatalog() string { if x != nil { return x.Catalog } return "" } func (x *Identifier) GetSchema() string { if x != nil { return x.Schema } return "" } func (x *Identifier) GetName() string { if x != nil { return x.Name } return "" } type Column struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` OriginalName string `protobuf:"bytes,2,opt,name=original_name,json=originalName,proto3" json:"original_name,omitempty"` DataType string `protobuf:"bytes,3,opt,name=data_type,json=dataType,proto3" json:"data_type,omitempty"` NotNull bool `protobuf:"varint,4,opt,name=not_null,json=notNull,proto3" json:"not_null,omitempty"` Unsigned bool `protobuf:"varint,5,opt,name=unsigned,proto3" json:"unsigned,omitempty"` IsArray bool `protobuf:"varint,6,opt,name=is_array,json=isArray,proto3" json:"is_array,omitempty"` ArrayDims int32 `protobuf:"varint,7,opt,name=array_dims,json=arrayDims,proto3" json:"array_dims,omitempty"` Comment string `protobuf:"bytes,8,opt,name=comment,proto3" json:"comment,omitempty"` Length int32 `protobuf:"varint,9,opt,name=length,proto3" json:"length,omitempty"` // *int IsNamedParam bool `protobuf:"varint,10,opt,name=is_named_param,json=isNamedParam,proto3" json:"is_named_param,omitempty"` IsFuncCall bool `protobuf:"varint,11,opt,name=is_func_call,json=isFuncCall,proto3" json:"is_func_call,omitempty"` Scope string `protobuf:"bytes,12,opt,name=scope,proto3" json:"scope,omitempty"` Table *Identifier `protobuf:"bytes,13,opt,name=table,proto3" json:"table,omitempty"` TableAlias string `protobuf:"bytes,14,opt,name=table_alias,json=tableAlias,proto3" json:"table_alias,omitempty"` Type *Identifier `protobuf:"bytes,15,opt,name=type,proto3" json:"type,omitempty"` EmbedTable *Identifier `protobuf:"bytes,16,opt,name=embed_table,json=embedTable,proto3" json:"embed_table,omitempty"` IsSqlcSlice bool `protobuf:"varint,17,opt,name=is_sqlc_slice,json=isSqlcSlice,proto3" json:"is_sqlc_slice,omitempty"` } func (x *Column) Reset() { *x = Column{} if protoimpl.UnsafeEnabled { mi := &file_analysis_analysis_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Column) String() string { return protoimpl.X.MessageStringOf(x) } func (*Column) ProtoMessage() {} func (x *Column) ProtoReflect() protoreflect.Message { mi := &file_analysis_analysis_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Column.ProtoReflect.Descriptor instead. func (*Column) Descriptor() ([]byte, []int) { return file_analysis_analysis_proto_rawDescGZIP(), []int{1} } func (x *Column) GetName() string { if x != nil { return x.Name } return "" } func (x *Column) GetOriginalName() string { if x != nil { return x.OriginalName } return "" } func (x *Column) GetDataType() string { if x != nil { return x.DataType } return "" } func (x *Column) GetNotNull() bool { if x != nil { return x.NotNull } return false } func (x *Column) GetUnsigned() bool { if x != nil { return x.Unsigned } return false } func (x *Column) GetIsArray() bool { if x != nil { return x.IsArray } return false } func (x *Column) GetArrayDims() int32 { if x != nil { return x.ArrayDims } return 0 } func (x *Column) GetComment() string { if x != nil { return x.Comment } return "" } func (x *Column) GetLength() int32 { if x != nil { return x.Length } return 0 } func (x *Column) GetIsNamedParam() bool { if x != nil { return x.IsNamedParam } return false } func (x *Column) GetIsFuncCall() bool { if x != nil { return x.IsFuncCall } return false } func (x *Column) GetScope() string { if x != nil { return x.Scope } return "" } func (x *Column) GetTable() *Identifier { if x != nil { return x.Table } return nil } func (x *Column) GetTableAlias() string { if x != nil { return x.TableAlias } return "" } func (x *Column) GetType() *Identifier { if x != nil { return x.Type } return nil } func (x *Column) GetEmbedTable() *Identifier { if x != nil { return x.EmbedTable } return nil } func (x *Column) GetIsSqlcSlice() bool { if x != nil { return x.IsSqlcSlice } return false } type Parameter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` Column *Column `protobuf:"bytes,2,opt,name=column,proto3" json:"column,omitempty"` } func (x *Parameter) Reset() { *x = Parameter{} if protoimpl.UnsafeEnabled { mi := &file_analysis_analysis_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Parameter) String() string { return protoimpl.X.MessageStringOf(x) } func (*Parameter) ProtoMessage() {} func (x *Parameter) ProtoReflect() protoreflect.Message { mi := &file_analysis_analysis_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Parameter.ProtoReflect.Descriptor instead. func (*Parameter) Descriptor() ([]byte, []int) { return file_analysis_analysis_proto_rawDescGZIP(), []int{2} } func (x *Parameter) GetNumber() int32 { if x != nil { return x.Number } return 0 } func (x *Parameter) GetColumn() *Column { if x != nil { return x.Column } return nil } type Analysis struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Columns []*Column `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` Params []*Parameter `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"` } func (x *Analysis) Reset() { *x = Analysis{} if protoimpl.UnsafeEnabled { mi := &file_analysis_analysis_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Analysis) String() string { return protoimpl.X.MessageStringOf(x) } func (*Analysis) ProtoMessage() {} func (x *Analysis) ProtoReflect() protoreflect.Message { mi := &file_analysis_analysis_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Analysis.ProtoReflect.Descriptor instead. func (*Analysis) Descriptor() ([]byte, []int) { return file_analysis_analysis_proto_rawDescGZIP(), []int{3} } func (x *Analysis) GetColumns() []*Column { if x != nil { return x.Columns } return nil } func (x *Analysis) GetParams() []*Parameter { if x != nil { return x.Params } return nil } var File_analysis_analysis_proto protoreflect.FileDescriptor var file_analysis_analysis_proto_rawDesc = []byte{ 0x0a, 0x17, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x22, 0x52, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb1, 0x04, 0x0a, 0x06, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x74, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6e, 0x6f, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x64, 0x69, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x61, 0x72, 0x72, 0x61, 0x79, 0x44, 0x69, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x20, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x46, 0x75, 0x6e, 0x63, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x73, 0x71, 0x6c, 0x63, 0x5f, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x53, 0x71, 0x6c, 0x63, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x22, 0x4d, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x22, 0x63, 0x0a, 0x08, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x89, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x42, 0x0d, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x71, 0x6c, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x71, 0x6c, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0xca, 0x02, 0x08, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0xe2, 0x02, 0x14, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_analysis_analysis_proto_rawDescOnce sync.Once file_analysis_analysis_proto_rawDescData = file_analysis_analysis_proto_rawDesc ) func file_analysis_analysis_proto_rawDescGZIP() []byte { file_analysis_analysis_proto_rawDescOnce.Do(func() { file_analysis_analysis_proto_rawDescData = protoimpl.X.CompressGZIP(file_analysis_analysis_proto_rawDescData) }) return file_analysis_analysis_proto_rawDescData } var file_analysis_analysis_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_analysis_analysis_proto_goTypes = []interface{}{ (*Identifier)(nil), // 0: analysis.Identifier (*Column)(nil), // 1: analysis.Column (*Parameter)(nil), // 2: analysis.Parameter (*Analysis)(nil), // 3: analysis.Analysis } var file_analysis_analysis_proto_depIdxs = []int32{ 0, // 0: analysis.Column.table:type_name -> analysis.Identifier 0, // 1: analysis.Column.type:type_name -> analysis.Identifier 0, // 2: analysis.Column.embed_table:type_name -> analysis.Identifier 1, // 3: analysis.Parameter.column:type_name -> analysis.Column 1, // 4: analysis.Analysis.columns:type_name -> analysis.Column 2, // 5: analysis.Analysis.params:type_name -> analysis.Parameter 6, // [6:6] is the sub-list for method output_type 6, // [6:6] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name 6, // [6:6] is the sub-list for extension extendee 0, // [0:6] is the sub-list for field type_name } func init() { file_analysis_analysis_proto_init() } func file_analysis_analysis_proto_init() { if File_analysis_analysis_proto != nil { return } if !protoimpl.UnsafeEnabled { file_analysis_analysis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Identifier); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_analysis_analysis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Column); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_analysis_analysis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Parameter); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_analysis_analysis_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Analysis); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_analysis_analysis_proto_rawDesc, NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 0, }, GoTypes: file_analysis_analysis_proto_goTypes, DependencyIndexes: file_analysis_analysis_proto_depIdxs, MessageInfos: file_analysis_analysis_proto_msgTypes, }.Build() File_analysis_analysis_proto = out.File file_analysis_analysis_proto_rawDesc = nil file_analysis_analysis_proto_goTypes = nil file_analysis_analysis_proto_depIdxs = nil } ================================================ FILE: internal/analysis/analysis_vtproto.pb.go ================================================ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: v0.4.0 // source: analysis/analysis.proto package analysis import ( fmt "fmt" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" bits "math/bits" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) func (m *Identifier) CloneVT() *Identifier { if m == nil { return (*Identifier)(nil) } r := &Identifier{ Catalog: m.Catalog, Schema: m.Schema, Name: m.Name, } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Identifier) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Column) CloneVT() *Column { if m == nil { return (*Column)(nil) } r := &Column{ Name: m.Name, OriginalName: m.OriginalName, DataType: m.DataType, NotNull: m.NotNull, Unsigned: m.Unsigned, IsArray: m.IsArray, ArrayDims: m.ArrayDims, Comment: m.Comment, Length: m.Length, IsNamedParam: m.IsNamedParam, IsFuncCall: m.IsFuncCall, Scope: m.Scope, Table: m.Table.CloneVT(), TableAlias: m.TableAlias, Type: m.Type.CloneVT(), EmbedTable: m.EmbedTable.CloneVT(), IsSqlcSlice: m.IsSqlcSlice, } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Column) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Parameter) CloneVT() *Parameter { if m == nil { return (*Parameter)(nil) } r := &Parameter{ Number: m.Number, Column: m.Column.CloneVT(), } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Parameter) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Analysis) CloneVT() *Analysis { if m == nil { return (*Analysis)(nil) } r := &Analysis{} if rhs := m.Columns; rhs != nil { tmpContainer := make([]*Column, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.Columns = tmpContainer } if rhs := m.Params; rhs != nil { tmpContainer := make([]*Parameter, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.Params = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Analysis) CloneMessageVT() proto.Message { return m.CloneVT() } func (this *Identifier) EqualVT(that *Identifier) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Catalog != that.Catalog { return false } if this.Schema != that.Schema { return false } if this.Name != that.Name { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *Identifier) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Identifier) if !ok { return false } return this.EqualVT(that) } func (this *Column) EqualVT(that *Column) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Name != that.Name { return false } if this.OriginalName != that.OriginalName { return false } if this.DataType != that.DataType { return false } if this.NotNull != that.NotNull { return false } if this.Unsigned != that.Unsigned { return false } if this.IsArray != that.IsArray { return false } if this.ArrayDims != that.ArrayDims { return false } if this.Comment != that.Comment { return false } if this.Length != that.Length { return false } if this.IsNamedParam != that.IsNamedParam { return false } if this.IsFuncCall != that.IsFuncCall { return false } if this.Scope != that.Scope { return false } if !this.Table.EqualVT(that.Table) { return false } if this.TableAlias != that.TableAlias { return false } if !this.Type.EqualVT(that.Type) { return false } if !this.EmbedTable.EqualVT(that.EmbedTable) { return false } if this.IsSqlcSlice != that.IsSqlcSlice { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *Column) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Column) if !ok { return false } return this.EqualVT(that) } func (this *Parameter) EqualVT(that *Parameter) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.Number != that.Number { return false } if !this.Column.EqualVT(that.Column) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *Parameter) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Parameter) if !ok { return false } return this.EqualVT(that) } func (this *Analysis) EqualVT(that *Analysis) bool { if this == that { return true } else if this == nil || that == nil { return false } if len(this.Columns) != len(that.Columns) { return false } for i, vx := range this.Columns { vy := that.Columns[i] if p, q := vx, vy; p != q { if p == nil { p = &Column{} } if q == nil { q = &Column{} } if !p.EqualVT(q) { return false } } } if len(this.Params) != len(that.Params) { return false } for i, vx := range this.Params { vy := that.Params[i] if p, q := vx, vy; p != q { if p == nil { p = &Parameter{} } if q == nil { q = &Parameter{} } if !p.EqualVT(q) { return false } } } return string(this.unknownFields) == string(that.unknownFields) } func (this *Analysis) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Analysis) if !ok { return false } return this.EqualVT(that) } func (m *Identifier) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Identifier) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Identifier) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x1a } if len(m.Schema) > 0 { i -= len(m.Schema) copy(dAtA[i:], m.Schema) i = encodeVarint(dAtA, i, uint64(len(m.Schema))) i-- dAtA[i] = 0x12 } if len(m.Catalog) > 0 { i -= len(m.Catalog) copy(dAtA[i:], m.Catalog) i = encodeVarint(dAtA, i, uint64(len(m.Catalog))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Column) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Column) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Column) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.IsSqlcSlice { i-- if m.IsSqlcSlice { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x88 } if m.EmbedTable != nil { size, err := m.EmbedTable.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x82 } if m.Type != nil { size, err := m.Type.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x7a } if len(m.TableAlias) > 0 { i -= len(m.TableAlias) copy(dAtA[i:], m.TableAlias) i = encodeVarint(dAtA, i, uint64(len(m.TableAlias))) i-- dAtA[i] = 0x72 } if m.Table != nil { size, err := m.Table.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x6a } if len(m.Scope) > 0 { i -= len(m.Scope) copy(dAtA[i:], m.Scope) i = encodeVarint(dAtA, i, uint64(len(m.Scope))) i-- dAtA[i] = 0x62 } if m.IsFuncCall { i-- if m.IsFuncCall { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x58 } if m.IsNamedParam { i-- if m.IsNamedParam { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x50 } if m.Length != 0 { i = encodeVarint(dAtA, i, uint64(m.Length)) i-- dAtA[i] = 0x48 } if len(m.Comment) > 0 { i -= len(m.Comment) copy(dAtA[i:], m.Comment) i = encodeVarint(dAtA, i, uint64(len(m.Comment))) i-- dAtA[i] = 0x42 } if m.ArrayDims != 0 { i = encodeVarint(dAtA, i, uint64(m.ArrayDims)) i-- dAtA[i] = 0x38 } if m.IsArray { i-- if m.IsArray { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x30 } if m.Unsigned { i-- if m.Unsigned { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x28 } if m.NotNull { i-- if m.NotNull { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x20 } if len(m.DataType) > 0 { i -= len(m.DataType) copy(dAtA[i:], m.DataType) i = encodeVarint(dAtA, i, uint64(len(m.DataType))) i-- dAtA[i] = 0x1a } if len(m.OriginalName) > 0 { i -= len(m.OriginalName) copy(dAtA[i:], m.OriginalName) i = encodeVarint(dAtA, i, uint64(len(m.OriginalName))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Parameter) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Parameter) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Parameter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.Column != nil { size, err := m.Column.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if m.Number != 0 { i = encodeVarint(dAtA, i, uint64(m.Number)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Analysis) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Analysis) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Analysis) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Params) > 0 { for iNdEx := len(m.Params) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Params[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } } if len(m.Columns) > 0 { for iNdEx := len(m.Columns) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Columns[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func encodeVarint(dAtA []byte, offset int, v uint64) int { offset -= sov(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Identifier) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Identifier) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Identifier) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x1a } if len(m.Schema) > 0 { i -= len(m.Schema) copy(dAtA[i:], m.Schema) i = encodeVarint(dAtA, i, uint64(len(m.Schema))) i-- dAtA[i] = 0x12 } if len(m.Catalog) > 0 { i -= len(m.Catalog) copy(dAtA[i:], m.Catalog) i = encodeVarint(dAtA, i, uint64(len(m.Catalog))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Column) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Column) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Column) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.IsSqlcSlice { i-- if m.IsSqlcSlice { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x88 } if m.EmbedTable != nil { size, err := m.EmbedTable.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x82 } if m.Type != nil { size, err := m.Type.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x7a } if len(m.TableAlias) > 0 { i -= len(m.TableAlias) copy(dAtA[i:], m.TableAlias) i = encodeVarint(dAtA, i, uint64(len(m.TableAlias))) i-- dAtA[i] = 0x72 } if m.Table != nil { size, err := m.Table.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x6a } if len(m.Scope) > 0 { i -= len(m.Scope) copy(dAtA[i:], m.Scope) i = encodeVarint(dAtA, i, uint64(len(m.Scope))) i-- dAtA[i] = 0x62 } if m.IsFuncCall { i-- if m.IsFuncCall { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x58 } if m.IsNamedParam { i-- if m.IsNamedParam { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x50 } if m.Length != 0 { i = encodeVarint(dAtA, i, uint64(m.Length)) i-- dAtA[i] = 0x48 } if len(m.Comment) > 0 { i -= len(m.Comment) copy(dAtA[i:], m.Comment) i = encodeVarint(dAtA, i, uint64(len(m.Comment))) i-- dAtA[i] = 0x42 } if m.ArrayDims != 0 { i = encodeVarint(dAtA, i, uint64(m.ArrayDims)) i-- dAtA[i] = 0x38 } if m.IsArray { i-- if m.IsArray { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x30 } if m.Unsigned { i-- if m.Unsigned { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x28 } if m.NotNull { i-- if m.NotNull { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x20 } if len(m.DataType) > 0 { i -= len(m.DataType) copy(dAtA[i:], m.DataType) i = encodeVarint(dAtA, i, uint64(len(m.DataType))) i-- dAtA[i] = 0x1a } if len(m.OriginalName) > 0 { i -= len(m.OriginalName) copy(dAtA[i:], m.OriginalName) i = encodeVarint(dAtA, i, uint64(len(m.OriginalName))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Parameter) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Parameter) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Parameter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if m.Column != nil { size, err := m.Column.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if m.Number != 0 { i = encodeVarint(dAtA, i, uint64(m.Number)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Analysis) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Analysis) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Analysis) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } i := len(dAtA) _ = i var l int _ = l if m.unknownFields != nil { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } if len(m.Params) > 0 { for iNdEx := len(m.Params) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Params[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } } if len(m.Columns) > 0 { for iNdEx := len(m.Columns) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Columns[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *Identifier) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Catalog) if l > 0 { n += 1 + l + sov(uint64(l)) } l = len(m.Schema) if l > 0 { n += 1 + l + sov(uint64(l)) } l = len(m.Name) if l > 0 { n += 1 + l + sov(uint64(l)) } n += len(m.unknownFields) return n } func (m *Column) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sov(uint64(l)) } l = len(m.OriginalName) if l > 0 { n += 1 + l + sov(uint64(l)) } l = len(m.DataType) if l > 0 { n += 1 + l + sov(uint64(l)) } if m.NotNull { n += 2 } if m.Unsigned { n += 2 } if m.IsArray { n += 2 } if m.ArrayDims != 0 { n += 1 + sov(uint64(m.ArrayDims)) } l = len(m.Comment) if l > 0 { n += 1 + l + sov(uint64(l)) } if m.Length != 0 { n += 1 + sov(uint64(m.Length)) } if m.IsNamedParam { n += 2 } if m.IsFuncCall { n += 2 } l = len(m.Scope) if l > 0 { n += 1 + l + sov(uint64(l)) } if m.Table != nil { l = m.Table.SizeVT() n += 1 + l + sov(uint64(l)) } l = len(m.TableAlias) if l > 0 { n += 1 + l + sov(uint64(l)) } if m.Type != nil { l = m.Type.SizeVT() n += 1 + l + sov(uint64(l)) } if m.EmbedTable != nil { l = m.EmbedTable.SizeVT() n += 2 + l + sov(uint64(l)) } if m.IsSqlcSlice { n += 3 } n += len(m.unknownFields) return n } func (m *Parameter) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Number != 0 { n += 1 + sov(uint64(m.Number)) } if m.Column != nil { l = m.Column.SizeVT() n += 1 + l + sov(uint64(l)) } n += len(m.unknownFields) return n } func (m *Analysis) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Columns) > 0 { for _, e := range m.Columns { l = e.SizeVT() n += 1 + l + sov(uint64(l)) } } if len(m.Params) > 0 { for _, e := range m.Params { l = e.SizeVT() n += 1 + l + sov(uint64(l)) } } n += len(m.unknownFields) return n } func sov(x uint64) (n int) { return (bits.Len64(x|1) + 6) / 7 } func soz(x uint64) (n int) { return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Identifier) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Identifier: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Identifier: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Catalog", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Catalog = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Schema = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Column) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Column: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Column: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OriginalName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.OriginalName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DataType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.DataType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NotNull", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.NotNull = bool(v != 0) case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Unsigned", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.Unsigned = bool(v != 0) case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IsArray", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.IsArray = bool(v != 0) case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ArrayDims", wireType) } m.ArrayDims = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ArrayDims |= int32(b&0x7F) << shift if b < 0x80 { break } } case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Comment = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Length", wireType) } m.Length = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Length |= int32(b&0x7F) << shift if b < 0x80 { break } } case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IsNamedParam", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.IsNamedParam = bool(v != 0) case 11: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IsFuncCall", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.IsFuncCall = bool(v != 0) case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Scope = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 13: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Table == nil { m.Table = &Identifier{} } if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 14: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TableAlias", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.TableAlias = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 15: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Type == nil { m.Type = &Identifier{} } if err := m.Type.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 16: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EmbedTable", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.EmbedTable == nil { m.EmbedTable = &Identifier{} } if err := m.EmbedTable.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 17: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field IsSqlcSlice", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.IsSqlcSlice = bool(v != 0) default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Parameter) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Parameter: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Parameter: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) } m.Number = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Number |= int32(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } if m.Column == nil { m.Column = &Column{} } if err := m.Column.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Analysis) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Analysis: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Analysis: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Columns", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Columns = append(m.Columns, &Column{}) if err := m.Columns[len(m.Columns)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Params = append(m.Params, &Parameter{}) if err := m.Params[len(m.Params)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skip(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflow } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflow } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } case 1: iNdEx += 8 case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflow } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if length < 0 { return 0, ErrInvalidLength } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroup } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLength } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflow = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") ) ================================================ FILE: internal/analyzer/analyzer.go ================================================ package analyzer import ( "context" "encoding/json" "fmt" "hash/fnv" "log/slog" "os" "path/filepath" "google.golang.org/protobuf/proto" "github.com/sqlc-dev/sqlc/internal/analysis" "github.com/sqlc-dev/sqlc/internal/cache" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/info" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/named" ) type CachedAnalyzer struct { a Analyzer config config.Config configBytes []byte db config.Database } func Cached(a Analyzer, c config.Config, db config.Database) *CachedAnalyzer { return &CachedAnalyzer{ a: a, config: c, db: db, } } // Create a new error here func (c *CachedAnalyzer) Analyze(ctx context.Context, n ast.Node, q string, schema []string, np *named.ParamSet) (*analysis.Analysis, error) { result, rerun, err := c.analyze(ctx, n, q, schema, np) if rerun { if err != nil { slog.Warn("first analysis failed with error", "err", err) } return c.a.Analyze(ctx, n, q, schema, np) } return result, err } func (c *CachedAnalyzer) analyze(ctx context.Context, n ast.Node, q string, schema []string, np *named.ParamSet) (*analysis.Analysis, bool, error) { // Only cache queries for managed databases. We can't be certain the // database is in an unchanged state otherwise if !c.db.Managed { return nil, true, nil } dir, err := cache.AnalysisDir() if err != nil { return nil, true, err } if c.configBytes == nil { c.configBytes, err = json.Marshal(c.config) if err != nil { return nil, true, err } } // Calculate cache key h := fnv.New64() h.Write([]byte(info.Version)) h.Write(c.configBytes) for _, m := range schema { h.Write([]byte(m)) } h.Write([]byte(q)) key := fmt.Sprintf("%x", h.Sum(nil)) path := filepath.Join(dir, key) if _, err := os.Stat(path); err == nil { contents, err := os.ReadFile(path) if err != nil { return nil, true, err } var a analysis.Analysis if err := proto.Unmarshal(contents, &a); err != nil { return nil, true, err } return &a, false, nil } result, err := c.a.Analyze(ctx, n, q, schema, np) if err == nil { contents, err := proto.Marshal(result) if err != nil { slog.Warn("unable to marshal analysis", "err", err) return result, false, nil } if err := os.WriteFile(path, contents, 0644); err != nil { slog.Warn("saving analysis to disk failed", "err", err) return result, false, nil } } return result, false, err } func (c *CachedAnalyzer) Close(ctx context.Context) error { return c.a.Close(ctx) } func (c *CachedAnalyzer) EnsureConn(ctx context.Context, migrations []string) error { return c.a.EnsureConn(ctx, migrations) } func (c *CachedAnalyzer) GetColumnNames(ctx context.Context, query string) ([]string, error) { return c.a.GetColumnNames(ctx, query) } type Analyzer interface { Analyze(context.Context, ast.Node, string, []string, *named.ParamSet) (*analysis.Analysis, error) Close(context.Context) error // EnsureConn initializes the database connection with the given migrations. // This is required for database-only mode where we need to connect before analyzing queries. EnsureConn(ctx context.Context, migrations []string) error // GetColumnNames returns the column names for a query by preparing it against the database. // This is used for star expansion in database-only mode. GetColumnNames(ctx context.Context, query string) ([]string, error) } ================================================ FILE: internal/bundler/multipart.go ================================================ package bundler import ( "os" "path/filepath" pb "github.com/sqlc-dev/sqlc/internal/quickdb/v1" "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" ) func readFiles(dir string, paths []string) ([]*pb.File, error) { files, err := sqlpath.Glob(paths) if err != nil { return nil, err } var out []*pb.File for _, file := range files { f, err := readFile(dir, file) if err != nil { return nil, err } out = append(out, f) } return out, nil } 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 &pb.File{ Name: rel, Contents: blob, }, nil } ================================================ FILE: internal/bundler/upload.go ================================================ package bundler import ( "context" "errors" "fmt" "log/slog" "os" "strings" "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" ) var ErrNoProject = errors.New(`project uploads require a cloud project If you don't have a project, you can create one from the sqlc Cloud dashboard at https://dashboard.sqlc.dev/. If you have a project, ensure you've set its id as the value of the "project" field within the "cloud" section of your sqlc configuration. The id will look similar to "01HA8TWGMYPHK0V2GGMB3R2TP9".`) var ErrNoAuthToken = errors.New(`project uploads require an auth token If you don't have an auth token, you can create one from the sqlc Cloud dashboard at https://dashboard.sqlc.dev/. If you have an auth token, ensure you've set it as the value of the SQLC_AUTH_TOKEN environment variable.`) type Uploader struct { configPath string config *config.Config dir string 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, config: conf, dir: dir, } } func (up *Uploader) Validate() error { if up.config.Cloud.Project == "" { return ErrNoProject } if up.config.Cloud.AuthToken == "" { return ErrNoAuthToken } if up.client == nil { client, err := quickdb.NewClientFromConfig(up.config.Cloud) if err != nil { return fmt.Errorf("client init failed: %w", err) } up.client = client } return nil } 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) } 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 } res := &pb.UploadArchiveRequest{ SqlcVersion: info.Version, 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) 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 } 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 []*QuerySetArchive, tags []string) error { if err := up.Validate(); err != nil { return err } req, err := up.buildRequest(ctx, result, tags) if err != nil { return err } if _, err := up.client.UploadArchive(ctx, req); err != nil { return fmt.Errorf("upload error: %w", err) } return nil } ================================================ FILE: internal/cache/cache.go ================================================ package cache import ( "fmt" "os" "path/filepath" ) // The cache directory defaults to os.UserCacheDir(). This location can be // overridden by the SQLCCACHE environment variable. // // Currently the cache stores two types of data: plugins and query analysis func Dir() (string, error) { cache := os.Getenv("SQLCCACHE") if cache != "" { return cache, nil } cacheHome, err := os.UserCacheDir() if err != nil { return "", err } return filepath.Join(cacheHome, "sqlc"), nil } func PluginsDir() (string, error) { cacheRoot, err := Dir() if err != nil { return "", err } dir := filepath.Join(cacheRoot, "plugins") if err := os.MkdirAll(dir, 0755); err != nil && !os.IsExist(err) { return "", fmt.Errorf("failed to create %s directory: %w", dir, err) } return dir, nil } func AnalysisDir() (string, error) { cacheRoot, err := Dir() if err != nil { return "", err } dir := filepath.Join(cacheRoot, "query_analysis") if err := os.MkdirAll(dir, 0755); err != nil && !os.IsExist(err) { return "", fmt.Errorf("failed to create %s directory: %w", dir, err) } return dir, nil } ================================================ FILE: internal/cmd/cmd.go ================================================ package cmd import ( "bufio" "bytes" "context" "errors" "fmt" "io" "os" "os/exec" "path/filepath" "runtime/trace" "github.com/cubicdaiya/gonp" "github.com/spf13/cobra" "github.com/spf13/pflag" "gopkg.in/yaml.v3" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/debug" "github.com/sqlc-dev/sqlc/internal/info" "github.com/sqlc-dev/sqlc/internal/opts" "github.com/sqlc-dev/sqlc/internal/tracer" ) func init() { createDBCmd.Flags().StringP("queryset", "", "", "name of the queryset to use") 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") parseCmd.Flags().StringP("dialect", "d", "", "SQL dialect to use (postgresql, mysql, or sqlite)") } // Do runs the command logic. 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().Bool("no-remote", false, "disable remote execution (default: false)") rootCmd.PersistentFlags().Bool("remote", false, "enable remote execution (default: false)") rootCmd.AddCommand(checkCmd) rootCmd.AddCommand(createDBCmd) rootCmd.AddCommand(diffCmd) rootCmd.AddCommand(genCmd) rootCmd.AddCommand(initCmd) rootCmd.AddCommand(parseCmd) rootCmd.AddCommand(versionCmd) rootCmd.AddCommand(verifyCmd) rootCmd.AddCommand(pushCmd) rootCmd.AddCommand(NewCmdVet()) rootCmd.SetArgs(args) rootCmd.SetIn(stdin) rootCmd.SetOut(stdout) rootCmd.SetErr(stderr) ctx := context.Background() if debug.Debug.Trace != "" { tracectx, cleanup, err := tracer.Start(ctx) if err != nil { fmt.Printf("failed to start trace: %v\n", err) return 1 } ctx = tracectx defer cleanup() } if err := rootCmd.ExecuteContext(ctx); err != nil { if exitError, ok := err.(*exec.ExitError); ok { return exitError.ExitCode() } else { return 1 } } return 0 } var version string var versionCmd = &cobra.Command{ Use: "version", Short: "Print the sqlc version number", RunE: func(cmd *cobra.Command, args []string) error { defer trace.StartRegion(cmd.Context(), "version").End() if version == "" { fmt.Fprintf(cmd.OutOrStdout(), "%s\n", info.Version) } else { fmt.Fprintf(cmd.OutOrStdout(), "%s\n", version) } return nil }, } var initCmd = &cobra.Command{ Use: "init", Short: "Create an empty sqlc.yaml settings file", RunE: func(cmd *cobra.Command, args []string) error { useV1, err := cmd.Flags().GetBool("v1") if err != nil { return err } var yamlConfig interface{} if useV1 { yamlConfig = config.V1GenerateSettings{Version: "1"} } else { yamlConfig = config.Config{Version: "2"} } defer trace.StartRegion(cmd.Context(), "init").End() file := "sqlc.yaml" if f := cmd.Flag("file"); f != nil && f.Changed { file = f.Value.String() if file == "" { return fmt.Errorf("file argument is empty") } } if _, err := os.Stat(file); !os.IsNotExist(err) { fmt.Printf("%s is already created\n", file) return nil } blob, err := yaml.Marshal(yamlConfig) if err != nil { return err } err = os.WriteFile(file, blob, 0644) if err != nil { return err } configDoc := "https://docs.sqlc.dev/en/stable/reference/config.html" fmt.Printf( "%s is added. Please visit %s to learn more about configuration\n", file, configDoc, ) return nil }, } type Env struct { DryRun bool Debug opts.Debug Experiment opts.Experiment Remote bool NoRemote bool } func ParseEnv(c *cobra.Command) Env { dr := c.Flag("dry-run") r := c.Flag("remote") nr := c.Flag("no-remote") return Env{ DryRun: dr != nil && dr.Changed, Debug: opts.DebugFromEnv(), Experiment: opts.ExperimentFromEnv(), Remote: r != nil && r.Value.String() == "true", NoRemote: nr != nil && nr.Value.String() == "true", } } var ErrPluginProcessDisabled = errors.New("plugin: process-based plugins disabled via SQLCDEBUG=processplugins=0") func (e *Env) Validate(cfg *config.Config) error { for _, plugin := range cfg.Plugins { if plugin.Process != nil && !e.Debug.ProcessPlugins { return ErrPluginProcessDisabled } } return nil } func getConfigPath(stderr io.Writer, f *pflag.Flag) (string, string) { if f != nil && f.Changed { file := f.Value.String() if file == "" { fmt.Fprintln(stderr, "error parsing config: file argument is empty") os.Exit(1) } abspath, err := filepath.Abs(file) if err != nil { fmt.Fprintf(stderr, "error parsing config: absolute file path lookup failed: %s\n", err) os.Exit(1) } return filepath.Dir(abspath), filepath.Base(abspath) } else { wd, err := os.Getwd() if err != nil { fmt.Fprintln(stderr, "error parsing sqlc.json: file does not exist") os.Exit(1) } return wd, "" } } var genCmd = &cobra.Command{ Use: "generate", Short: "Generate source code from SQL", RunE: func(cmd *cobra.Command, args []string) error { defer trace.StartRegion(cmd.Context(), "generate").End() stderr := cmd.ErrOrStderr() dir, name := getConfigPath(stderr, cmd.Flag("file")) output, err := Generate(cmd.Context(), dir, name, &Options{ Env: ParseEnv(cmd), Stderr: stderr, }) if err != nil { os.Exit(1) } defer trace.StartRegion(cmd.Context(), "writefiles").End() for filename, source := range output { os.MkdirAll(filepath.Dir(filename), 0755) if err := os.WriteFile(filename, []byte(source), 0644); err != nil { fmt.Fprintf(stderr, "%s: %s\n", filename, err) return err } } return nil }, } var checkCmd = &cobra.Command{ Use: "compile", Short: "Statically check SQL for syntax and type errors", RunE: func(cmd *cobra.Command, args []string) error { defer trace.StartRegion(cmd.Context(), "compile").End() stderr := cmd.ErrOrStderr() dir, name := getConfigPath(stderr, cmd.Flag("file")) _, err := Generate(cmd.Context(), dir, name, &Options{ Env: ParseEnv(cmd), Stderr: stderr, }) if err != nil { os.Exit(1) } return nil }, } func getLines(f []byte) []string { fp := bytes.NewReader(f) scanner := bufio.NewScanner(fp) lines := make([]string, 0) for scanner.Scan() { lines = append(lines, scanner.Text()) } return lines } func filterHunks[T gonp.Elem](uniHunks []gonp.UniHunk[T]) []gonp.UniHunk[T] { var out []gonp.UniHunk[T] for i, uniHunk := range uniHunks { var changed bool for _, e := range uniHunk.GetChanges() { switch e.GetType() { case gonp.SesDelete: changed = true case gonp.SesAdd: changed = true } } if changed { out = append(out, uniHunks[i]) } } return out } var diffCmd = &cobra.Command{ Use: "diff", Short: "Compare the generated files to the existing files", RunE: func(cmd *cobra.Command, args []string) error { defer trace.StartRegion(cmd.Context(), "diff").End() stderr := cmd.ErrOrStderr() dir, name := getConfigPath(stderr, cmd.Flag("file")) opts := &Options{ Env: ParseEnv(cmd), Stderr: stderr, } if err := Diff(cmd.Context(), dir, name, opts); err != nil { os.Exit(1) } return nil }, } ================================================ FILE: internal/cmd/createdb.go ================================================ package cmd import ( "context" "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/sql/sqlpath" ) var createDBCmd = &cobra.Command{ Use: "createdb", Short: "Create an ephemeral database", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { defer trace.StartRegion(cmd.Context(), "createdb").End() stderr := cmd.ErrOrStderr() dir, filename := getConfigPath(stderr, cmd.Flag("file")) querySetName, err := cmd.Flags().GetString("queryset") if err != nil { return err } err = CreateDB(cmd.Context(), dir, filename, querySetName, &Options{ Env: ParseEnv(cmd), Stderr: stderr, }) if err != nil { fmt.Fprintln(stderr, err.Error()) os.Exit(1) } return nil }, } func CreateDB(ctx context.Context, dir, filename, querySetName string, o *Options) error { _, conf, err := o.ReadConfig(dir, filename) if err != nil { return err } // Find the first queryset with a managed database var queryset *config.SQL var count int for _, sql := range conf.SQL { sql := sql if querySetName != "" && sql.Name != querySetName { continue } if sql.Database != nil && sql.Database.Managed { queryset = &sql count += 1 } } if queryset == nil && querySetName != "" { return fmt.Errorf("no queryset found with name %q", querySetName) } if queryset == nil { return fmt.Errorf("no querysets configured to use a managed database") } if count > 1 { return fmt.Errorf("multiple querysets configured to use managed databases") } 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 files, err := sqlpath.Glob(queryset.Schema) if err != nil { return err } for _, schema := range files { contents, err := os.ReadFile(schema) if err != nil { return fmt.Errorf("read file: %w", err) } ddl = append(ddl, migrations.RemoveRollbackStatements(string(contents))) } 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.Println(resp.Uri) return nil } ================================================ FILE: internal/cmd/diff.go ================================================ package cmd import ( "context" "errors" "fmt" "os" "runtime/trace" "sort" "strings" "github.com/cubicdaiya/gonp" ) func Diff(ctx context.Context, dir, name string, opts *Options) error { stderr := opts.Stderr output, err := Generate(ctx, dir, name, opts) if err != nil { return err } defer trace.StartRegion(ctx, "checkfiles").End() var errored bool keys := make([]string, 0, len(output)) for k, _ := range output { kk := k keys = append(keys, kk) } sort.Strings(keys) for _, filename := range keys { source := output[filename] if _, err := os.Stat(filename); errors.Is(err, os.ErrNotExist) { errored = true // stdout message continue } existing, err := os.ReadFile(filename) if err != nil { errored = true fmt.Fprintf(stderr, "%s: %s\n", filename, err) continue } diff := gonp.New(getLines(existing), getLines([]byte(source))) diff.Compose() uniHunks := filterHunks(diff.UnifiedHunks()) if len(uniHunks) > 0 { errored = true fmt.Fprintf(stderr, "--- a%s\n", strings.TrimPrefix(filename, dir)) fmt.Fprintf(stderr, "+++ b%s\n", strings.TrimPrefix(filename, dir)) diff.FprintUniHunks(stderr, uniHunks) } } if errored { return errors.New("diff found") } return nil } ================================================ FILE: internal/cmd/generate.go ================================================ package cmd import ( "context" "encoding/json" "errors" "fmt" "io" "os" "path/filepath" "runtime/trace" "strings" "sync" "google.golang.org/grpc" "google.golang.org/grpc/status" "github.com/sqlc-dev/sqlc/internal/codegen/golang" genjson "github.com/sqlc-dev/sqlc/internal/codegen/json" "github.com/sqlc-dev/sqlc/internal/compiler" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/config/convert" "github.com/sqlc-dev/sqlc/internal/debug" "github.com/sqlc-dev/sqlc/internal/ext" "github.com/sqlc-dev/sqlc/internal/ext/process" "github.com/sqlc-dev/sqlc/internal/ext/wasm" "github.com/sqlc-dev/sqlc/internal/info" "github.com/sqlc-dev/sqlc/internal/multierr" "github.com/sqlc-dev/sqlc/internal/opts" "github.com/sqlc-dev/sqlc/internal/plugin" "github.com/sqlc-dev/sqlc/internal/remote" "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" ) const errMessageNoVersion = `The configuration file must have a version number. Set the version to 1 or 2 at the top of sqlc.json: { "version": "1" ... } ` const errMessageUnknownVersion = `The configuration file has an invalid version number. The supported version can only be "1" or "2". ` const errMessageNoPackages = `No packages are configured` func printFileErr(stderr io.Writer, dir string, fileErr *multierr.FileError) { filename, err := filepath.Rel(dir, fileErr.Filename) if err != nil { filename = fileErr.Filename } fmt.Fprintf(stderr, "%s:%d:%d: %s\n", filename, fileErr.Line, fileErr.Column, fileErr.Err) } func findPlugin(conf config.Config, name string) (*config.Plugin, error) { for _, plug := range conf.Plugins { if plug.Name == name { return &plug, nil } } return nil, fmt.Errorf("plugin not found") } func readConfig(stderr io.Writer, dir, filename string) (string, *config.Config, error) { configPath := "" if filename != "" { configPath = filepath.Join(dir, filename) } else { var yamlMissing, jsonMissing, ymlMissing bool yamlPath := filepath.Join(dir, "sqlc.yaml") ymlPath := filepath.Join(dir, "sqlc.yml") jsonPath := filepath.Join(dir, "sqlc.json") if _, err := os.Stat(yamlPath); os.IsNotExist(err) { yamlMissing = true } if _, err := os.Stat(jsonPath); os.IsNotExist(err) { jsonMissing = true } if _, err := os.Stat(ymlPath); os.IsNotExist(err) { ymlMissing = true } if yamlMissing && ymlMissing && jsonMissing { fmt.Fprintln(stderr, "error parsing configuration files. sqlc.(yaml|yml) or sqlc.json: file does not exist") return "", nil, errors.New("config file missing") } if (!yamlMissing || !ymlMissing) && !jsonMissing { fmt.Fprintln(stderr, "error: both sqlc.json and sqlc.(yaml|yml) files present") return "", nil, errors.New("sqlc.json and sqlc.(yaml|yml) present") } if jsonMissing { if yamlMissing { configPath = ymlPath } else { configPath = yamlPath } } else { configPath = jsonPath } } base := filepath.Base(configPath) file, err := os.Open(configPath) if err != nil { fmt.Fprintf(stderr, "error parsing %s: file does not exist\n", base) return "", nil, err } defer file.Close() conf, err := config.ParseConfig(file) if err != nil { switch err { case config.ErrMissingVersion: fmt.Fprint(stderr, errMessageNoVersion) case config.ErrUnknownVersion: fmt.Fprint(stderr, errMessageUnknownVersion) case config.ErrNoPackages: fmt.Fprint(stderr, errMessageNoPackages) } fmt.Fprintf(stderr, "error parsing %s: %s\n", base, err) return "", nil, err } return configPath, &conf, nil } func Generate(ctx context.Context, dir, filename string, o *Options) (map[string]string, error) { e := o.Env stderr := o.Stderr configPath, conf, err := o.ReadConfig(dir, filename) if err != nil { return nil, err } base := filepath.Base(configPath) if err := config.Validate(conf); err != nil { fmt.Fprintf(stderr, "error validating %s: %s\n", base, err) return nil, err } if err := e.Validate(conf); err != nil { fmt.Fprintf(stderr, "error validating %s: %s\n", base, err) 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) } 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 } 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, OutputPair{ SQL: sql, Gen: config.SQLGen{Go: sql.Gen.Go}, }) } if sql.Gen.JSON != nil { pairs = append(pairs, OutputPair{ SQL: sql, Gen: config.SQLGen{JSON: sql.Gen.JSON}, }) } for i := range sql.Codegen { pairs = append(pairs, OutputPair{ SQL: sql, Plugin: &sql.Codegen[i], }) } } return pairs } 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 } files := map[string]string{} for _, file := range resp.Files { files[file.Name] = string(file.Contents) } 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) } g.output[filename] = source } g.m.Unlock() return nil } func remoteGenerate(ctx context.Context, configPath string, conf *config.Config, dir string, stderr io.Writer) (map[string]string, error) { rpcClient, err := remote.NewClient(conf.Cloud) if err != nil { fmt.Fprintf(stderr, "error creating rpc client: %s\n", err) return nil, err } configBytes, err := os.ReadFile(configPath) if err != nil { fmt.Fprintf(stderr, "error reading config file %s: %s\n", configPath, err) return nil, err } rpcReq := remote.GenerateRequest{ Version: info.Version, Inputs: []*remote.File{{Path: filepath.Base(configPath), Bytes: configBytes}}, } for _, pkg := range conf.SQL { for _, paths := range []config.Paths{pkg.Schema, pkg.Queries} { for i, relFilePath := range paths { paths[i] = filepath.Join(dir, relFilePath) } files, err := sqlpath.Glob(paths) if err != nil { fmt.Fprintf(stderr, "error globbing paths: %s\n", err) return nil, err } for _, filePath := range files { fileBytes, err := os.ReadFile(filePath) if err != nil { fmt.Fprintf(stderr, "error reading file %s: %s\n", filePath, err) return nil, err } fileRelPath, _ := filepath.Rel(dir, filePath) rpcReq.Inputs = append(rpcReq.Inputs, &remote.File{Path: fileRelPath, Bytes: fileBytes}) } } } rpcResp, err := rpcClient.Generate(ctx, &rpcReq) if err != nil { rpcStatus, ok := status.FromError(err) if !ok { return nil, err } fmt.Fprintf(stderr, "rpc error: %s", rpcStatus.Message()) return nil, rpcStatus.Err() } if rpcResp.ExitCode != 0 { fmt.Fprintf(stderr, "%s", rpcResp.Stderr) return nil, errors.New("remote execution returned with non-zero exit code") } output := map[string]string{} for _, file := range rpcResp.Outputs { output[filepath.Join(dir, file.Path)] = string(file.Bytes) } return output, nil } 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, parserOpts) defer func() { if c != nil { c.Close(ctx) } }() if err != nil { fmt.Fprintf(stderr, "error creating compiler: %s\n", err) return nil, true } if err := c.ParseCatalog(sql.Schema); err != nil { fmt.Fprintf(stderr, "# package %s\n", name) if parserErr, ok := err.(*multierr.Error); ok { for _, fileErr := range parserErr.Errs() { printFileErr(stderr, dir, fileErr) } } else { fmt.Fprintf(stderr, "error parsing schema: %s\n", err) } return nil, true } if parserOpts.Debug.DumpCatalog { debug.Dump(c.Catalog()) } if err := c.ParseQueries(sql.Queries, parserOpts); err != nil { fmt.Fprintf(stderr, "# package %s\n", name) if parserErr, ok := err.(*multierr.Error); ok { for _, fileErr := range parserErr.Errs() { printFileErr(stderr, dir, fileErr) } } else { fmt.Fprintf(stderr, "error parsing queries: %s\n", err) } return nil, true } return c.Result(), false } 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 grpc.ClientConnInterface var out string switch { case sql.Plugin != nil: out = sql.Plugin.Out plug, err := findPlugin(combo.Global, sql.Plugin.Plugin) if err != nil { return "", nil, fmt.Errorf("plugin not found: %s", err) } switch { case plug.Process != nil: handler = &process.Runner{ Cmd: plug.Process.Cmd, Env: plug.Env, Format: plug.Process.Format, } case plug.WASM != nil: handler = &wasm.Runner{ URL: plug.WASM.URL, SHA256: plug.WASM.SHA256, Env: plug.Env, } default: return "", nil, fmt.Errorf("unsupported plugin type") } opts, err := convert.YAMLtoJSON(sql.Plugin.Options) if err != nil { 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) opts, err := json.Marshal(sql.Gen.Go) if err != nil { return "", nil, fmt.Errorf("opts marshal failed: %w", err) } 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) opts, err := json.Marshal(sql.Gen.JSON) if err != nil { return "", nil, fmt.Errorf("opts marshal failed: %w", err) } req.PluginOptions = opts default: return "", nil, fmt.Errorf("missing language backend") } client := plugin.NewCodegenServiceClient(handler) resp, err := client.Generate(ctx, req) return out, resp, err } ================================================ FILE: internal/cmd/options.go ================================================ package cmd import ( "io" "github.com/sqlc-dev/sqlc/internal/config" ) type Options struct { Env Env Stderr io.Writer // TODO: Move these to a command-specific struct Tags []string Against string // Testing only MutateConfig func(*config.Config) } func (o *Options) ReadConfig(dir, filename string) (string, *config.Config, error) { path, conf, err := readConfig(o.Stderr, dir, filename) if err != nil { return path, conf, err } if o.MutateConfig != nil { o.MutateConfig(conf) } return path, conf, nil } ================================================ FILE: internal/cmd/parse.go ================================================ package cmd import ( "encoding/json" "fmt" "io" "os" "github.com/spf13/cobra" "github.com/sqlc-dev/sqlc/internal/engine/clickhouse" "github.com/sqlc-dev/sqlc/internal/engine/dolphin" "github.com/sqlc-dev/sqlc/internal/engine/postgresql" "github.com/sqlc-dev/sqlc/internal/engine/sqlite" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) var parseCmd = &cobra.Command{ Use: "parse [file]", Short: "Parse SQL and output the AST as JSON", Long: `Parse SQL from a file or stdin and output the abstract syntax tree as JSON. Examples: # Parse a SQL file with PostgreSQL dialect sqlc parse --dialect postgresql schema.sql # Parse from stdin with MySQL dialect echo "SELECT * FROM users" | sqlc parse --dialect mysql # Parse SQLite SQL sqlc parse --dialect sqlite queries.sql # Parse ClickHouse SQL sqlc parse --dialect clickhouse queries.sql`, Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { dialect, err := cmd.Flags().GetString("dialect") if err != nil { return err } if dialect == "" { return fmt.Errorf("--dialect flag is required (postgresql, mysql, sqlite, or clickhouse)") } // Determine input source var input io.Reader if len(args) == 1 { file, err := os.Open(args[0]) if err != nil { return fmt.Errorf("failed to open file: %w", err) } defer file.Close() input = file } else { // Check if stdin has data stat, err := os.Stdin.Stat() if err != nil { return fmt.Errorf("failed to stat stdin: %w", err) } if (stat.Mode() & os.ModeCharDevice) != 0 { return fmt.Errorf("no input provided. Specify a file path or pipe SQL via stdin") } input = cmd.InOrStdin() } // Parse SQL based on dialect var stmts []ast.Statement switch dialect { case "postgresql", "postgres", "pg": parser := postgresql.NewParser() stmts, err = parser.Parse(input) case "mysql": parser := dolphin.NewParser() stmts, err = parser.Parse(input) case "sqlite": parser := sqlite.NewParser() stmts, err = parser.Parse(input) case "clickhouse": parser := clickhouse.NewParser() stmts, err = parser.Parse(input) default: return fmt.Errorf("unsupported dialect: %s (use postgresql, mysql, sqlite, or clickhouse)", dialect) } if err != nil { return fmt.Errorf("parse error: %w", err) } // Output AST as JSON stdout := cmd.OutOrStdout() encoder := json.NewEncoder(stdout) encoder.SetIndent("", " ") for _, stmt := range stmts { if err := encoder.Encode(stmt.Raw); err != nil { return fmt.Errorf("failed to encode AST: %w", err) } } return nil }, } ================================================ FILE: internal/cmd/process.go ================================================ 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 } ================================================ FILE: internal/cmd/push.go ================================================ 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) } } ================================================ FILE: internal/cmd/shim.go ================================================ package cmd import ( "github.com/sqlc-dev/sqlc/internal/compiler" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/config/convert" "github.com/sqlc-dev/sqlc/internal/info" "github.com/sqlc-dev/sqlc/internal/plugin" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) func pluginSettings(r *compiler.Result, cs config.CombinedSettings) *plugin.Settings { return &plugin.Settings{ Version: cs.Global.Version, Engine: string(cs.Package.Engine), Schema: []string(cs.Package.Schema), Queries: []string(cs.Package.Queries), Codegen: pluginCodegen(cs, cs.Codegen), } } func pluginCodegen(cs config.CombinedSettings, s config.Codegen) *plugin.Codegen { opts, err := convert.YAMLtoJSON(s.Options) if err != nil { panic(err) } cg := &plugin.Codegen{ Out: s.Out, Plugin: s.Plugin, Options: opts, } for _, p := range cs.Global.Plugins { if p.Name == s.Plugin { cg.Env = p.Env cg.Process = pluginProcess(p) cg.Wasm = pluginWASM(p) return cg } } return cg } func pluginProcess(p config.Plugin) *plugin.Codegen_Process { if p.Process != nil { return &plugin.Codegen_Process{ Cmd: p.Process.Cmd, } } return nil } func pluginWASM(p config.Plugin) *plugin.Codegen_WASM { if p.WASM != nil { return &plugin.Codegen_WASM{ Url: p.WASM.URL, Sha256: p.WASM.SHA256, } } return nil } func pluginCatalog(c *catalog.Catalog) *plugin.Catalog { var schemas []*plugin.Schema for _, s := range c.Schemas { var enums []*plugin.Enum var cts []*plugin.CompositeType for _, typ := range s.Types { switch typ := typ.(type) { case *catalog.Enum: enums = append(enums, &plugin.Enum{ Name: typ.Name, Comment: typ.Comment, Vals: typ.Vals, }) case *catalog.CompositeType: cts = append(cts, &plugin.CompositeType{ Name: typ.Name, Comment: typ.Comment, }) } } var tables []*plugin.Table for _, t := range s.Tables { var columns []*plugin.Column for _, c := range t.Columns { l := -1 if c.Length != nil { l = *c.Length } columns = append(columns, &plugin.Column{ Name: c.Name, Type: &plugin.Identifier{ Catalog: c.Type.Catalog, Schema: c.Type.Schema, Name: c.Type.Name, }, Comment: c.Comment, NotNull: c.IsNotNull, Unsigned: c.IsUnsigned, IsArray: c.IsArray, ArrayDims: int32(c.ArrayDims), Length: int32(l), Table: &plugin.Identifier{ Catalog: t.Rel.Catalog, Schema: t.Rel.Schema, Name: t.Rel.Name, }, }) } tables = append(tables, &plugin.Table{ Rel: &plugin.Identifier{ Catalog: t.Rel.Catalog, Schema: t.Rel.Schema, Name: t.Rel.Name, }, Columns: columns, Comment: t.Comment, }) } schemas = append(schemas, &plugin.Schema{ Comment: s.Comment, Name: s.Name, Tables: tables, Enums: enums, CompositeTypes: cts, }) } return &plugin.Catalog{ Name: c.Name, DefaultSchema: c.DefaultSchema, Comment: c.Comment, Schemas: schemas, } } func pluginQueries(r *compiler.Result) []*plugin.Query { var out []*plugin.Query for _, q := range r.Queries { var params []*plugin.Parameter var columns []*plugin.Column for _, c := range q.Columns { columns = append(columns, pluginQueryColumn(c)) } for _, p := range q.Params { params = append(params, pluginQueryParam(p)) } var iit *plugin.Identifier if q.InsertIntoTable != nil { iit = &plugin.Identifier{ Catalog: q.InsertIntoTable.Catalog, Schema: q.InsertIntoTable.Schema, Name: q.InsertIntoTable.Name, } } out = append(out, &plugin.Query{ Name: q.Metadata.Name, Cmd: q.Metadata.Cmd, Text: q.SQL, Comments: q.Metadata.Comments, Columns: columns, Params: params, Filename: q.Metadata.Filename, InsertIntoTable: iit, }) } return out } func pluginQueryColumn(c *compiler.Column) *plugin.Column { l := -1 if c.Length != nil { l = *c.Length } out := &plugin.Column{ Name: c.Name, OriginalName: c.OriginalName, Comment: c.Comment, NotNull: c.NotNull, Unsigned: c.Unsigned, IsArray: c.IsArray, ArrayDims: int32(c.ArrayDims), Length: int32(l), IsNamedParam: c.IsNamedParam, IsFuncCall: c.IsFuncCall, IsSqlcSlice: c.IsSqlcSlice, } if c.Type != nil { out.Type = &plugin.Identifier{ Catalog: c.Type.Catalog, Schema: c.Type.Schema, Name: c.Type.Name, } } else { out.Type = &plugin.Identifier{ Name: c.DataType, } } if c.Table != nil { out.Table = &plugin.Identifier{ Catalog: c.Table.Catalog, Schema: c.Table.Schema, Name: c.Table.Name, } } if c.EmbedTable != nil { out.EmbedTable = &plugin.Identifier{ Catalog: c.EmbedTable.Catalog, Schema: c.EmbedTable.Schema, Name: c.EmbedTable.Name, } } return out } func pluginQueryParam(p compiler.Parameter) *plugin.Parameter { return &plugin.Parameter{ Number: int32(p.Number), Column: pluginQueryColumn(p.Column), } } func codeGenRequest(r *compiler.Result, settings config.CombinedSettings) *plugin.GenerateRequest { return &plugin.GenerateRequest{ Settings: pluginSettings(r, settings), Catalog: pluginCatalog(r.Catalog), Queries: pluginQueries(r), SqlcVersion: info.Version, } } ================================================ FILE: internal/cmd/verify.go ================================================ 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 } ================================================ FILE: internal/cmd/vet.go ================================================ package cmd import ( "context" "database/sql" "encoding/json" "errors" "fmt" "github.com/sqlc-dev/sqlc/internal/constants" "io" "log" "os" "path/filepath" "runtime/trace" "slices" "strings" "sync" "time" _ "github.com/go-sql-driver/mysql" "github.com/google/cel-go/cel" "github.com/google/cel-go/ext" "github.com/jackc/pgx/v5" "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" "github.com/sqlc-dev/sqlc/internal/shfmt" "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" "github.com/sqlc-dev/sqlc/internal/vet" ) var ErrFailedChecks = errors.New("failed checks") var pjson = protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} func NewCmdVet() *cobra.Command { return &cobra.Command{ Use: "vet", Short: "Vet examines queries", RunE: func(cmd *cobra.Command, args []string) error { defer trace.StartRegion(cmd.Context(), "vet").End() stderr := cmd.ErrOrStderr() opts := &Options{ Env: ParseEnv(cmd), Stderr: stderr, } dir, name := getConfigPath(stderr, cmd.Flag("file")) if err := Vet(cmd.Context(), dir, name, opts); err != nil { if !errors.Is(err, ErrFailedChecks) { fmt.Fprintf(stderr, "%s\n", err) } os.Exit(1) } return nil }, } } func Vet(ctx context.Context, dir, filename string, opts *Options) error { e := opts.Env stderr := opts.Stderr configPath, conf, err := readConfig(stderr, dir, filename) if err != nil { return err } 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 } env, err := cel.NewEnv( cel.StdLib(), ext.Strings(ext.StringsVersion(1)), cel.Types( &vet.Config{}, &vet.Query{}, &vet.PostgreSQL{}, &vet.MySQL{}, ), cel.Variable("query", cel.ObjectType("vet.Query"), ), cel.Variable("config", cel.ObjectType("vet.Config"), ), cel.Variable("postgresql", cel.ObjectType("vet.PostgreSQL"), ), cel.Variable("mysql", cel.ObjectType("vet.MySQL"), ), ) if err != nil { return fmt.Errorf("new CEL env error: %s", err) } rules := map[string]rule{ constants.QueryRuleDbPrepare: {NeedsPrepare: true}, } for _, c := range conf.Rules { if c.Name == "" { return fmt.Errorf("rules require a name") } if _, found := rules[c.Name]; found { return fmt.Errorf("type-check error: a rule with the name '%s' already exists", c.Name) } if c.Rule == "" { return fmt.Errorf("type-check error: %s is empty", c.Name) } ast, issues := env.Compile(c.Rule) if issues != nil && issues.Err() != nil { return fmt.Errorf("type-check error: %s %s", c.Name, issues.Err()) } prg, err := env.Program(ast) if err != nil { return fmt.Errorf("program construction error: %s %s", c.Name, err) } rule := rule{Program: &prg, Message: c.Msg} // TODO There's probably a nicer way to do this from the ast // https://pkg.go.dev/github.com/google/cel-go/common/ast#AllMatcher if strings.Contains(c.Rule, "postgresql.explain") || strings.Contains(c.Rule, "mysql.explain") { rule.NeedsExplain = true } rules[c.Name] = rule } c := checker{ Rules: rules, Conf: conf, Dir: dir, Env: env, Stderr: stderr, OnlyManagedDB: e.Debug.OnlyManagedDatabases, Replacer: shfmt.NewReplacer(nil), } errored := false for _, sql := range conf.SQL { if err := c.checkSQL(ctx, sql); err != nil { if !errors.Is(err, ErrFailedChecks) { fmt.Fprintf(stderr, "%s\n", err) } errored = true } } if errored { return ErrFailedChecks } return nil } type preparer interface { Prepare(context.Context, string, string) error } type pgxConn struct { c *pgx.Conn } func (p *pgxConn) Prepare(ctx context.Context, name, query string) error { _, err := p.c.Prepare(ctx, name, query) return err } // Return a default value for a PostgreSQL column based on its type. Returns nil // if the type is unknown. func pgDefaultValue(col *plugin.Column) any { if col == nil { return nil } if col.Type == nil { return nil } typname := strings.TrimPrefix(col.Type.Name, "pg_catalog.") switch typname { case "any", "void": if col.IsArray { return []any{} } else { return nil } case "anyarray": return []any{} case "bool", "boolean": if col.IsArray { return []bool{} } else { return false } case "double", "double precision", "real": if col.IsArray { return []float32{} } else { return 0.1 } case "json", "jsonb": if col.IsArray { return []string{} } else { return "{}" } case "citext", "string", "text", "varchar": if col.IsArray { return []string{} } else { return "" } case "bigint", "bigserial", "integer", "int", "int2", "int4", "int8", "serial": if col.IsArray { return []int{} } else { return 1 } case "date", "time", "timestamp", "timestamptz": if col.IsArray { return []time.Time{} } else { return time.Time{} } case "uuid": if col.IsArray { return []string{} } else { return "00000000-0000-0000-0000-000000000000" } case "numeric", "decimal": if col.IsArray { return []string{} } else { return "0.1" } case "inet": if col.IsArray { return []string{} } else { return "192.168.0.1/24" } case "cidr": if col.IsArray { return []string{} } else { return "192.168.1/24" } default: return nil } } // Return a default value for a MySQL column based on its type. Returns nil // if the type is unknown. func mysqlDefaultValue(col *plugin.Column) any { if col == nil { return nil } if col.Type == nil { return nil } switch col.Type.Name { case "any": return nil case "bool": return false case "int", "bigint", "mediumint", "smallint", "tinyint", "bit": return 1 case "decimal": // "numeric", "dec", "fixed" // No perfect choice here to avoid "Impossible WHERE" but I think // 0.1 is decent. It works for all cases where `scale` > 0 which // should be the majority. For more information refer to // https://dev.mysql.com/doc/refman/8.1/en/fixed-point-types.html. return 0.1 case "float", "double": return 0.1 case "date": return "0000-00-00" case "datetime", "timestamp": return "0000-00-00 00:00:00" case "time": return "00:00:00" case "year": return "0000" case "char", "varchar", "binary", "varbinary", "tinyblob", "blob", "mediumblob", "longblob", "tinytext", "text", "mediumtext", "longtext": return "" case "json": return "{}" default: return nil } } func (p *pgxConn) Explain(ctx context.Context, query string, args ...*plugin.Parameter) (*vetEngineOutput, error) { eQuery := "EXPLAIN (ANALYZE false, VERBOSE, COSTS, SETTINGS, BUFFERS, FORMAT JSON) " + query eArgs := make([]any, len(args)) for i, a := range args { eArgs[i] = pgDefaultValue(a.Column) } row := p.c.QueryRow(ctx, eQuery, eArgs...) var result []json.RawMessage if err := row.Scan(&result); err != nil { return nil, err } if debug.Debug.DumpExplain { fmt.Println(eQuery, "with args", eArgs) fmt.Println(string(result[0])) } var explain vet.PostgreSQLExplain if err := pjson.Unmarshal(result[0], &explain); err != nil { return nil, err } return &vetEngineOutput{PostgreSQL: &vet.PostgreSQL{Explain: &explain}}, nil } type dbPreparer struct { db *sql.DB } func (p *dbPreparer) Prepare(ctx context.Context, name, query string) error { s, err := p.db.PrepareContext(ctx, query) if s != nil { s.Close() } return err } type explainer interface { Explain(context.Context, string, ...*plugin.Parameter) (*vetEngineOutput, error) } type mysqlExplainer struct { *sql.DB } func (me *mysqlExplainer) Explain(ctx context.Context, query string, args ...*plugin.Parameter) (*vetEngineOutput, error) { eQuery := "EXPLAIN FORMAT=JSON " + query eArgs := make([]any, len(args)) for i, a := range args { eArgs[i] = mysqlDefaultValue(a.Column) } row := me.QueryRowContext(ctx, eQuery, eArgs...) var result json.RawMessage if err := row.Scan(&result); err != nil { return nil, err } if debug.Debug.DumpExplain { fmt.Println(eQuery, "with args", eArgs) fmt.Println(string(result)) } var explain vet.MySQLExplain if err := pjson.Unmarshal(result, &explain); err != nil { return nil, err } if explain.QueryBlock.Message != "" { return nil, fmt.Errorf("mysql explain: %s", explain.QueryBlock.Message) } return &vetEngineOutput{MySQL: &vet.MySQL{Explain: &explain}}, nil } type rule struct { Program *cel.Program Message string NeedsPrepare bool NeedsExplain bool } type checker struct { Rules map[string]rule Conf *config.Config Dir string Env *cel.Env Stderr io.Writer OnlyManagedDB bool Client dbmanager.Client clientOnce sync.Once Replacer *shfmt.Replacer } // isInMemorySQLite checks if a SQLite URI refers to an in-memory database func isInMemorySQLite(uri string) bool { if uri == ":memory:" || uri == "" { return true } // Check for file URI with mode=memory parameter // e.g., "file:test?mode=memory&cache=shared" if strings.Contains(uri, "mode=memory") { return true } return false } func (c *checker) fetchDatabaseUri(ctx context.Context, s config.SQL) (string, func() error, error) { cleanup := func() error { return nil } if s.Database == nil { panic("fetch database URI called with nil database") } if !s.Database.Managed { uri, err := c.DSN(s.Database.URI) return uri, cleanup, err } // Initialize the client exactly once, even if called concurrently c.clientOnce.Do(func() { c.Client = dbmanager.NewClient(c.Conf.Servers) }) var ddl []string files, err := sqlpath.Glob(s.Schema) if err != nil { return "", cleanup, err } for _, schema := range files { contents, err := os.ReadFile(schema) if err != nil { return "", cleanup, fmt.Errorf("read file: %w", err) } ddl = append(ddl, migrations.RemoveRollbackStatements(string(contents))) } 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) } 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 uri, cleanup, nil } func (c *checker) DSN(dsn string) (string, error) { return c.Replacer.Replace(dsn), nil } func (c *checker) checkSQL(ctx context.Context, s config.SQL) error { // TODO: Create a separate function for this logic so we can combo := config.Combine(*c.Conf, s) // TODO: This feels like a hack that will bite us later joined := make([]string, 0, len(s.Schema)) for _, s := range s.Schema { joined = append(joined, filepath.Join(c.Dir, s)) } s.Schema = joined joined = make([]string, 0, len(s.Queries)) for _, q := range s.Queries { joined = append(joined, filepath.Join(c.Dir, q)) } s.Queries = joined var name string parseOpts := opts.Parser{ Debug: debug.Debug, } result, failed := parse(ctx, name, c.Dir, s, combo, parseOpts, c.Stderr) if failed { return ErrFailedChecks } var prep preparer var expl explainer if s.Database != nil { // TODO only set up a database connection if a rule evaluation requires it if s.Database.URI != "" && c.OnlyManagedDB { return fmt.Errorf("database: connections disabled via SQLCDEBUG=databases=managed") } dburl, cleanup, err := c.fetchDatabaseUri(ctx, s) if err != nil { return err } defer func() { if err := cleanup(); err != nil { fmt.Fprintf(c.Stderr, "error cleaning up: %s\n", err) } }() switch s.Engine { case config.EnginePostgreSQL: conn, err := pgx.Connect(ctx, dburl) if err != nil { return fmt.Errorf("database: connection error: %s", err) } if err := conn.Ping(ctx); err != nil { return fmt.Errorf("database: connection error: %s", err) } defer conn.Close(ctx) pConn := &pgxConn{conn} prep = pConn expl = pConn case config.EngineMySQL: db, err := sql.Open("mysql", dburl) if err != nil { return fmt.Errorf("database: connection error: %s", err) } if err := db.PingContext(ctx); err != nil { return fmt.Errorf("database: connection error: %s", err) } defer db.Close() prep = &dbPreparer{db} expl = &mysqlExplainer{db} case config.EngineSQLite: db, err := sql.Open("sqlite3", dburl) if err != nil { return fmt.Errorf("database: connection error: %s", err) } if err := db.PingContext(ctx); err != nil { return fmt.Errorf("database: connection error: %s", err) } defer db.Close() // For in-memory SQLite databases, apply migrations if isInMemorySQLite(dburl) { files, err := sqlpath.Glob(s.Schema) if err != nil { return fmt.Errorf("schema: %w", err) } for _, schema := range files { contents, err := os.ReadFile(schema) if err != nil { return fmt.Errorf("read schema file: %w", err) } ddl := migrations.RemoveRollbackStatements(string(contents)) if _, err := db.ExecContext(ctx, ddl); err != nil { return fmt.Errorf("apply schema %s: %w", schema, err) } } } prep = &dbPreparer{db} // SQLite really doesn't want us to depend on the output of EXPLAIN // QUERY PLAN: https://www.sqlite.org/eqp.html expl = nil default: return fmt.Errorf("unsupported database uri: %s", s.Engine) } } errored := false req := codeGenRequest(result, combo) cfg := vetConfig(req) for i, query := range req.Queries { 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 } } } evalMap := map[string]any{ "query": vetQuery(query), "config": cfg, } for _, name := range s.Rules { if _, skip := md.RuleSkiplist[name]; skip { if debug.Active { log.Printf("Skipping vet rule %q for query: %s\n", name, query.Name) } } else { 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 } 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 } } // 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 } 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) } 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 } } } } if errored { return ErrFailedChecks } return nil } func vetConfig(req *plugin.GenerateRequest) *vet.Config { return &vet.Config{ Version: req.Settings.Version, Engine: req.Settings.Engine, Schema: req.Settings.Schema, Queries: req.Settings.Queries, } } func vetQuery(q *plugin.Query) *vet.Query { var params []*vet.Parameter for _, p := range q.Params { params = append(params, &vet.Parameter{ Number: p.Number, }) } return &vet.Query{ Sql: q.Text, Name: q.Name, Cmd: strings.TrimPrefix(q.Cmd, ":"), Params: params, } } type vetEngineOutput struct { PostgreSQL *vet.PostgreSQL MySQL *vet.MySQL } ================================================ FILE: internal/cmd/vet_sqlite.go ================================================ package cmd import ( _ "github.com/ncruces/go-sqlite3/driver" _ "github.com/ncruces/go-sqlite3/embed" ) ================================================ FILE: internal/codegen/golang/driver.go ================================================ package golang import "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" func parseDriver(sqlPackage string) opts.SQLDriver { switch sqlPackage { case opts.SQLPackagePGXV4: return opts.SQLDriverPGXV4 case opts.SQLPackagePGXV5: return opts.SQLDriverPGXV5 default: return opts.SQLDriverLibPQ } } ================================================ FILE: internal/codegen/golang/enum.go ================================================ package golang import ( "strings" "unicode" ) type Constant struct { Name string Type string Value string } type Enum struct { Name string Comment string Constants []Constant NameTags map[string]string ValidTags map[string]string } func (e Enum) NameTag() string { return TagsToString(e.NameTags) } func (e Enum) ValidTag() string { return TagsToString(e.ValidTags) } func enumReplacer(r rune) rune { if strings.ContainsRune("-/:_", r) { return '_' } else if (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') || (r >= '0' && r <= '9') { return r } else { return -1 } } // EnumReplace removes all non ident symbols (all but letters, numbers and // underscore) and returns valid ident name for provided name. func EnumReplace(value string) string { return strings.Map(enumReplacer, value) } // EnumValueName removes all non ident symbols (all but letters, numbers and // underscore) and converts snake case ident to camel case. func EnumValueName(value string) string { parts := strings.Split(EnumReplace(value), "_") for i, part := range parts { parts[i] = titleFirst(part) } return strings.Join(parts, "") } func titleFirst(s string) string { r := []rune(s) r[0] = unicode.ToUpper(r[0]) return string(r) } ================================================ FILE: internal/codegen/golang/field.go ================================================ package golang import ( "fmt" "regexp" "sort" "strings" "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" "github.com/sqlc-dev/sqlc/internal/plugin" ) type Field struct { Name string // CamelCased name for Go DBName string // Name as used in the DB Type string Tags map[string]string Comment string Column *plugin.Column // EmbedFields contains the embedded fields that require scanning. EmbedFields []Field } func (gf Field) Tag() string { return TagsToString(gf.Tags) } func (gf Field) HasSqlcSlice() bool { return gf.Column.IsSqlcSlice } func TagsToString(tags map[string]string) string { if len(tags) == 0 { return "" } tagParts := make([]string, 0, len(tags)) for key, val := range tags { tagParts = append(tagParts, fmt.Sprintf("%s:%q", key, val)) } sort.Strings(tagParts) return strings.Join(tagParts, " ") } func JSONTagName(name string, options *opts.Options) string { style := options.JsonTagsCaseStyle idUppercase := options.JsonTagsIdUppercase if style == "" || style == "none" { return name } else { return SetJSONCaseStyle(name, style, idUppercase) } } func SetCaseStyle(name string, style string) string { switch style { case "camel": return toCamelCase(name) case "pascal": return toPascalCase(name) case "snake": return toSnakeCase(name) default: panic(fmt.Sprintf("unsupported JSON tags case style: '%s'", style)) } } func SetJSONCaseStyle(name string, style string, idUppercase bool) string { switch style { case "camel": return toJsonCamelCase(name, idUppercase) case "pascal": return toPascalCase(name) case "snake": return toSnakeCase(name) default: panic(fmt.Sprintf("unsupported JSON tags case style: '%s'", style)) } } var camelPattern = regexp.MustCompile("[^A-Z][A-Z]+") func toSnakeCase(s string) string { if !strings.ContainsRune(s, '_') { s = camelPattern.ReplaceAllStringFunc(s, func(x string) string { return x[:1] + "_" + x[1:] }) } return strings.ToLower(s) } func toCamelCase(s string) string { return toCamelInitCase(s, false) } func toPascalCase(s string) string { return toCamelInitCase(s, true) } func toCamelInitCase(name string, initUpper bool) string { out := "" for i, p := range strings.Split(name, "_") { if !initUpper && i == 0 { out += p continue } if p == "id" { out += "ID" } else { out += strings.Title(p) } } return out } func toJsonCamelCase(name string, idUppercase bool) string { out := "" idStr := "Id" if idUppercase { idStr = "ID" } for i, p := range strings.Split(name, "_") { if i == 0 { out += p continue } if p == "id" { out += idStr } else { out += strings.Title(p) } } return out } func toLowerCase(str string) string { if str == "" { return "" } return strings.ToLower(str[:1]) + str[1:] } ================================================ FILE: internal/codegen/golang/gen.go ================================================ package golang import ( "bufio" "bytes" "context" "errors" "fmt" "go/format" "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" ) type tmplCtx struct { Q string Package string SQLDriver opts.SQLDriver Enums []Enum Structs []Struct GoQueries []Query SqlcVersion string // TODO: Race conditions SourceName string EmitJSONTags bool JsonTagsIDUppercase bool EmitDBTags bool EmitPreparedQueries bool EmitInterface bool EmitEmptySlices bool EmitMethodsWithDBArgument bool EmitEnumValidMethod bool EmitAllEnumValues bool UsesCopyFrom bool UsesBatch bool OmitSqlcVersion bool BuildTags string WrapErrors bool } func (t *tmplCtx) OutputQuery(sourceName string) bool { return t.SourceName == sourceName } func (t *tmplCtx) codegenDbarg() string { if t.EmitMethodsWithDBArgument { return "db DBTX, " } return "" } // Called as a global method since subtemplate queryCodeStdExec does not have // access to the toplevel tmplCtx func (t *tmplCtx) codegenEmitPreparedQueries() bool { return t.EmitPreparedQueries } func (t *tmplCtx) codegenQueryMethod(q Query) string { db := "q.db" if t.EmitMethodsWithDBArgument { db = "db" } switch q.Cmd { case ":one": if t.EmitPreparedQueries { return "q.queryRow" } return db + ".QueryRowContext" case ":many": if t.EmitPreparedQueries { return "q.query" } return db + ".QueryContext" default: if t.EmitPreparedQueries { return "q.exec" } return db + ".ExecContext" } } func (t *tmplCtx) codegenQueryRetval(q Query) (string, error) { switch q.Cmd { case ":one": return "row :=", nil case ":many": return "rows, err :=", nil case ":exec": return "_, err :=", nil 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.GenerateRequest) (*plugin.GenerateResponse, error) { options, err := opts.Parse(req) if err != nil { return nil, err } if err := opts.ValidateOpts(options); err != nil { return nil, err } enums := buildEnums(req, options) structs := buildStructs(req, options) queries, err := buildQueries(req, options, structs) if err != nil { return nil, err } if options.OmitUnusedStructs { enums, structs = filterUnusedStructs(enums, structs, queries) } if err := validate(options, enums, structs, queries); err != nil { return nil, err } return generate(req, options, enums, structs, queries) } 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{ Options: options, Queries: queries, Enums: enums, Structs: structs, } tctx := tmplCtx{ EmitInterface: options.EmitInterface, EmitJSONTags: options.EmitJsonTags, JsonTagsIDUppercase: options.JsonTagsIdUppercase, EmitDBTags: options.EmitDbTags, EmitPreparedQueries: options.EmitPreparedQueries, EmitEmptySlices: options.EmitEmptySlices, EmitMethodsWithDBArgument: options.EmitMethodsWithDbArgument, EmitEnumValidMethod: options.EmitEnumValidMethod, EmitAllEnumValues: options.EmitAllEnumValues, UsesCopyFrom: usesCopyFrom(queries), UsesBatch: usesBatch(queries), SQLDriver: parseDriver(options.SqlPackage), Q: "`", Package: options.Package, Enums: enums, Structs: structs, SqlcVersion: req.SqlcVersion, BuildTags: options.BuildTags, OmitSqlcVersion: options.OmitSqlcVersion, WrapErrors: options.WrapErrors, } 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 == opts.SQLDriverGoSQLDriverMySQL { if err := checkNoTimesForMySQLCopyFrom(queries); err != nil { return nil, err } tctx.SQLDriver = opts.SQLDriverGoSQLDriverMySQL } if tctx.UsesBatch && !tctx.SQLDriver.IsPGX() { return nil, errors.New(":batch* commands are only supported by pgx") } funcMap := template.FuncMap{ "lowerTitle": sdk.LowerTitle, "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 // (as that is language independent) "dbarg": tctx.codegenDbarg, "emitPreparedQueries": tctx.codegenEmitPreparedQueries, "queryMethod": tctx.codegenQueryMethod, "queryRetval": tctx.codegenQueryRetval, } tmpl := template.Must( template.New("table"). Funcs(funcMap). ParseFS( templates, "templates/*.tmpl", "templates/*/*.tmpl", ), ) output := map[string]string{} execute := func(name, templateName string) error { imports := i.Imports(name) replacedQueries := replaceConflictedArg(imports, queries) var b bytes.Buffer w := bufio.NewWriter(&b) tctx.SourceName = name tctx.GoQueries = replacedQueries err := tmpl.ExecuteTemplate(w, templateName, &tctx) w.Flush() if err != nil { return err } code, err := format.Source(b.Bytes()) if err != nil { fmt.Println(b.String()) return fmt.Errorf("source error: %w", err) } if templateName == "queryFile" && options.OutputFilesSuffix != "" { name += options.OutputFilesSuffix } if !strings.HasSuffix(name, ".go") { name += ".go" } output[name] = string(code) return nil } dbFileName := "db.go" if options.OutputDbFileName != "" { dbFileName = options.OutputDbFileName } modelsFileName := "models.go" if options.OutputModelsFileName != "" { modelsFileName = options.OutputModelsFileName } querierFileName := "querier.go" if options.OutputQuerierFileName != "" { querierFileName = options.OutputQuerierFileName } copyfromFileName := "copyfrom.go" if options.OutputCopyfromFileName != "" { copyfromFileName = options.OutputCopyfromFileName } batchFileName := "batch.go" if options.OutputBatchFileName != "" { batchFileName = options.OutputBatchFileName } if err := execute(dbFileName, "dbFile"); err != nil { return nil, err } if err := execute(modelsFileName, "modelsFile"); err != nil { return nil, err } if options.EmitInterface { if err := execute(querierFileName, "interfaceFile"); err != nil { return nil, err } } if tctx.UsesCopyFrom { if err := execute(copyfromFileName, "copyfromFile"); err != nil { return nil, err } } if tctx.UsesBatch { if err := execute(batchFileName, "batchFile"); err != nil { return nil, err } } files := map[string]struct{}{} for _, gq := range queries { files[gq.SourceName] = struct{}{} } for source := range files { if err := execute(source, "queryFile"); err != nil { return nil, err } } resp := plugin.GenerateResponse{} for filename, code := range output { resp.Files = append(resp.Files, &plugin.File{ Name: filename, Contents: []byte(code), }) } return &resp, nil } func usesCopyFrom(queries []Query) bool { for _, q := range queries { if q.Cmd == metadata.CmdCopyFrom { return true } } return false } func usesBatch(queries []Query) bool { for _, q := range queries { for _, cmd := range []string{metadata.CmdBatchExec, metadata.CmdBatchMany, metadata.CmdBatchOne} { if q.Cmd == cmd { return true } } } return false } func checkNoTimesForMySQLCopyFrom(queries []Query) error { for _, q := range queries { if q.Cmd != metadata.CmdCopyFrom { continue } for _, f := range q.Arg.CopyFromMySQLFields() { if f.Type == "time.Time" { return fmt.Errorf("values with a timezone are not yet supported") } } } return nil } func filterUnusedStructs(enums []Enum, structs []Struct, queries []Query) ([]Enum, []Struct) { keepTypes := make(map[string]struct{}) for _, query := range queries { if !query.Arg.isEmpty() { keepTypes[query.Arg.Type()] = struct{}{} if query.Arg.IsStruct() { for _, field := range query.Arg.Struct.Fields { keepTypes[field.Type] = struct{}{} } } } if query.hasRetType() { keepTypes[query.Ret.Type()] = struct{}{} if query.Ret.IsStruct() { for _, field := range query.Ret.Struct.Fields { keepTypes[strings.TrimPrefix(field.Type, "[]")] = struct{}{} for _, embedField := range field.EmbedFields { keepTypes[embedField.Type] = struct{}{} } } } } } keepEnums := make([]Enum, 0, len(enums)) for _, enum := range enums { _, keep := keepTypes[enum.Name] _, keepNull := keepTypes["Null"+enum.Name] if keep || keepNull { keepEnums = append(keepEnums, enum) } } keepStructs := make([]Struct, 0, len(structs)) for _, st := range structs { if _, ok := keepTypes[st.Name]; ok { keepStructs = append(keepStructs, st) } } return keepEnums, keepStructs } ================================================ FILE: internal/codegen/golang/go_type.go ================================================ 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.GenerateRequest, options *opts.Options, col *plugin.Column) { for _, override := range options.Overrides { oride := override.ShimOverride if oride.GoType.StructTags == nil { continue } 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 } cname := col.Name if col.OriginalName != "" { cname = col.OriginalName } if !sdk.MatchString(oride.ColumnName, cname) { // Different column. continue } // Add the extra tags. for k, v := range oride.GoType.StructTags { tags[k] = v } } } func goType(req *plugin.GenerateRequest, options *opts.Options, col *plugin.Column) string { // Check if the column's type has been overridden for _, override := range options.Overrides { oride := override.ShimOverride if oride.GoType.TypeName == "" { continue } cname := col.Name if col.OriginalName != "" { cname = col.OriginalName } sameTable := override.Matches(col.Table, req.Catalog.DefaultSchema) if oride.Column != "" && sdk.MatchString(oride.ColumnName, cname) && sameTable { if col.IsSqlcSlice { return "[]" + oride.GoType.TypeName } return oride.GoType.TypeName } } typ := goInnerType(req, options, col) if col.IsSqlcSlice { return "[]" + typ } if col.IsArray { return strings.Repeat("[]", int(col.ArrayDims)) + typ } return typ } func goInnerType(req *plugin.GenerateRequest, options *opts.Options, col *plugin.Column) string { // package overrides have a higher precedence for _, override := range options.Overrides { oride := override.ShimOverride if oride.GoType.TypeName == "" { continue } if override.MatchesColumn(col) { return oride.GoType.TypeName } } // TODO: Extend the engine interface to handle types switch req.Settings.Engine { case "mysql": return mysqlType(req, options, col) case "postgresql": return postgresType(req, options, col) case "sqlite": return sqliteType(req, options, col) default: return "interface{}" } } ================================================ FILE: internal/codegen/golang/imports.go ================================================ package golang import ( "fmt" "sort" "strings" "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" "github.com/sqlc-dev/sqlc/internal/metadata" ) type fileImports struct { Std []ImportSpec Dep []ImportSpec } type ImportSpec struct { ID string Path string } func (s ImportSpec) String() string { if s.ID != "" { return fmt.Sprintf("%s %q", s.ID, s.Path) } else { return fmt.Sprintf("%q", s.Path) } } func mergeImports(imps ...fileImports) [][]ImportSpec { if len(imps) == 1 { return [][]ImportSpec{ imps[0].Std, imps[0].Dep, } } var stds, pkgs []ImportSpec seenStd := map[string]struct{}{} seenPkg := map[string]struct{}{} for i := range imps { for _, spec := range imps[i].Std { if _, ok := seenStd[spec.Path]; ok { continue } stds = append(stds, spec) seenStd[spec.Path] = struct{}{} } for _, spec := range imps[i].Dep { if _, ok := seenPkg[spec.Path]; ok { continue } pkgs = append(pkgs, spec) seenPkg[spec.Path] = struct{}{} } } return [][]ImportSpec{stds, pkgs} } type importer struct { Options *opts.Options Queries []Query Enums []Enum Structs []Struct } func (i *importer) usesType(typ string) bool { for _, strct := range i.Structs { for _, f := range strct.Fields { if hasPrefixIgnoringSliceAndPointerPrefix(f.Type, typ) { return true } } } 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 != "" { dbFileName = i.Options.OutputDbFileName } modelsFileName := "models.go" if i.Options.OutputModelsFileName != "" { modelsFileName = i.Options.OutputModelsFileName } querierFileName := "querier.go" if i.Options.OutputQuerierFileName != "" { querierFileName = i.Options.OutputQuerierFileName } copyfromFileName := "copyfrom.go" if i.Options.OutputCopyfromFileName != "" { copyfromFileName = i.Options.OutputCopyfromFileName } batchFileName := "batch.go" if i.Options.OutputBatchFileName != "" { batchFileName = i.Options.OutputBatchFileName } switch filename { case dbFileName: return mergeImports(i.dbImports()) case modelsFileName: return mergeImports(i.modelImports()) case querierFileName: return mergeImports(i.interfaceImports()) case copyfromFileName: return mergeImports(i.copyfromImports()) case batchFileName: return mergeImports(i.batchImports()) default: return mergeImports(i.queryImports(filename)) } } func (i *importer) dbImports() fileImports { var pkg []ImportSpec std := []ImportSpec{ {Path: "context"}, } sqlpkg := parseDriver(i.Options.SqlPackage) switch sqlpkg { case opts.SQLDriverPGXV4: pkg = append(pkg, ImportSpec{Path: "github.com/jackc/pgconn"}) pkg = append(pkg, ImportSpec{Path: "github.com/jackc/pgx/v4"}) 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: std = append(std, ImportSpec{Path: "database/sql"}) if i.Options.EmitPreparedQueries { std = append(std, ImportSpec{Path: "fmt"}) } } sort.Slice(std, func(i, j int) bool { return std[i].Path < std[j].Path }) sort.Slice(pkg, func(i, j int) bool { return pkg[i].Path < pkg[j].Path }) return fileImports{Std: std, Dep: pkg} } var stdlibTypes = map[string]string{ "json.RawMessage": "encoding/json", "time.Time": "time", "net.IP": "net", "net.HardwareAddr": "net", "netip.Addr": "net/netip", "netip.Prefix": "net/netip", } var pqtypeTypes = map[string]struct{}{ "pqtype.CIDR": {}, "pqtype.Inet": {}, "pqtype.Macaddr": {}, "pqtype.NullRawMessage": {}, } 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{}) if uses("sql.Null") { std["database/sql"] = struct{}{} } sqlpkg := parseDriver(options.SqlPackage) for _, q := range queries { if q.Cmd == metadata.CmdExecResult { switch sqlpkg { case opts.SQLDriverPGXV4: pkg[ImportSpec{Path: "github.com/jackc/pgconn"}] = struct{}{} case opts.SQLDriverPGXV5: pkg[ImportSpec{Path: "github.com/jackc/pgx/v5/pgconn"}] = struct{}{} default: std["database/sql"] = struct{}{} } } } for typeName, pkg := range stdlibTypes { if uses(typeName) { std[pkg] = struct{}{} } } if uses("pgtype.") { if sqlpkg == opts.SQLDriverPGXV5 { pkg[ImportSpec{Path: "github.com/jackc/pgx/v5/pgtype"}] = struct{}{} } else { pkg[ImportSpec{Path: "github.com/jackc/pgtype"}] = struct{}{} } } for typeName := range pqtypeTypes { if uses(typeName) { pkg[ImportSpec{Path: "github.com/sqlc-dev/pqtype"}] = struct{}{} break } } overrideTypes := map[string]string{} for _, override := range options.Overrides { o := override.ShimOverride if o.GoType.BasicType || o.GoType.TypeName == "" { continue } overrideTypes[o.GoType.TypeName] = o.GoType.ImportPath } _, overrideNullTime := overrideTypes["pq.NullTime"] if uses("pq.NullTime") && !overrideNullTime { pkg[ImportSpec{Path: "github.com/lib/pq"}] = struct{}{} } _, overrideUUID := overrideTypes["uuid.UUID"] if uses("uuid.UUID") && !overrideUUID { pkg[ImportSpec{Path: "github.com/google/uuid"}] = struct{}{} } _, overrideNullUUID := overrideTypes["uuid.NullUUID"] if uses("uuid.NullUUID") && !overrideNullUUID { pkg[ImportSpec{Path: "github.com/google/uuid"}] = struct{}{} } _, overrideVector := overrideTypes["pgvector.Vector"] if uses("pgvector.Vector") && !overrideVector { pkg[ImportSpec{Path: "github.com/pgvector/pgvector-go"}] = struct{}{} } // Custom imports for _, override := range options.Overrides { o := override.ShimOverride if o.GoType.BasicType || o.GoType.TypeName == "" { continue } _, alreadyImported := std[o.GoType.ImportPath] hasPackageAlias := o.GoType.Package != "" if (!alreadyImported || hasPackageAlias) && uses(o.GoType.TypeName) { pkg[ImportSpec{Path: o.GoType.ImportPath, ID: o.GoType.Package}] = struct{}{} } } return std, pkg } func (i *importer) interfaceImports() fileImports { std, pkg := buildImports(i.Options, i.Queries, func(name string) bool { for _, q := range i.Queries { if q.hasRetType() { if usesBatch([]Query{q}) { continue } if hasPrefixIgnoringSliceAndPointerPrefix(q.Ret.Type(), name) { return true } } for _, f := range q.Arg.Pairs() { if hasPrefixIgnoringSliceAndPointerPrefix(f.Type, name) { return true } } } return false }) std["context"] = struct{}{} return sortedImports(std, pkg) } func (i *importer) modelImports() fileImports { std, pkg := buildImports(i.Options, nil, i.usesType) if len(i.Enums) > 0 { std["fmt"] = struct{}{} std["database/sql/driver"] = struct{}{} } return sortedImports(std, pkg) } func sortedImports(std map[string]struct{}, pkg map[ImportSpec]struct{}) fileImports { pkgs := make([]ImportSpec, 0, len(pkg)) for spec := range pkg { pkgs = append(pkgs, spec) } stds := make([]ImportSpec, 0, len(std)) for path := range std { stds = append(stds, ImportSpec{Path: path}) } sort.Slice(stds, func(i, j int) bool { return stds[i].Path < stds[j].Path }) sort.Slice(pkgs, func(i, j int) bool { return pkgs[i].Path < pkgs[j].Path }) return fileImports{stds, pkgs} } func (i *importer) queryImports(filename string) fileImports { var gq []Query anyNonCopyFrom := false for _, query := range i.Queries { if usesBatch([]Query{query}) { continue } if query.SourceName == filename { gq = append(gq, query) if query.Cmd != metadata.CmdCopyFrom { anyNonCopyFrom = true } } } std, pkg := buildImports(i.Options, gq, func(name string) bool { for _, q := range gq { if q.hasRetType() { if q.Ret.EmitStruct() { for _, f := range q.Ret.Struct.Fields { if hasPrefixIgnoringSliceAndPointerPrefix(f.Type, name) { return true } } } if hasPrefixIgnoringSliceAndPointerPrefix(q.Ret.Type(), name) { return true } } // Check the fields of the argument struct if it's emitted if q.Arg.EmitStruct() { for _, f := range q.Arg.Struct.Fields { if hasPrefixIgnoringSliceAndPointerPrefix(f.Type, name) { return true } } } // Check the argument pairs inside the method definition for _, f := range q.Arg.Pairs() { if hasPrefixIgnoringSliceAndPointerPrefix(f.Type, name) { return true } } } return false }) sliceScan := func() bool { for _, q := range gq { if q.hasRetType() { if q.Ret.IsStruct() { for _, f := range q.Ret.Struct.Fields { if strings.HasPrefix(f.Type, "[]") && f.Type != "[]byte" { return true } for _, embed := range f.EmbedFields { if strings.HasPrefix(embed.Type, "[]") && embed.Type != "[]byte" { return true } } } } else { if strings.HasPrefix(q.Ret.Type(), "[]") && q.Ret.Type() != "[]byte" { return true } } } if !q.Arg.isEmpty() { if q.Arg.IsStruct() { for _, f := range q.Arg.Struct.Fields { if strings.HasPrefix(f.Type, "[]") && f.Type != "[]byte" && !f.HasSqlcSlice() { return true } } } else { if strings.HasPrefix(q.Arg.Type(), "[]") && q.Arg.Type() != "[]byte" && !q.Arg.HasSqlcSlices() { return true } } } } return false } // Search for sqlc.slice() calls sqlcSliceScan := func() bool { for _, q := range gq { if q.Arg.HasSqlcSlices() { return true } } return false } if anyNonCopyFrom { std["context"] = struct{}{} } sqlpkg := parseDriver(i.Options.SqlPackage) 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) } func (i *importer) copyfromImports() fileImports { copyFromQueries := make([]Query, 0, len(i.Queries)) for _, q := range i.Queries { if q.Cmd == metadata.CmdCopyFrom { copyFromQueries = append(copyFromQueries, q) } } std, pkg := buildImports(i.Options, copyFromQueries, func(name string) bool { for _, q := range copyFromQueries { if q.hasRetType() { if strings.HasPrefix(q.Ret.Type(), name) { return true } } if !q.Arg.isEmpty() { if strings.HasPrefix(q.Arg.Type(), name) { return true } } } return false }) std["context"] = struct{}{} if i.Options.SqlDriver == opts.SQLDriverGoSQLDriverMySQL { std["io"] = struct{}{} std["fmt"] = struct{}{} std["sync/atomic"] = struct{}{} pkg[ImportSpec{Path: "github.com/go-sql-driver/mysql"}] = struct{}{} pkg[ImportSpec{Path: "github.com/hexon/mysqltsv"}] = struct{}{} } return sortedImports(std, pkg) } func (i *importer) batchImports() fileImports { batchQueries := make([]Query, 0, len(i.Queries)) for _, q := range i.Queries { if usesBatch([]Query{q}) { batchQueries = append(batchQueries, q) } } std, pkg := buildImports(i.Options, batchQueries, func(name string) bool { for _, q := range batchQueries { if q.hasRetType() { if q.Ret.EmitStruct() { for _, f := range q.Ret.Struct.Fields { if hasPrefixIgnoringSliceAndPointerPrefix(f.Type, name) { return true } } } if hasPrefixIgnoringSliceAndPointerPrefix(q.Ret.Type(), name) { return true } } if q.Arg.EmitStruct() { for _, f := range q.Arg.Struct.Fields { if hasPrefixIgnoringSliceAndPointerPrefix(f.Type, name) { return true } } } for _, f := range q.Arg.Pairs() { if hasPrefixIgnoringSliceAndPointerPrefix(f.Type, name) { return true } } } return false }) std["context"] = struct{}{} std["errors"] = struct{}{} sqlpkg := parseDriver(i.Options.SqlPackage) switch sqlpkg { case opts.SQLDriverPGXV4: pkg[ImportSpec{Path: "github.com/jackc/pgx/v4"}] = struct{}{} case opts.SQLDriverPGXV5: pkg[ImportSpec{Path: "github.com/jackc/pgx/v5"}] = struct{}{} } return sortedImports(std, pkg) } func trimSliceAndPointerPrefix(v string) string { v = strings.TrimPrefix(v, "[]") v = strings.TrimPrefix(v, "*") return v } func hasPrefixIgnoringSliceAndPointerPrefix(s, prefix string) bool { trimmedS := trimSliceAndPointerPrefix(s) trimmedPrefix := trimSliceAndPointerPrefix(prefix) return strings.HasPrefix(trimmedS, trimmedPrefix) } func replaceConflictedArg(imports [][]ImportSpec, queries []Query) []Query { m := make(map[string]struct{}) for _, is := range imports { for _, i := range is { paths := strings.Split(i.Path, "/") m[paths[len(paths)-1]] = struct{}{} } } replacedQueries := make([]Query, 0, len(queries)) for _, query := range queries { if _, exist := m[query.Arg.Name]; exist { query.Arg.Name = toCamelCase(fmt.Sprintf("arg_%s", query.Arg.Name)) } replacedQueries = append(replacedQueries, query) } return replacedQueries } ================================================ FILE: internal/codegen/golang/mysql_type.go ================================================ 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.GenerateRequest, options *opts.Options, col *plugin.Column) string { columnType := sdk.DataType(col.Type) notNull := col.NotNull || col.IsArray unsigned := col.Unsigned switch columnType { case "varchar", "text", "char", "tinytext", "mediumtext", "longtext": if notNull { return "string" } return "sql.NullString" case "tinyint": if col.Length == 1 { if notNull { return "bool" } return "sql.NullBool" } else { if notNull { if unsigned { return "uint8" } return "int8" } // 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 "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" } return "int32" } return "sql.NullInt32" case "bigint", "bigint unsigned", "bigint signed": // "bigint unsigned" and "bigint signed" are MySQL CAST types // Note: We use int64 for CAST AS UNSIGNED to match original behavior, // even though uint64 would be more semantically correct. // The Unsigned flag on columns (from table schema) still uses uint64. if notNull { if unsigned { return "uint64" } return "int64" } return "sql.NullInt64" case "blob", "binary", "varbinary", "tinyblob", "mediumblob", "longblob": if notNull { return "[]byte" } return "sql.NullString" case "double", "double precision", "real", "float": if notNull { return "float64" } return "sql.NullFloat64" case "decimal", "dec", "fixed": if notNull { return "string" } return "sql.NullString" case "enum": // TODO: Proper Enum support return "string" case "date", "timestamp", "datetime", "time": if notNull { return "time.Time" } return "sql.NullTime" case "boolean", "bool": if notNull { return "bool" } return "sql.NullBool" case "json": return "json.RawMessage" case "any": return "interface{}" default: for _, schema := range req.Catalog.Schemas { for _, enum := range schema.Enums { if enum.Name == columnType { if notNull { if schema.Name == req.Catalog.DefaultSchema { return StructName(enum.Name, options) } return StructName(schema.Name+"_"+enum.Name, options) } else { if schema.Name == req.Catalog.DefaultSchema { return "Null" + StructName(enum.Name, options) } return "Null" + StructName(schema.Name+"_"+enum.Name, options) } } } } if debug.Active { log.Printf("Unknown MySQL type: %s\n", columnType) } return "interface{}" } } ================================================ FILE: internal/codegen/golang/opts/enum.go ================================================ 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 } } ================================================ FILE: internal/codegen/golang/opts/go_type.go ================================================ package opts import ( "encoding/json" "fmt" "go/types" "regexp" "strings" "github.com/fatih/structtag" ) type GoType struct { Path string `json:"import" yaml:"import"` Package string `json:"package" yaml:"package"` Name string `json:"type" yaml:"type"` Pointer bool `json:"pointer" yaml:"pointer"` Slice bool `json:"slice" yaml:"slice"` Spec string `json:"-"` BuiltIn bool `json:"-"` } type ParsedGoType struct { ImportPath string Package string TypeName string BasicType bool 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 { *o = GoType{Spec: spec} return nil } type alias GoType var a alias if err := json.Unmarshal(data, &a); err != nil { return err } *o = GoType(a) return nil } func (o *GoType) UnmarshalYAML(unmarshal func(interface{}) error) error { var spec string if err := unmarshal(&spec); err == nil { *o = GoType{Spec: spec} return nil } type alias GoType var a alias if err := unmarshal(&a); err != nil { return err } *o = GoType(a) return nil } var validIdentifier = regexp.MustCompile(`^[a-zA-Z0-9_]+$`) var versionNumber = regexp.MustCompile(`^v[0-9]+$`) var invalidIdentifier = regexp.MustCompile(`[^a-zA-Z0-9_]`) func generatePackageID(importPath string) (string, bool) { parts := strings.Split(importPath, "/") name := parts[len(parts)-1] // If the last part of the import path is a valid identifier, assume that's the package name if versionNumber.MatchString(name) && len(parts) >= 2 { name = parts[len(parts)-2] return invalidIdentifier.ReplaceAllString(strings.ToLower(name), "_"), true } if validIdentifier.MatchString(name) { return name, false } return invalidIdentifier.ReplaceAllString(strings.ToLower(name), "_"), true } // validate GoType func (gt GoType) parse() (*ParsedGoType, error) { var o ParsedGoType if gt.Spec == "" { // TODO: Validation if gt.Path == "" && gt.Package != "" { return nil, fmt.Errorf("Package override `go_type`: package name requires an import path") } var pkg string var pkgNeedsAlias bool if gt.Package == "" && gt.Path != "" { pkg, pkgNeedsAlias = generatePackageID(gt.Path) if pkgNeedsAlias { o.Package = pkg } } else { pkg = gt.Package o.Package = gt.Package } o.ImportPath = gt.Path o.TypeName = gt.Name o.BasicType = gt.Path == "" && gt.Package == "" if pkg != "" { o.TypeName = pkg + "." + o.TypeName } if gt.Pointer { o.TypeName = "*" + o.TypeName } if gt.Slice { o.TypeName = "[]" + o.TypeName } return &o, nil } input := gt.Spec lastDot := strings.LastIndex(input, ".") lastSlash := strings.LastIndex(input, "/") typename := input if lastDot == -1 && lastSlash == -1 { // if the type name has no slash and no dot, validate that the type is a basic Go type var found bool for _, typ := range types.Typ { info := typ.Info() if info == 0 { continue } if info&types.IsUntyped != 0 { continue } if typename == typ.Name() { found = true } } if !found { return nil, fmt.Errorf("Package override `go_type` specifier %q is not a Go basic type e.g. 'string'", input) } o.BasicType = true } else { // assume the type lives in a Go package if lastDot == -1 { return nil, fmt.Errorf("Package override `go_type` specifier %q is not the proper format, expected 'package.type', e.g. 'github.com/segmentio/ksuid.KSUID'", input) } typename = input[lastSlash+1:] // a package name beginning with "go-" will give syntax errors in // generated code. We should do the right thing and get the actual // import name, but in lieu of that, stripping the leading "go-" may get // us what we want. typename = strings.TrimPrefix(typename, "go-") typename = strings.TrimSuffix(typename, "-go") o.ImportPath = input[:lastDot] } o.TypeName = typename isPointer := input[0] == '*' if isPointer { o.ImportPath = o.ImportPath[1:] o.TypeName = "*" + o.TypeName } return &o, nil } // GoStructTag is a raw Go struct tag. type GoStructTag string // Parse parses and validates a GoStructTag. // The output is in a form convenient for codegen. // // Sample valid inputs/outputs: // // In Out // empty string {} // `a:"b"` {"a": "b"} // `a:"b" x:"y,z"` {"a": "b", "x": "y,z"} func (s GoStructTag) parse() (map[string]string, error) { m := make(map[string]string) tags, err := structtag.Parse(string(s)) if err != nil { return nil, err } for _, tag := range tags.Tags() { m[tag.Key] = tag.Value() } return m, nil } ================================================ FILE: internal/codegen/golang/opts/options.go ================================================ 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 } ================================================ FILE: internal/codegen/golang/opts/override.go ================================================ 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 { // name of the golang type to use, e.g. `github.com/segmentio/ksuid.KSUID` GoType GoType `json:"go_type" yaml:"go_type"` // additional Go struct tags to add to this field, in raw Go struct tag form, e.g. `validate:"required" x:"y,z"` // see https://github.com/sqlc-dev/sqlc/issues/534 GoStructTag GoStructTag `json:"go_struct_tag" yaml:"go_struct_tag"` // fully qualified name of the Go type, e.g. `github.com/segmentio/ksuid.KSUID` DBType string `json:"db_type" yaml:"db_type"` Deprecated_PostgresType string `json:"postgres_type" yaml:"postgres_type"` // for global overrides only when two different engines are in use 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"` // True if the GoType should override if the matching type is unsiged. Unsigned bool `json:"unsigned" yaml:"unsigned"` // Deprecated. Use the `nullable` property instead Deprecated_Null bool `json:"null" yaml:"null"` // fully qualified name of the column, e.g. `accounts.id` Column string `json:"column" yaml:"column"` 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 `json:"-"` ShimOverride *ShimOverride `json:"-"` } 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") if o.DBType != "" { return fmt.Errorf(`Type override configurations cannot have "db_type" and "postres_type" together. Use "db_type" alone`) } o.DBType = o.Deprecated_PostgresType } // validate deprecated null field if o.Deprecated_Null { fmt.Fprintf(os.Stderr, "WARNING: \"null\" is deprecated. Instead, use the \"nullable\" field.\n") o.Nullable = true } schema := "public" if req != nil && req.Catalog != nil { schema = req.Catalog.DefaultSchema } // validate option combinations switch { case o.Column != "" && o.DBType != "": return fmt.Errorf("Override specifying both `column` (%q) and `db_type` (%q) is not valid.", o.Column, o.DBType) case o.Column == "" && o.DBType == "": return fmt.Errorf("Override must specify one of either `column` or `db_type`") } // validate Column if o.Column != "" { colParts := strings.Split(o.Column, ".") switch len(colParts) { case 2: if o.ColumnName, err = pattern.MatchCompile(colParts[1]); err != nil { return err } if o.TableRel, err = pattern.MatchCompile(colParts[0]); err != nil { return err } if o.TableSchema, err = pattern.MatchCompile(schema); err != nil { return err } case 3: if o.ColumnName, err = pattern.MatchCompile(colParts[2]); err != nil { return err } if o.TableRel, err = pattern.MatchCompile(colParts[1]); err != nil { return err } if o.TableSchema, err = pattern.MatchCompile(colParts[0]); err != nil { return err } case 4: if o.ColumnName, err = pattern.MatchCompile(colParts[3]); err != nil { return err } if o.TableRel, err = pattern.MatchCompile(colParts[2]); err != nil { return err } if o.TableSchema, err = pattern.MatchCompile(colParts[1]); err != nil { return err } if o.TableCatalog, err = pattern.MatchCompile(colParts[0]); err != nil { return err } default: return fmt.Errorf("Override `column` specifier %q is not the proper format, expected '[catalog.][schema.]tablename.colname'", o.Column) } } // validate GoType parsed, err := o.GoType.parse() if err != nil { return err } o.GoImportPath = parsed.ImportPath o.GoPackage = parsed.Package o.GoTypeName = parsed.TypeName o.GoBasicType = parsed.BasicType // validate GoStructTag tags, err := o.GoStructTag.parse() if err != nil { return err } o.GoStructTags = tags o.ShimOverride = shimOverride(req, o) return nil } ================================================ FILE: internal/codegen/golang/opts/override_test.go ================================================ 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) }) } ================================================ FILE: internal/codegen/golang/opts/shim.go ================================================ 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, } } ================================================ FILE: internal/codegen/golang/postgresql_type.go ================================================ package golang import ( "fmt" "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 parseIdentifierString(name string) (*plugin.Identifier, error) { parts := strings.Split(name, ".") switch len(parts) { case 1: return &plugin.Identifier{ Name: parts[0], }, nil case 2: return &plugin.Identifier{ Schema: parts[0], Name: parts[1], }, nil case 3: return &plugin.Identifier{ Catalog: parts[0], Schema: parts[1], Name: parts[2], }, nil default: return nil, fmt.Errorf("invalid name: %s", name) } } 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) emitPointersForNull := driver.IsPGX() && options.EmitPointersForNullTypes switch columnType { case "serial", "serial4", "pg_catalog.serial4": if notNull { return "int32" } if emitPointersForNull { return "*int32" } if driver == opts.SQLDriverPGXV5 { return "pgtype.Int4" } return "sql.NullInt32" case "bigserial", "serial8", "pg_catalog.serial8": if notNull { return "int64" } if emitPointersForNull { return "*int64" } if driver == opts.SQLDriverPGXV5 { return "pgtype.Int8" } return "sql.NullInt64" case "smallserial", "serial2", "pg_catalog.serial2": if notNull { return "int16" } if emitPointersForNull { return "*int16" } if driver == opts.SQLDriverPGXV5 { return "pgtype.Int2" } return "sql.NullInt16" case "integer", "int", "int4", "pg_catalog.int4": if notNull { return "int32" } if emitPointersForNull { return "*int32" } if driver == opts.SQLDriverPGXV5 { return "pgtype.Int4" } return "sql.NullInt32" case "bigint", "int8", "pg_catalog.int8": if notNull { return "int64" } if emitPointersForNull { return "*int64" } if driver == opts.SQLDriverPGXV5 { return "pgtype.Int8" } return "sql.NullInt64" case "smallint", "int2", "pg_catalog.int2": if notNull { return "int16" } if emitPointersForNull { return "*int16" } if driver == opts.SQLDriverPGXV5 { return "pgtype.Int2" } return "sql.NullInt16" case "float", "double precision", "float8", "pg_catalog.float8": if notNull { return "float64" } if emitPointersForNull { return "*float64" } if driver == opts.SQLDriverPGXV5 { return "pgtype.Float8" } return "sql.NullFloat64" case "real", "float4", "pg_catalog.float4": if notNull { return "float32" } if emitPointersForNull { return "*float32" } if driver == opts.SQLDriverPGXV5 { return "pgtype.Float4" } return "sql.NullFloat64" // TODO: Change to sql.NullFloat32 after updating the go.mod file case "numeric", "pg_catalog.numeric", "money": if driver.IsPGX() { return "pgtype.Numeric" } // Since the Go standard library does not have a decimal type, lib/pq // returns numerics as strings. // // https://github.com/lib/pq/issues/648 if notNull { return "string" } if emitPointersForNull { return "*string" } return "sql.NullString" case "boolean", "bool", "pg_catalog.bool": if notNull { return "bool" } if emitPointersForNull { return "*bool" } if driver == opts.SQLDriverPGXV5 { return "pgtype.Bool" } return "sql.NullBool" case "json", "pg_catalog.json": switch driver { case opts.SQLDriverPGXV5: return "[]byte" case opts.SQLDriverPGXV4: return "pgtype.JSON" case opts.SQLDriverLibPQ: if notNull { return "json.RawMessage" } else { return "pqtype.NullRawMessage" } default: return "interface{}" } case "jsonb", "pg_catalog.jsonb": switch driver { case opts.SQLDriverPGXV5: return "[]byte" case opts.SQLDriverPGXV4: return "pgtype.JSONB" case opts.SQLDriverLibPQ: if notNull { return "json.RawMessage" } else { return "pqtype.NullRawMessage" } default: return "interface{}" } case "bytea", "blob", "pg_catalog.bytea": return "[]byte" case "date": if driver == opts.SQLDriverPGXV5 { return "pgtype.Date" } if notNull { return "time.Time" } if emitPointersForNull { return "*time.Time" } return "sql.NullTime" case "pg_catalog.time": if driver == opts.SQLDriverPGXV5 { return "pgtype.Time" } if notNull { return "time.Time" } if emitPointersForNull { return "*time.Time" } return "sql.NullTime" case "pg_catalog.timetz": if notNull { return "time.Time" } if emitPointersForNull { return "*time.Time" } return "sql.NullTime" case "pg_catalog.timestamp", "timestamp": if driver == opts.SQLDriverPGXV5 { return "pgtype.Timestamp" } if notNull { return "time.Time" } if emitPointersForNull { return "*time.Time" } return "sql.NullTime" case "pg_catalog.timestamptz", "timestamptz": if driver == opts.SQLDriverPGXV5 { return "pgtype.Timestamptz" } if notNull { return "time.Time" } if emitPointersForNull { return "*time.Time" } return "sql.NullTime" case "text", "pg_catalog.varchar", "pg_catalog.bpchar", "string", "citext", "name": if notNull { return "string" } if emitPointersForNull { return "*string" } if driver == opts.SQLDriverPGXV5 { return "pgtype.Text" } return "sql.NullString" case "uuid": if driver == opts.SQLDriverPGXV5 { return "pgtype.UUID" } if notNull { return "uuid.UUID" } if emitPointersForNull { return "*uuid.UUID" } return "uuid.NullUUID" case "inet": switch driver { case opts.SQLDriverPGXV5: if notNull { return "netip.Addr" } return "*netip.Addr" case opts.SQLDriverPGXV4: return "pgtype.Inet" case opts.SQLDriverLibPQ: return "pqtype.Inet" default: return "interface{}" } case "cidr": switch driver { case opts.SQLDriverPGXV5: if notNull { return "netip.Prefix" } return "*netip.Prefix" case opts.SQLDriverPGXV4: return "pgtype.CIDR" case opts.SQLDriverLibPQ: return "pqtype.CIDR" default: return "interface{}" } case "macaddr", "macaddr8": switch driver { case opts.SQLDriverPGXV5: return "net.HardwareAddr" case opts.SQLDriverPGXV4: return "pgtype.Macaddr" case opts.SQLDriverLibPQ: return "pqtype.Macaddr" default: return "interface{}" } case "ltree", "lquery", "ltxtquery": // This module implements a data type ltree for representing labels // of data stored in a hierarchical tree-like structure. Extensive // facilities for searching through label trees are provided. // // https://www.postgresql.org/docs/current/ltree.html if notNull { return "string" } if emitPointersForNull { return "*string" } if driver == opts.SQLDriverPGXV5 { return "pgtype.Text" } return "sql.NullString" case "interval", "pg_catalog.interval": if driver == opts.SQLDriverPGXV5 { return "pgtype.Interval" } if notNull { return "int64" } if emitPointersForNull { return "*int64" } return "sql.NullInt64" case "daterange": switch driver { case opts.SQLDriverPGXV4: return "pgtype.Daterange" case opts.SQLDriverPGXV5: return "pgtype.Range[pgtype.Date]" default: return "interface{}" } case "datemultirange": switch driver { case opts.SQLDriverPGXV5: return "pgtype.Multirange[pgtype.Range[pgtype.Date]]" default: return "interface{}" } case "tsrange": switch driver { case opts.SQLDriverPGXV4: return "pgtype.Tsrange" case opts.SQLDriverPGXV5: return "pgtype.Range[pgtype.Timestamp]" default: return "interface{}" } case "tsmultirange": switch driver { case opts.SQLDriverPGXV5: return "pgtype.Multirange[pgtype.Range[pgtype.Timestamp]]" default: return "interface{}" } case "tstzrange": switch driver { case opts.SQLDriverPGXV4: return "pgtype.Tstzrange" case opts.SQLDriverPGXV5: return "pgtype.Range[pgtype.Timestamptz]" default: return "interface{}" } case "tstzmultirange": switch driver { case opts.SQLDriverPGXV5: return "pgtype.Multirange[pgtype.Range[pgtype.Timestamptz]]" default: return "interface{}" } case "numrange": switch driver { case opts.SQLDriverPGXV4: return "pgtype.Numrange" case opts.SQLDriverPGXV5: return "pgtype.Range[pgtype.Numeric]" default: return "interface{}" } case "nummultirange": switch driver { case opts.SQLDriverPGXV5: return "pgtype.Multirange[pgtype.Range[pgtype.Numeric]]" default: return "interface{}" } case "int4range": switch driver { case opts.SQLDriverPGXV4: return "pgtype.Int4range" case opts.SQLDriverPGXV5: return "pgtype.Range[pgtype.Int4]" default: return "interface{}" } case "int4multirange": switch driver { case opts.SQLDriverPGXV5: return "pgtype.Multirange[pgtype.Range[pgtype.Int4]]" default: return "interface{}" } case "int8range": switch driver { case opts.SQLDriverPGXV4: return "pgtype.Int8range" case opts.SQLDriverPGXV5: return "pgtype.Range[pgtype.Int8]" default: return "interface{}" } case "int8multirange": switch driver { case opts.SQLDriverPGXV5: return "pgtype.Multirange[pgtype.Range[pgtype.Int8]]" default: return "interface{}" } case "hstore": if driver.IsPGX() { return "pgtype.Hstore" } return "interface{}" case "bit", "varbit", "pg_catalog.bit", "pg_catalog.varbit": if driver == opts.SQLDriverPGXV5 { return "pgtype.Bits" } if driver == opts.SQLDriverPGXV4 { return "pgtype.Varbit" } case "cid": if driver == opts.SQLDriverPGXV5 { return "pgtype.Uint32" } if driver == opts.SQLDriverPGXV4 { return "pgtype.CID" } case "oid": if driver == opts.SQLDriverPGXV5 { return "pgtype.Uint32" } if driver == opts.SQLDriverPGXV4 { return "pgtype.OID" } case "tid": if driver.IsPGX() { return "pgtype.TID" } case "xid": if driver == opts.SQLDriverPGXV5 { return "pgtype.Uint32" } if driver == opts.SQLDriverPGXV4 { return "pgtype.XID" } case "box": if driver.IsPGX() { return "pgtype.Box" } case "circle": if driver.IsPGX() { return "pgtype.Circle" } case "line": if driver.IsPGX() { return "pgtype.Line" } case "lseg": if driver.IsPGX() { return "pgtype.Lseg" } case "path": if driver.IsPGX() { return "pgtype.Path" } case "point": if driver.IsPGX() { return "pgtype.Point" } case "polygon": if driver.IsPGX() { return "pgtype.Polygon" } case "vector": if driver == opts.SQLDriverPGXV5 { if emitPointersForNull { return "*pgvector.Vector" } else { return "pgvector.Vector" } } case "void": // A void value can only be scanned into an empty interface. return "interface{}" case "any": return "interface{}" default: rel, err := parseIdentifierString(columnType) if err != nil { // TODO: Should this actually return an error here? return "interface{}" } if rel.Schema == "" { rel.Schema = req.Catalog.DefaultSchema } for _, schema := range req.Catalog.Schemas { if schema.Name == "pg_catalog" || schema.Name == "information_schema" { continue } for _, enum := range schema.Enums { if rel.Name == enum.Name && rel.Schema == schema.Name { if notNull { if schema.Name == req.Catalog.DefaultSchema { return StructName(enum.Name, options) } return StructName(schema.Name+"_"+enum.Name, options) } else { if schema.Name == req.Catalog.DefaultSchema { return "Null" + StructName(enum.Name, options) } return "Null" + StructName(schema.Name+"_"+enum.Name, options) } } } for _, ct := range schema.CompositeTypes { if rel.Name == ct.Name && rel.Schema == schema.Name { if notNull { return "string" } if emitPointersForNull { return "*string" } return "sql.NullString" } } } } if debug.Active { log.Printf("unknown PostgreSQL type: %s\n", columnType) } return "interface{}" } ================================================ FILE: internal/codegen/golang/query.go ================================================ package golang 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" ) type QueryValue struct { Emit bool EmitPointer bool Name string DBName string // The name of the field in the database. Only set if Struct==nil. Struct *Struct Typ string SQLDriver opts.SQLDriver // Column is kept so late in the generation process around to differentiate // between mysql slices and pg arrays Column *plugin.Column } func (v QueryValue) EmitStruct() bool { return v.Emit } func (v QueryValue) IsStruct() bool { return v.Struct != nil } func (v QueryValue) IsPointer() bool { return v.EmitPointer && v.Struct != nil } func (v QueryValue) isEmpty() bool { return v.Typ == "" && v.Name == "" && v.Struct == nil } type Argument struct { Name string Type string } func (v QueryValue) Pair() string { var out []string for _, arg := range v.Pairs() { out = append(out, arg.Name+" "+arg.Type) } return strings.Join(out, ",") } // Return the argument name and type for query methods. Should only be used in // the context of method arguments. func (v QueryValue) Pairs() []Argument { if v.isEmpty() { return nil } if !v.EmitStruct() && v.IsStruct() { var out []Argument for _, f := range v.Struct.Fields { out = append(out, Argument{ Name: escape(toLowerCase(f.Name)), Type: f.Type, }) } return out } return []Argument{ { Name: escape(v.Name), Type: v.DefineType(), }, } } func (v QueryValue) SlicePair() string { if v.isEmpty() { return "" } return v.Name + " []" + v.DefineType() } func (v QueryValue) Type() string { if v.Typ != "" { return v.Typ } if v.Struct != nil { return v.Struct.Name } panic("no type for QueryValue: " + v.Name) } func (v *QueryValue) DefineType() string { t := v.Type() if v.IsPointer() { return "*" + t } return t } func (v *QueryValue) ReturnName() string { if v.IsPointer() { return "&" + escape(v.Name) } return escape(v.Name) } func (v QueryValue) UniqueFields() []Field { seen := map[string]struct{}{} fields := make([]Field, 0, len(v.Struct.Fields)) for _, field := range v.Struct.Fields { if _, found := seen[field.Name]; found { continue } seen[field.Name] = struct{}{} fields = append(fields, field) } return fields } func (v QueryValue) Params() string { if v.isEmpty() { return "" } var out []string if v.Struct == nil { if !v.Column.IsSqlcSlice && strings.HasPrefix(v.Typ, "[]") && v.Typ != "[]byte" && !v.SQLDriver.IsPGX() { out = append(out, "pq.Array("+escape(v.Name)+")") } else { out = append(out, escape(v.Name)) } } else { for _, f := range v.Struct.Fields { if !f.HasSqlcSlice() && strings.HasPrefix(f.Type, "[]") && f.Type != "[]byte" && !v.SQLDriver.IsPGX() { out = append(out, "pq.Array("+escape(v.VariableForField(f))+")") } else { out = append(out, escape(v.VariableForField(f))) } } } if len(out) <= 3 { return strings.Join(out, ",") } out = append(out, "") return "\n" + strings.Join(out, ",\n") } func (v QueryValue) ColumnNames() []string { if v.Struct == nil { return []string{v.DBName} } names := make([]string, len(v.Struct.Fields)) for i, f := range v.Struct.Fields { names[i] = f.DBName } return names } func (v QueryValue) ColumnNamesAsGoSlice() string { if v.Struct == nil { return fmt.Sprintf("[]string{%q}", v.DBName) } escapedNames := make([]string, len(v.Struct.Fields)) for i, f := range v.Struct.Fields { if f.Column != nil && f.Column.OriginalName != "" { escapedNames[i] = fmt.Sprintf("%q", f.Column.OriginalName) } else { escapedNames[i] = fmt.Sprintf("%q", f.DBName) } } return "[]string{" + strings.Join(escapedNames, ", ") + "}" } // When true, we have to build the arguments to q.db.QueryContext in addition to // munging the SQL func (v QueryValue) HasSqlcSlices() bool { if v.Struct == nil { return v.Column != nil && v.Column.IsSqlcSlice } for _, v := range v.Struct.Fields { if v.Column.IsSqlcSlice { return true } } return false } func (v QueryValue) Scan() string { var out []string if v.Struct == nil { if strings.HasPrefix(v.Typ, "[]") && v.Typ != "[]byte" && !v.SQLDriver.IsPGX() { out = append(out, "pq.Array(&"+v.Name+")") } else { out = append(out, "&"+v.Name) } } else { for _, f := range v.Struct.Fields { // append any embedded fields if len(f.EmbedFields) > 0 { for _, embed := range f.EmbedFields { if strings.HasPrefix(embed.Type, "[]") && embed.Type != "[]byte" && !v.SQLDriver.IsPGX() { out = append(out, "pq.Array(&"+v.Name+"."+f.Name+"."+embed.Name+")") } else { out = append(out, "&"+v.Name+"."+f.Name+"."+embed.Name) } } continue } if strings.HasPrefix(f.Type, "[]") && f.Type != "[]byte" && !v.SQLDriver.IsPGX() { out = append(out, "pq.Array(&"+v.Name+"."+f.Name+")") } else { out = append(out, "&"+v.Name+"."+f.Name) } } } if len(out) <= 3 { return strings.Join(out, ",") } out = append(out, "") return "\n" + strings.Join(out, ",\n") } // Deprecated: This method does not respect the Emit field set on the // QueryValue. It's used by the go-sql-driver-mysql/copyfromCopy.tmpl and should // not be used other places. func (v QueryValue) CopyFromMySQLFields() []Field { // fmt.Printf("%#v\n", v) if v.Struct != nil { return v.Struct.Fields } return []Field{ { Name: v.Name, DBName: v.DBName, Type: v.Typ, }, } } func (v QueryValue) VariableForField(f Field) string { if !v.IsStruct() { return v.Name } if !v.EmitStruct() { return toLowerCase(f.Name) } return v.Name + "." + f.Name } // A struct used to generate methods and fields on the Queries struct type Query struct { Cmd string Comments []string MethodName string FieldName string ConstantName string SQL string SourceName string Ret QueryValue Arg QueryValue // Used for :copyfrom Table *plugin.Identifier } func (q Query) hasRetType() bool { scanned := q.Cmd == metadata.CmdOne || q.Cmd == metadata.CmdMany || q.Cmd == metadata.CmdBatchMany || q.Cmd == metadata.CmdBatchOne return scanned && !q.Ret.isEmpty() } func (q Query) TableIdentifierAsGoSlice() string { escapedNames := make([]string, 0, 3) for _, p := range []string{q.Table.Catalog, q.Table.Schema, q.Table.Name} { if p != "" { escapedNames = append(escapedNames, fmt.Sprintf("%q", p)) } } return "[]string{" + strings.Join(escapedNames, ", ") + "}" } func (q Query) TableIdentifierForMySQL() string { escapedNames := make([]string, 0, 3) for _, p := range []string{q.Table.Catalog, q.Table.Schema, q.Table.Name} { if p != "" { escapedNames = append(escapedNames, fmt.Sprintf("`%s`", p)) } } return strings.Join(escapedNames, ".") } ================================================ FILE: internal/codegen/golang/reserved.go ================================================ package golang func escape(s string) string { if IsReserved(s) { return s + "_" } return s } func IsReserved(s string) bool { switch s { case "break": return true case "default": return true case "func": return true case "interface": return true case "select": return true case "case": return true case "defer": return true case "go": return true case "map": return true case "struct": return true case "chan": return true case "else": return true case "goto": return true case "package": return true case "switch": return true case "const": return true case "fallthrough": return true case "if": return true case "range": return true case "type": return true case "continue": return true case "for": return true case "import": return true case "return": return true case "var": return true case "q": return true default: return false } } ================================================ FILE: internal/codegen/golang/result.go ================================================ 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.GenerateRequest, options *opts.Options) []Enum { var enums []Enum for _, schema := range req.Catalog.Schemas { if schema.Name == "pg_catalog" || schema.Name == "information_schema" { continue } for _, enum := range schema.Enums { var enumName string if schema.Name == req.Catalog.DefaultSchema { enumName = enum.Name } else { enumName = schema.Name + "_" + enum.Name } e := Enum{ Name: StructName(enumName, options), Comment: enum.Comment, NameTags: map[string]string{}, ValidTags: map[string]string{}, } if options.EmitJsonTags { e.NameTags["json"] = JSONTagName(enumName, options) e.ValidTags["json"] = JSONTagName("valid", options) } seen := make(map[string]struct{}, len(enum.Vals)) for i, v := range enum.Vals { value := EnumReplace(v) if _, found := seen[value]; found || value == "" { value = fmt.Sprintf("value_%d", i) } e.Constants = append(e.Constants, Constant{ Name: StructName(enumName+"_"+value, options), Value: v, Type: e.Name, }) seen[value] = struct{}{} } enums = append(enums, e) } } if len(enums) > 0 { sort.Slice(enums, func(i, j int) bool { return enums[i].Name < enums[j].Name }) } return enums } 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" { continue } for _, table := range schema.Tables { var tableName string if schema.Name == req.Catalog.DefaultSchema { tableName = table.Rel.Name } else { tableName = schema.Name + "_" + table.Rel.Name } structName := tableName if !options.EmitExactTableNames { structName = inflection.Singular(inflection.SingularParams{ Name: structName, Exclusions: options.InflectionExcludeTableNames, }) } s := Struct{ Table: &plugin.Identifier{Schema: schema.Name, Name: table.Rel.Name}, Name: StructName(structName, options), Comment: table.Comment, } for _, column := range table.Columns { tags := map[string]string{} if options.EmitDbTags { tags["db"] = column.Name } if options.EmitJsonTags { tags["json"] = JSONTagName(column.Name, options) } addExtraGoStructTags(tags, req, options, column) s.Fields = append(s.Fields, Field{ Name: StructName(column.Name, options), Type: goType(req, options, column), Tags: tags, Comment: column.Comment, }) } structs = append(structs, s) } } if len(structs) > 0 { sort.Slice(structs, func(i, j int) bool { return structs[i].Name < structs[j].Name }) } return structs } type goColumn struct { id int *plugin.Column embed *goEmbed } type goEmbed struct { modelType string modelName string fields []Field } // look through all the structs and attempt to find a matching one to embed // We need the name of the struct and its field names. func newGoEmbed(embed *plugin.Identifier, structs []Struct, defaultSchema string) *goEmbed { if embed == nil { return nil } for _, s := range structs { embedSchema := defaultSchema if embed.Schema != "" { embedSchema = embed.Schema } // compare the other attributes if embed.Catalog != s.Table.Catalog || embed.Name != s.Table.Name || embedSchema != s.Table.Schema { continue } fields := make([]Field, len(s.Fields)) copy(fields, s.Fields) return &goEmbed{ modelType: s.Name, modelName: s.Name, fields: fields, } } return nil } func columnName(c *plugin.Column, pos int) string { if c.Name != "" { return c.Name } return fmt.Sprintf("column_%d", pos+1) } func paramName(p *plugin.Parameter) string { if p.Column.Name != "" { return argName(p.Column.Name) } return fmt.Sprintf("dollar_%d", p.Number) } func argName(name string) string { out := "" for i, p := range strings.Split(name, "_") { if i == 0 { out += strings.ToLower(p) } else if p == "id" { out += "ID" } else { out += strings.Title(p) } } return out } 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 == "" { continue } if query.Cmd == "" { continue } var constantName string if options.EmitExportedQueries { constantName = sdk.Title(query.Name) } else { 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, FieldName: sdk.LowerTitle(query.Name) + "Stmt", MethodName: query.Name, SourceName: query.Filename, SQL: query.Text, Comments: comments, Table: query.InsertIntoTable, } sqlpkg := parseDriver(options.SqlPackage) qpl := int(*options.QueryParameterLimit) if len(query.Params) == 1 && qpl != 0 { p := query.Params[0] gq.Arg = QueryValue{ Name: escape(paramName(p)), DBName: p.Column.GetName(), Typ: goType(req, options, p.Column), SQLDriver: sqlpkg, Column: p.Column, } } else if len(query.Params) >= 1 { var cols []goColumn for _, p := range query.Params { cols = append(cols, goColumn{ id: int(p.Number), Column: p.Column, }) } s, err := columnsToStruct(req, options, gq.MethodName+"Params", cols, false) if err != nil { return nil, err } gq.Arg = QueryValue{ Emit: true, Name: "arg", Struct: s, SQLDriver: sqlpkg, EmitPointer: options.EmitParamsStructPointers, } // 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 } } if len(query.Columns) == 1 && query.Columns[0].EmbedTable == nil { c := query.Columns[0] name := columnName(c, 0) name = strings.Replace(name, "$", "_", -1) gq.Ret = QueryValue{ Name: escape(name), DBName: name, Typ: goType(req, options, c), SQLDriver: sqlpkg, } } else if putOutColumns(query) { var gs *Struct var emit bool for _, s := range structs { if len(s.Fields) != len(query.Columns) { continue } same := true for i, f := range s.Fields { c := query.Columns[i] 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 { same = false } } if same { gs = &s break } } if gs == nil { var columns []goColumn for i, c := range query.Columns { columns = append(columns, goColumn{ id: i, Column: c, embed: newGoEmbed(c.EmbedTable, structs, req.Catalog.DefaultSchema), }) } var err error gs, err = columnsToStruct(req, options, gq.MethodName+"Row", columns, true) if err != nil { return nil, err } emit = true } gq.Ret = QueryValue{ Emit: emit, Name: "i", Struct: gs, SQLDriver: sqlpkg, EmitPointer: options.EmitResultStructPointers, } } qs = append(qs, gq) } sort.Slice(qs, func(i, j int) bool { return qs[i].MethodName < qs[j].MethodName }) return qs, nil } var cmdReturnsData = map[string]struct{}{ metadata.CmdBatchMany: {}, metadata.CmdBatchOne: {}, metadata.CmdMany: {}, metadata.CmdOne: {}, } func putOutColumns(query *plugin.Query) bool { _, found := cmdReturnsData[query.Cmd] return found } // It's possible that this method will generate duplicate JSON tag values // // Columns: count, count, count_2 // Fields: Count, Count_2, Count2 // // JSON tags: count, count_2, count_2 // // This is unlikely to happen, so don't fix it yet func columnsToStruct(req *plugin.GenerateRequest, options *opts.Options, name string, columns []goColumn, useID bool) (*Struct, error) { gs := Struct{ Name: name, } seen := map[string][]int{} suffixes := map[int]int{} for i, c := range columns { colName := columnName(c.Column, i) tagName := colName // override col/tag with expected model name if c.embed != nil { colName = c.embed.modelName tagName = SetCaseStyle(colName, "snake") } 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. suffix := 0 if o, ok := suffixes[c.id]; ok && useID { suffix = o } else if v := len(seen[fieldName]); v > 0 && !c.IsNamedParam { suffix = v + 1 } suffixes[c.id] = suffix if suffix > 0 { tagName = fmt.Sprintf("%s_%d", tagName, suffix) fieldName = fmt.Sprintf("%s_%d", fieldName, suffix) } tags := map[string]string{} if options.EmitDbTags { tags["db"] = tagName } if options.EmitJsonTags { tags["json"] = JSONTagName(tagName, options) } addExtraGoStructTags(tags, req, options, c.Column) f := Field{ Name: fieldName, DBName: colName, Tags: tags, Column: c.Column, } if c.embed == nil { f.Type = goType(req, options, c.Column) } else { f.Type = c.embed.modelType f.EmbedFields = c.embed.fields } gs.Fields = append(gs.Fields, f) if _, found := seen[baseFieldName]; !found { seen[baseFieldName] = []int{i} } else { seen[baseFieldName] = append(seen[baseFieldName], i) } } // If a field does not have a known type, but another // field with the same name has a known type, assign // the known type to the field without a known type for i, field := range gs.Fields { if len(seen[field.Name]) > 1 && field.Type == "interface{}" { for _, j := range seen[field.Name] { if i == j { continue } otherField := gs.Fields[j] if otherField.Type != field.Type { field.Type = otherField.Type } gs.Fields[i] = field } } } err := checkIncompatibleFieldTypes(gs.Fields) if err != nil { return nil, err } return &gs, nil } func checkIncompatibleFieldTypes(fields []Field) error { fieldTypes := map[string]string{} for _, field := range fields { if fieldType, found := fieldTypes[field.Name]; !found { fieldTypes[field.Name] = field.Type } else if field.Type != fieldType { return fmt.Errorf("named param %s has incompatible types: %s, %s", field.Name, field.Type, fieldType) } } return nil } ================================================ FILE: internal/codegen/golang/result_test.go ================================================ package golang import ( "testing" "github.com/sqlc-dev/sqlc/internal/metadata" "github.com/sqlc-dev/sqlc/internal/plugin" ) func TestPutOutColumns_ForZeroColumns(t *testing.T) { tests := []struct { cmd string want bool }{ { cmd: metadata.CmdExec, want: false, }, { cmd: metadata.CmdExecResult, want: false, }, { cmd: metadata.CmdExecRows, want: false, }, { cmd: metadata.CmdExecLastId, want: false, }, { cmd: metadata.CmdMany, want: true, }, { cmd: metadata.CmdOne, want: true, }, { cmd: metadata.CmdCopyFrom, want: false, }, { cmd: metadata.CmdBatchExec, want: false, }, { cmd: metadata.CmdBatchMany, want: true, }, { cmd: metadata.CmdBatchOne, want: true, }, } for _, tc := range tests { t.Run(tc.cmd, func(t *testing.T) { query := &plugin.Query{ Cmd: tc.cmd, Columns: []*plugin.Column{}, } got := putOutColumns(query) if got != tc.want { t.Errorf("putOutColumns failed. want %v, got %v", tc.want, got) } }) } } func TestPutOutColumns_AlwaysTrueWhenQueryHasColumns(t *testing.T) { query := &plugin.Query{ Cmd: metadata.CmdMany, Columns: []*plugin.Column{{}}, } if putOutColumns(query) != true { t.Error("should be true when we have columns") } } ================================================ FILE: internal/codegen/golang/sqlite_type.go ================================================ package golang 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.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 { case "int", "integer", "tinyint", "smallint", "mediumint", "bigint", "unsignedbigint", "int2", "int8": if notNull { return "int64" } if emitPointersForNull { return "*int64" } return "sql.NullInt64" case "blob": return "[]byte" case "real", "double", "doubleprecision", "float": 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{}" } switch { case strings.HasPrefix(dt, "character"), strings.HasPrefix(dt, "varchar"), strings.HasPrefix(dt, "varyingcharacter"), strings.HasPrefix(dt, "nchar"), strings.HasPrefix(dt, "nativecharacter"), strings.HasPrefix(dt, "nvarchar"), dt == "text", dt == "clob": 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: if debug.Active { log.Printf("unknown SQLite type: %s\n", dt) } return "interface{}" } } ================================================ FILE: internal/codegen/golang/struct.go ================================================ package golang import ( "strings" "unicode" "unicode/utf8" "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" "github.com/sqlc-dev/sqlc/internal/plugin" ) type Struct struct { Table *plugin.Identifier Name string Fields []Field Comment string } func StructName(name string, options *opts.Options) string { if rename := options.Rename[name]; rename != "" { return rename } out := "" name = strings.Map(func(r rune) rune { if unicode.IsLetter(r) { return r } if unicode.IsDigit(r) { return r } return rune('_') }, name) for _, p := range strings.Split(name, "_") { if _, found := options.InitialismsMap[p]; found { out += strings.ToUpper(p) } else { out += strings.Title(p) } } // If a name has a digit as its first char, prepand an underscore to make it a valid Go name. r, _ := utf8.DecodeRuneInString(out) if unicode.IsDigit(r) { return "_" + out } else { return out } } ================================================ FILE: internal/codegen/golang/template.go ================================================ package golang import "embed" //go:embed templates/* //go:embed templates/*/* var templates embed.FS ================================================ FILE: internal/codegen/golang/templates/go-sql-driver-mysql/copyfromCopy.tmpl ================================================ {{define "copyfromCodeGoSqlDriver"}} {{range .GoQueries}} {{if eq .Cmd ":copyfrom" }} var readerHandlerSequenceFor{{.MethodName}} uint32 = 1 func convertRowsFor{{.MethodName}}(w *io.PipeWriter, {{.Arg.SlicePair}}) { e := mysqltsv.NewEncoder(w, {{ len .Arg.CopyFromMySQLFields }}, nil) for _, row := range {{.Arg.Name}} { {{- with $arg := .Arg }} {{- range $arg.CopyFromMySQLFields}} {{- if eq .Type "string"}} 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 $arg.Struct}}row.{{.Name}}{{else}}row{{end}}) {{- end}} {{- end}} {{- end}} } w.CloseWithError(e.Close()) } {{range .Comments}}//{{.}} {{end -}} // {{.MethodName}} 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) {{.MethodName}}(ctx context.Context{{if $.EmitMethodsWithDBArgument}}, db DBTX{{end}}, {{.Arg.SlicePair}}) (int64, error) { pr, pw := io.Pipe() defer pr.Close() rh := fmt.Sprintf("{{.MethodName}}_%d", atomic.AddUint32(&readerHandlerSequenceFor{{.MethodName}}, 1)) mysql.RegisterReaderHandler(rh, func() io.Reader { return pr }) defer mysql.DeregisterReaderHandler(rh) go convertRowsFor{{.MethodName}}(pw, {{.Arg.Name}}) // The string interpolation is necessary because LOAD DATA INFILE requires // the file name to be given as a literal string. result, err := {{if (not $.EmitMethodsWithDBArgument)}}q.{{end}}db.ExecContext(ctx, fmt.Sprintf("LOAD DATA LOCAL INFILE '%s' INTO TABLE {{.TableIdentifierForMySQL}} %s ({{range $index, $name := .Arg.ColumnNames}}{{if gt $index 0}}, {{end}}{{$name}}{{end}})", "Reader::" + rh, mysqltsv.Escaping)) if err != nil { return 0, err } return result.RowsAffected() } {{end}} {{end}} {{end}} ================================================ FILE: internal/codegen/golang/templates/pgx/batchCode.tmpl ================================================ {{define "batchCodePgx"}} var ( ErrBatchAlreadyClosed = errors.New("batch already closed") ) {{range .GoQueries}} {{if eq (hasPrefix .Cmd ":batch") true }} const {{.ConstantName}} = {{$.Q}}-- name: {{.MethodName}} {{.Cmd}} {{escape .SQL}} {{$.Q}} type {{.MethodName}}BatchResults struct { br pgx.BatchResults tot int closed bool } {{if .Arg.Struct}} type {{.Arg.Type}} struct { {{- range .Arg.Struct.Fields}} {{.Name}} {{.Type}} {{if .Tag}}{{$.Q}}{{.Tag}}{{$.Q}}{{end}} {{- end}} } {{end}} {{if .Ret.EmitStruct}} type {{.Ret.Type}} struct { {{- range .Ret.Struct.Fields}} {{.Name}} {{.Type}} {{if .Tag}}{{$.Q}}{{.Tag}}{{$.Q}}{{end}} {{- end}} } {{end}} {{range .Comments}}//{{.}} {{end -}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{ if $.EmitMethodsWithDBArgument}}db DBTX,{{end}} {{.Arg.SlicePair}}) *{{.MethodName}}BatchResults { batch := &pgx.Batch{} for _, a := range {{index .Arg.Name}} { vals := []interface{}{ {{- if .Arg.Struct }} {{- range .Arg.Struct.Fields }} a.{{.Name}}, {{- end }} {{- else }} a, {{- end }} } batch.Queue({{.ConstantName}}, vals...) } br := {{if not $.EmitMethodsWithDBArgument}}q.{{end}}db.SendBatch(ctx, batch) return &{{.MethodName}}BatchResults{br,len({{.Arg.Name}}),false} } {{if eq .Cmd ":batchexec"}} func (b *{{.MethodName}}BatchResults) 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) } } } {{end}} {{if eq .Cmd ":batchmany"}} func (b *{{.MethodName}}BatchResults) Query(f func(int, []{{.Ret.DefineType}}, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { {{- if $.EmitEmptySlices}} items := []{{.Ret.DefineType}}{} {{else}} var items []{{.Ret.DefineType}} {{end -}} if b.closed { if f != nil { f(t, items, ErrBatchAlreadyClosed) } continue } err := func() error { rows, err := b.br.Query() if err != nil { return err } defer rows.Close() for rows.Next() { var {{.Ret.Name}} {{.Ret.Type}} if err := rows.Scan({{.Ret.Scan}}); err != nil { return err } items = append(items, {{.Ret.ReturnName}}) } return rows.Err() }() if f != nil { f(t, items, err) } } } {{end}} {{if eq .Cmd ":batchone"}} func (b *{{.MethodName}}BatchResults) QueryRow(f func(int, {{.Ret.DefineType}}, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var {{.Ret.Name}} {{.Ret.Type}} if b.closed { if f != nil { f(t, {{if .Ret.IsPointer}}nil{{else}}{{.Ret.Name}}{{end}}, ErrBatchAlreadyClosed) } continue } row := b.br.QueryRow() err := row.Scan({{.Ret.Scan}}) if f != nil { f(t, {{.Ret.ReturnName}}, err) } } } {{end}} func (b *{{.MethodName}}BatchResults) Close() error { b.closed = true return b.br.Close() } {{end}} {{end}} {{end}} ================================================ FILE: internal/codegen/golang/templates/pgx/copyfromCopy.tmpl ================================================ {{define "copyfromCodePgx"}} {{range .GoQueries}} {{if eq .Cmd ":copyfrom" }} // iteratorFor{{.MethodName}} implements pgx.CopyFromSource. type iteratorFor{{.MethodName}} struct { rows []{{.Arg.DefineType}} skippedFirstNextCall bool } func (r *iteratorFor{{.MethodName}}) Next() bool { if len(r.rows) == 0 { return false } if !r.skippedFirstNextCall { r.skippedFirstNextCall = true return true } r.rows = r.rows[1:] return len(r.rows) > 0 } func (r iteratorFor{{.MethodName}}) Values() ([]interface{}, error) { return []interface{}{ {{- if .Arg.Struct }} {{- range .Arg.Struct.Fields }} r.rows[0].{{.Name}}, {{- end }} {{- else }} r.rows[0], {{- end }} }, nil } func (r iteratorFor{{.MethodName}}) Err() error { return nil } {{range .Comments}}//{{.}} {{end -}} {{- if $.EmitMethodsWithDBArgument -}} func (q *Queries) {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.SlicePair}}) (int64, error) { return db.CopyFrom(ctx, {{.TableIdentifierAsGoSlice}}, {{.Arg.ColumnNamesAsGoSlice}}, &iteratorFor{{.MethodName}}{rows: {{.Arg.Name}}}) {{- else -}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{.Arg.SlicePair}}) (int64, error) { return q.db.CopyFrom(ctx, {{.TableIdentifierAsGoSlice}}, {{.Arg.ColumnNamesAsGoSlice}}, &iteratorFor{{.MethodName}}{rows: {{.Arg.Name}}}) {{- end}} } {{end}} {{end}} {{end}} ================================================ FILE: internal/codegen/golang/templates/pgx/dbCode.tmpl ================================================ {{define "dbCodeTemplatePgx"}} 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 {{- if .UsesCopyFrom }} CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) {{- end }} {{- if .UsesBatch }} SendBatch(context.Context, *pgx.Batch) pgx.BatchResults {{- end }} } {{ if .EmitMethodsWithDBArgument}} func New() *Queries { return &Queries{} {{- else -}} func New(db DBTX) *Queries { return &Queries{db: db} {{- end}} } type Queries struct { {{if not .EmitMethodsWithDBArgument}} db DBTX {{end}} } {{if not .EmitMethodsWithDBArgument}} func (q *Queries) WithTx(tx pgx.Tx) *Queries { return &Queries{ db: tx, } } {{end}} {{end}} ================================================ FILE: internal/codegen/golang/templates/pgx/interfaceCode.tmpl ================================================ {{define "interfaceCodePgx"}} type Querier interface { {{- $dbtxParam := .EmitMethodsWithDBArgument -}} {{- range .GoQueries}} {{- if and (eq .Cmd ":one") ($dbtxParam) }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) ({{.Ret.DefineType}}, error) {{- else if eq .Cmd ":one" }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) ({{.Ret.DefineType}}, error) {{- end}} {{- if and (eq .Cmd ":many") ($dbtxParam) }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) ([]{{.Ret.DefineType}}, error) {{- else if eq .Cmd ":many" }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) ([]{{.Ret.DefineType}}, error) {{- end}} {{- if and (eq .Cmd ":exec") ($dbtxParam) }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) error {{- else if eq .Cmd ":exec" }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) error {{- end}} {{- if and (eq .Cmd ":execrows") ($dbtxParam) }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) (int64, error) {{- else if eq .Cmd ":execrows" }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) (int64, error) {{- end}} {{- if and (eq .Cmd ":execresult") ($dbtxParam) }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) (pgconn.CommandTag, error) {{- else if eq .Cmd ":execresult" }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) (pgconn.CommandTag, error) {{- end}} {{- if and (eq .Cmd ":copyfrom") ($dbtxParam) }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.SlicePair}}) (int64, error) {{- else if eq .Cmd ":copyfrom" }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, {{.Arg.SlicePair}}) (int64, error) {{- end}} {{- if and (or (eq .Cmd ":batchexec") (eq .Cmd ":batchmany") (eq .Cmd ":batchone")) ($dbtxParam) }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.SlicePair}}) *{{.MethodName}}BatchResults {{- else if or (eq .Cmd ":batchexec") (eq .Cmd ":batchmany") (eq .Cmd ":batchone") }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, {{.Arg.SlicePair}}) *{{.MethodName}}BatchResults {{- end}} {{- end}} } var _ Querier = (*Queries)(nil) {{end}} ================================================ FILE: internal/codegen/golang/templates/pgx/queryCode.tmpl ================================================ {{define "queryCodePgx"}} {{range .GoQueries}} {{if $.OutputQuery .SourceName}} {{if and (ne .Cmd ":copyfrom") (ne (hasPrefix .Cmd ":batch") true)}} const {{.ConstantName}} = {{$.Q}}-- name: {{.MethodName}} {{.Cmd}} {{escape .SQL}} {{$.Q}} {{end}} {{if ne (hasPrefix .Cmd ":batch") true}} {{if .Arg.EmitStruct}} type {{.Arg.Type}} struct { {{- range .Arg.Struct.Fields}} {{.Name}} {{.Type}} {{if .Tag}}{{$.Q}}{{.Tag}}{{$.Q}}{{end}} {{- end}} } {{end}} {{if .Ret.EmitStruct}} type {{.Ret.Type}} struct { {{- range .Ret.Struct.Fields}} {{.Name}} {{.Type}} {{if .Tag}}{{$.Q}}{{.Tag}}{{$.Q}}{{end}} {{- end}} } {{end}} {{end}} {{if eq .Cmd ":one"}} {{range .Comments}}//{{.}} {{end -}} {{- if $.EmitMethodsWithDBArgument -}} func (q *Queries) {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) ({{.Ret.DefineType}}, error) { row := db.QueryRow(ctx, {{.ConstantName}}, {{.Arg.Params}}) {{- else -}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) ({{.Ret.DefineType}}, error) { row := q.db.QueryRow(ctx, {{.ConstantName}}, {{.Arg.Params}}) {{- end}} {{- if or (ne .Arg.Pair .Ret.Pair) (ne .Arg.DefineType .Ret.DefineType) }} 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}} {{if eq .Cmd ":many"}} {{range .Comments}}//{{.}} {{end -}} {{- if $.EmitMethodsWithDBArgument -}} func (q *Queries) {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) ([]{{.Ret.DefineType}}, error) { rows, err := db.Query(ctx, {{.ConstantName}}, {{.Arg.Params}}) {{- else -}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) ([]{{.Ret.DefineType}}, error) { rows, err := q.db.Query(ctx, {{.ConstantName}}, {{.Arg.Params}}) {{- end}} if err != nil { return nil, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } defer rows.Close() {{- if $.EmitEmptySlices}} items := []{{.Ret.DefineType}}{} {{else}} var items []{{.Ret.DefineType}} {{end -}} for rows.Next() { var {{.Ret.Name}} {{.Ret.Type}} if err := rows.Scan({{.Ret.Scan}}); err != nil { 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, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } return items, nil } {{end}} {{if eq .Cmd ":exec"}} {{range .Comments}}//{{.}} {{end -}} {{- if $.EmitMethodsWithDBArgument -}} func (q *Queries) {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) error { _, err := db.Exec(ctx, {{.ConstantName}}, {{.Arg.Params}}) {{- else -}} 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}} {{if eq .Cmd ":execrows"}} {{range .Comments}}//{{.}} {{end -}} {{if $.EmitMethodsWithDBArgument -}} func (q *Queries) {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) (int64, error) { result, err := db.Exec(ctx, {{.ConstantName}}, {{.Arg.Params}}) {{- else -}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) (int64, error) { result, err := q.db.Exec(ctx, {{.ConstantName}}, {{.Arg.Params}}) {{- end}} if err != nil { return 0, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } return result.RowsAffected(), nil } {{end}} {{if eq .Cmd ":execresult"}} {{range .Comments}}//{{.}} {{end -}} {{- if $.EmitMethodsWithDBArgument -}} func (q *Queries) {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) (pgconn.CommandTag, error) { {{queryRetval .}} db.Exec(ctx, {{.ConstantName}}, {{.Arg.Params}}) {{- else -}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) (pgconn.CommandTag, error) { {{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}} {{end}} {{end}} {{end}} ================================================ FILE: internal/codegen/golang/templates/stdlib/dbCode.tmpl ================================================ {{define "dbCodeTemplateStd"}} 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 } {{ if .EmitMethodsWithDBArgument}} func New() *Queries { return &Queries{} {{- else -}} func New(db DBTX) *Queries { return &Queries{db: db} {{- end}} } {{if .EmitPreparedQueries}} func Prepare(ctx context.Context, db DBTX) (*Queries, error) { q := Queries{db: db} var err error {{- if eq (len .GoQueries) 0 }} _ = err {{- end }} {{- range .GoQueries }} if q.{{.FieldName}}, err = db.PrepareContext(ctx, {{.ConstantName}}); err != nil { return nil, fmt.Errorf("error preparing query {{.MethodName}}: %w", err) } {{- end}} return &q, nil } func (q *Queries) Close() error { var err error {{- range .GoQueries }} if q.{{.FieldName}} != nil { if cerr := q.{{.FieldName}}.Close(); cerr != nil { err = fmt.Errorf("error closing {{.FieldName}}: %w", cerr) } } {{- end}} return err } func (q *Queries) exec(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) (sql.Result, error) { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).ExecContext(ctx, args...) case stmt != nil: return stmt.ExecContext(ctx, args...) default: return q.db.ExecContext(ctx, query, args...) } } func (q *Queries) query(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) (*sql.Rows, error) { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).QueryContext(ctx, args...) case stmt != nil: return stmt.QueryContext(ctx, args...) default: return q.db.QueryContext(ctx, query, args...) } } func (q *Queries) queryRow(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) (*sql.Row) { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).QueryRowContext(ctx, args...) case stmt != nil: return stmt.QueryRowContext(ctx, args...) default: return q.db.QueryRowContext(ctx, query, args...) } } {{end}} type Queries struct { {{- if not .EmitMethodsWithDBArgument}} db DBTX {{- end}} {{- if .EmitPreparedQueries}} tx *sql.Tx {{- range .GoQueries}} {{.FieldName}} *sql.Stmt {{- end}} {{- end}} } {{if not .EmitMethodsWithDBArgument}} func (q *Queries) WithTx(tx *sql.Tx) *Queries { return &Queries{ db: tx, {{- if .EmitPreparedQueries}} tx: tx, {{- range .GoQueries}} {{.FieldName}}: q.{{.FieldName}}, {{- end}} {{- end}} } } {{end}} {{end}} ================================================ FILE: internal/codegen/golang/templates/stdlib/interfaceCode.tmpl ================================================ {{define "interfaceCodeStd"}} type Querier interface { {{- $dbtxParam := .EmitMethodsWithDBArgument -}} {{- range .GoQueries}} {{- if and (eq .Cmd ":one") ($dbtxParam) }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) ({{.Ret.DefineType}}, error) {{- else if eq .Cmd ":one"}} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) ({{.Ret.DefineType}}, error) {{- end}} {{- if and (eq .Cmd ":many") ($dbtxParam) }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) ([]{{.Ret.DefineType}}, error) {{- else if eq .Cmd ":many"}} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) ([]{{.Ret.DefineType}}, error) {{- end}} {{- if and (eq .Cmd ":exec") ($dbtxParam) }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) error {{- else if eq .Cmd ":exec"}} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) error {{- end}} {{- if and (eq .Cmd ":execrows") ($dbtxParam) }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) (int64, error) {{- else if eq .Cmd ":execrows"}} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) (int64, error) {{- end}} {{- if and (eq .Cmd ":execlastid") ($dbtxParam) }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) (int64, error) {{- else if eq .Cmd ":execlastid"}} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) (int64, error) {{- end}} {{- if and (eq .Cmd ":execresult") ($dbtxParam) }} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, db DBTX, {{.Arg.Pair}}) (sql.Result, error) {{- else if eq .Cmd ":execresult"}} {{range .Comments}}//{{.}} {{end -}} {{.MethodName}}(ctx context.Context, {{.Arg.Pair}}) (sql.Result, error) {{- end}} {{- end}} } var _ Querier = (*Queries)(nil) {{end}} ================================================ FILE: internal/codegen/golang/templates/stdlib/queryCode.tmpl ================================================ {{define "queryCodeStd"}} {{range .GoQueries}} {{if $.OutputQuery .SourceName}} const {{.ConstantName}} = {{$.Q}}-- name: {{.MethodName}} {{.Cmd}} {{escape .SQL}} {{$.Q}} {{if .Arg.EmitStruct}} type {{.Arg.Type}} struct { {{- range .Arg.UniqueFields}} {{.Name}} {{.Type}} {{if .Tag}}{{$.Q}}{{.Tag}}{{$.Q}}{{end}} {{- end}} } {{end}} {{if .Ret.EmitStruct}} type {{.Ret.Type}} struct { {{- range .Ret.Struct.Fields}} {{.Name}} {{.Type}} {{if .Tag}}{{$.Q}}{{.Tag}}{{$.Q}}{{end}} {{- end}} } {{end}} {{if eq .Cmd ":one"}} {{range .Comments}}//{{.}} {{end -}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}}) ({{.Ret.DefineType}}, error) { {{- template "queryCodeStdExec" . }} {{- if or (ne .Arg.Pair .Ret.Pair) (ne .Arg.DefineType .Ret.DefineType) }} 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}} {{if eq .Cmd ":many"}} {{range .Comments}}//{{.}} {{end -}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}}) ([]{{.Ret.DefineType}}, error) { {{- template "queryCodeStdExec" . }} if err != nil { return nil, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } defer rows.Close() {{- if $.EmitEmptySlices}} items := []{{.Ret.DefineType}}{} {{else}} var items []{{.Ret.DefineType}} {{end -}} for rows.Next() { var {{.Ret.Name}} {{.Ret.Type}} if err := rows.Scan({{.Ret.Scan}}); err != nil { 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, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } if err := rows.Err(); err != nil { return nil, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } return items, nil } {{end}} {{if eq .Cmd ":exec"}} {{range .Comments}}//{{.}} {{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}} {{if eq .Cmd ":execrows"}} {{range .Comments}}//{{.}} {{end -}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}}) (int64, error) { {{- template "queryCodeStdExec" . }} if err != nil { return 0, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } return result.RowsAffected() } {{end}} {{if eq .Cmd ":execlastid"}} {{range .Comments}}//{{.}} {{end -}} func (q *Queries) {{.MethodName}}(ctx context.Context, {{ dbarg }} {{.Arg.Pair}}) (int64, error) { {{- template "queryCodeStdExec" . }} if err != nil { return 0, {{if $.WrapErrors}}fmt.Errorf("query {{.MethodName}}: %w", err){{else}}err{{end}} } return result.LastInsertId() } {{end}} {{if eq .Cmd ":execresult"}} {{range .Comments}}//{{.}} {{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}} {{end}} {{end}} {{end}} {{define "queryCodeStdExec"}} {{- if .Arg.HasSqlcSlices }} query := {{.ConstantName}} var queryParams []interface{} {{- if .Arg.Struct }} {{- $arg := .Arg }} {{- range .Arg.Struct.Fields }} {{- if .HasSqlcSlice }} if len({{$arg.VariableForField .}}) > 0 { for _, v := range {{$arg.VariableForField .}} { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:{{.Column.Name}}*/?", strings.Repeat(",?", len({{$arg.VariableForField .}}))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:{{.Column.Name}}*/?", "NULL", 1) } {{- else }} queryParams = append(queryParams, {{$arg.VariableForField .}}) {{- end }} {{- end }} {{- else }} {{- /* Single argument parameter to this goroutine (they are not packed in a struct), because .Arg.HasSqlcSlices further up above was true, this section is 100% a slice (impossible to get here otherwise). */}} if len({{.Arg.Name}}) > 0 { for _, v := range {{.Arg.Name}} { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:{{.Arg.Column.Name}}*/?", strings.Repeat(",?", len({{.Arg.Name}}))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:{{.Arg.Column.Name}}*/?", "NULL", 1) } {{- end }} {{- if emitPreparedQueries }} {{ queryRetval . }} {{ queryMethod . }}(ctx, nil, query, queryParams...) {{- else}} {{ queryRetval . }} {{ queryMethod . }}(ctx, query, queryParams...) {{- end -}} {{- else if emitPreparedQueries }} {{- queryRetval . }} {{ queryMethod . }}(ctx, q.{{.FieldName}}, {{.ConstantName}}, {{.Arg.Params}}) {{- else}} {{- queryRetval . }} {{ queryMethod . }}(ctx, {{.ConstantName}}, {{.Arg.Params}}) {{- end -}} {{end}} ================================================ FILE: internal/codegen/golang/templates/template.tmpl ================================================ {{define "dbFile"}} {{if .BuildTags}} //go:build {{.BuildTags}} {{end}}// Code generated by sqlc. DO NOT EDIT. {{if not .OmitSqlcVersion}}// versions: // sqlc {{.SqlcVersion}} {{end}} package {{.Package}} {{ if hasImports .SourceName }} import ( {{range imports .SourceName}} {{range .}}{{.}} {{end}} {{end}} ) {{end}} {{template "dbCode" . }} {{end}} {{define "dbCode"}} {{if .SQLDriver.IsPGX }} {{- template "dbCodeTemplatePgx" .}} {{else}} {{- template "dbCodeTemplateStd" .}} {{end}} {{end}} {{define "interfaceFile"}} {{if .BuildTags}} //go:build {{.BuildTags}} {{end}}// Code generated by sqlc. DO NOT EDIT. {{if not .OmitSqlcVersion}}// versions: // sqlc {{.SqlcVersion}} {{end}} package {{.Package}} {{ if hasImports .SourceName }} import ( {{range imports .SourceName}} {{range .}}{{.}} {{end}} {{end}} ) {{end}} {{template "interfaceCode" . }} {{end}} {{define "interfaceCode"}} {{if .SQLDriver.IsPGX }} {{- template "interfaceCodePgx" .}} {{else}} {{- template "interfaceCodeStd" .}} {{end}} {{end}} {{define "modelsFile"}} {{if .BuildTags}} //go:build {{.BuildTags}} {{end}}// Code generated by sqlc. DO NOT EDIT. {{if not .OmitSqlcVersion}}// versions: // sqlc {{.SqlcVersion}} {{end}} package {{.Package}} {{ if hasImports .SourceName }} import ( {{range imports .SourceName}} {{range .}}{{.}} {{end}} {{end}} ) {{end}} {{template "modelsCode" . }} {{end}} {{define "modelsCode"}} {{range .Enums}} {{if .Comment}}{{comment .Comment}}{{end}} type {{.Name}} string const ( {{- range .Constants}} {{.Name}} {{.Type}} = "{{.Value}}" {{- end}} ) func (e *{{.Name}}) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = {{.Name}}(s) case string: *e = {{.Name}}(s) default: return fmt.Errorf("unsupported scan type for {{.Name}}: %T", src) } return nil } type Null{{.Name}} struct { {{.Name}} {{.Name}} {{if .NameTag}}{{$.Q}}{{.NameTag}}{{$.Q}}{{end}} Valid bool {{if .ValidTag}}{{$.Q}}{{.ValidTag}}{{$.Q}}{{end}} // Valid is true if {{.Name}} is not NULL } // Scan implements the Scanner interface. func (ns *Null{{.Name}}) Scan(value interface{}) error { if value == nil { ns.{{.Name}}, ns.Valid = "", false return nil } ns.Valid = true return ns.{{.Name}}.Scan(value) } // Value implements the driver Valuer interface. func (ns Null{{.Name}}) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.{{.Name}}), nil } {{ if $.EmitEnumValidMethod }} func (e {{.Name}}) Valid() bool { switch e { case {{ range $idx, $name := .Constants }}{{ if ne $idx 0 }},{{ "\n" }}{{ end }}{{ .Name }}{{ end }}: return true } return false } {{ end }} {{ if $.EmitAllEnumValues }} func All{{ .Name }}Values() []{{ .Name }} { return []{{ .Name }}{ {{ range .Constants}}{{ "\n" }}{{ .Name }},{{ end }} } } {{ end }} {{end}} {{range .Structs}} {{if .Comment}}{{comment .Comment}}{{end}} type {{.Name}} struct { {{- range .Fields}} {{- if .Comment}} {{comment .Comment}}{{else}} {{- end}} {{.Name}} {{.Type}} {{if .Tag}}{{$.Q}}{{.Tag}}{{$.Q}}{{end}} {{- end}} } {{end}} {{end}} {{define "queryFile"}} {{if .BuildTags}} //go:build {{.BuildTags}} {{end}}// Code generated by sqlc. DO NOT EDIT. {{if not .OmitSqlcVersion}}// versions: // sqlc {{.SqlcVersion}} {{end}}// source: {{.SourceName}} package {{.Package}} {{ if hasImports .SourceName }} import ( {{range imports .SourceName}} {{range .}}{{.}} {{end}} {{end}} ) {{end}} {{template "queryCode" . }} {{end}} {{define "queryCode"}} {{if .SQLDriver.IsPGX }} {{- template "queryCodePgx" .}} {{else}} {{- template "queryCodeStd" .}} {{end}} {{end}} {{define "copyfromFile"}} {{if .BuildTags}} //go:build {{.BuildTags}} {{end}}// Code generated by sqlc. DO NOT EDIT. {{if not .OmitSqlcVersion}}// versions: // sqlc {{.SqlcVersion}} {{end}}// source: {{.SourceName}} package {{.Package}} {{ if hasImports .SourceName }} import ( {{range imports .SourceName}} {{range .}}{{.}} {{end}} {{end}} ) {{end}} {{template "copyfromCode" . }} {{end}} {{define "copyfromCode"}} {{if .SQLDriver.IsPGX }} {{- template "copyfromCodePgx" .}} {{else if .SQLDriver.IsGoSQLDriverMySQL }} {{- template "copyfromCodeGoSqlDriver" .}} {{end}} {{end}} {{define "batchFile"}} {{if .BuildTags}} //go:build {{.BuildTags}} {{end}}// Code generated by sqlc. DO NOT EDIT. {{if not .OmitSqlcVersion}}// versions: // sqlc {{.SqlcVersion}} {{end}}// source: {{.SourceName}} package {{.Package}} {{ if hasImports .SourceName }} import ( {{range imports .SourceName}} {{range .}}{{.}} {{end}} {{end}} ) {{end}} {{template "batchCode" . }} {{end}} {{define "batchCode"}} {{if .SQLDriver.IsPGX }} {{- template "batchCodePgx" .}} {{end}} {{end}} ================================================ FILE: internal/codegen/json/gen.go ================================================ package json import ( "bytes" "context" ejson "encoding/json" "fmt" "google.golang.org/protobuf/encoding/protojson" "github.com/sqlc-dev/sqlc/internal/plugin" ) func parseOptions(req *plugin.GenerateRequest) (*opts, error) { if len(req.PluginOptions) == 0 { return new(opts), nil } var options *opts dec := ejson.NewDecoder(bytes.NewReader(req.PluginOptions)) dec.DisallowUnknownFields() if err := dec.Decode(&options); err != nil { return options, fmt.Errorf("unmarshalling options: %s", err) } return options, nil } func Generate(ctx context.Context, req *plugin.GenerateRequest) (*plugin.GenerateResponse, error) { options, err := parseOptions(req) if err != nil { return nil, err } indent := " " if options.Indent != "" { indent = options.Indent } filename := "codegen_request.json" if options.Filename != "" { filename = options.Filename } // The output of protojson has randomized whitespace // https://github.com/golang/protobuf/issues/1082 m := &protojson.MarshalOptions{ EmitUnpopulated: true, Indent: "", UseProtoNames: true, } data, err := m.Marshal(req) if err != nil { return nil, err } var rm ejson.RawMessage = data blob, err := ejson.MarshalIndent(rm, "", indent) if err != nil { return nil, err } return &plugin.GenerateResponse{ Files: []*plugin.File{ { Name: filename, Contents: append(blob, '\n'), }, }, }, nil } ================================================ FILE: internal/codegen/json/opts.go ================================================ package json type opts struct { Out string `json:"out"` Indent string `json:"indent,omitempty"` Filename string `json:"filename,omitempty"` } ================================================ FILE: internal/codegen/sdk/sdk.go ================================================ package sdk import ( "github.com/sqlc-dev/sqlc/internal/pattern" "github.com/sqlc-dev/sqlc/internal/plugin" ) func DataType(n *plugin.Identifier) string { if n.Schema != "" { return n.Schema + "." + n.Name } else { return n.Name } } func MatchString(pat, target string) bool { matcher, err := pattern.MatchCompile(pat) if err != nil { panic(err) } return matcher.MatchString(target) } func SameTableName(tableID, f *plugin.Identifier, defaultSchema string) bool { if tableID == nil { return false } schema := tableID.Schema if tableID.Schema == "" { schema = defaultSchema } return tableID.Catalog == f.Catalog && schema == f.Schema && tableID.Name == f.Name } ================================================ FILE: internal/codegen/sdk/utils.go ================================================ package sdk import ( "strings" "unicode" ) func LowerTitle(s string) string { if s == "" { return s } a := []rune(s) a[0] = unicode.ToLower(a[0]) return string(a) } func Title(s string) string { return strings.Title(s) } // Go string literals cannot contain backtick. If a string contains // a backtick, replace it the following way: // // input: // // SELECT `group` FROM foo // // output: // // 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 { return strings.Replace(s, "`", "`+\"`\"+`", -1) } func DoubleSlashComment(s string) string { return "// " + strings.ReplaceAll(s, "\n", "\n// ") } ================================================ FILE: internal/codegen/sdk/utils_test.go ================================================ package sdk import ( "testing" ) func TestLowerTitle(t *testing.T) { // empty if LowerTitle("") != "" { t.Fatal("expected empty title to remain empty") } // all lowercase if LowerTitle("lowercase") != "lowercase" { t.Fatal("expected no changes when input is all lowercase") } // all uppercase if LowerTitle("UPPERCASE") != "uPPERCASE" { t.Fatal("expected first rune to be lower when input is all uppercase") } // Title Case if LowerTitle("Title Case") != "title Case" { t.Fatal("expected first rune to be lower when input is Title Case") } } ================================================ FILE: internal/compiler/analyze.go ================================================ package compiler import ( "sort" analyzer "github.com/sqlc-dev/sqlc/internal/analysis" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/named" "github.com/sqlc-dev/sqlc/internal/sql/rewrite" "github.com/sqlc-dev/sqlc/internal/sql/validate" ) type analysis struct { Table *ast.TableName Columns []*Column Parameters []Parameter Named *named.ParamSet Query string } func convertTableName(id *analyzer.Identifier) *ast.TableName { if id == nil { return nil } return &ast.TableName{ Catalog: id.Catalog, Schema: id.Schema, Name: id.Name, } } func convertTypeName(id *analyzer.Identifier) *ast.TypeName { if id == nil { return nil } return &ast.TypeName{ Catalog: id.Catalog, Schema: id.Schema, Name: id.Name, } } func convertColumn(c *analyzer.Column) *Column { length := int(c.Length) return &Column{ Name: c.Name, OriginalName: c.OriginalName, DataType: c.DataType, NotNull: c.NotNull, Unsigned: c.Unsigned, IsArray: c.IsArray, ArrayDims: int(c.ArrayDims), Comment: c.Comment, Length: &length, IsNamedParam: c.IsNamedParam, IsFuncCall: c.IsFuncCall, Scope: c.Scope, Table: convertTableName(c.Table), TableAlias: c.TableAlias, Type: convertTypeName(c.Type), EmbedTable: convertTableName(c.EmbedTable), IsSqlcSlice: c.IsSqlcSlice, } } func combineAnalysis(prev *analysis, a *analyzer.Analysis) *analysis { var cols []*Column for _, c := range a.Columns { cols = append(cols, convertColumn(c)) } var params []Parameter for _, p := range a.Params { params = append(params, Parameter{ Number: int(p.Number), Column: convertColumn(p.Column), }) } if len(prev.Columns) == len(cols) { for i := range prev.Columns { // Only override column types if the analyzer provides a specific type // (not "any"), since the catalog-based inference may have better info if cols[i].DataType != "any" { prev.Columns[i].DataType = cols[i].DataType prev.Columns[i].IsArray = cols[i].IsArray prev.Columns[i].ArrayDims = cols[i].ArrayDims } } } else { embedding := false for i := range prev.Columns { if prev.Columns[i].EmbedTable != nil { embedding = true } } if !embedding { prev.Columns = cols } } if len(prev.Parameters) == len(params) { for i := range prev.Parameters { // Only override parameter types if the analyzer provides a specific type // (not "any"), since the catalog-based inference may have better info if params[i].Column.DataType != "any" { prev.Parameters[i].Column.DataType = params[i].Column.DataType prev.Parameters[i].Column.IsArray = params[i].Column.IsArray prev.Parameters[i].Column.ArrayDims = params[i].Column.ArrayDims } } } else { prev.Parameters = params } return prev } func (c *Compiler) analyzeQuery(raw *ast.RawStmt, query string) (*analysis, error) { return c._analyzeQuery(raw, query, true) } func (c *Compiler) inferQuery(raw *ast.RawStmt, query string) (*analysis, error) { return c._analyzeQuery(raw, query, false) } func (c *Compiler) _analyzeQuery(raw *ast.RawStmt, query string, failfast bool) (*analysis, error) { errors := make([]error, 0) check := func(err error) error { if failfast { return err } if err != nil { errors = append(errors, err) } return nil } numbers, dollar, err := validate.ParamRef(raw) if err := check(err); err != nil { return nil, err } raw, namedParams, edits := rewrite.NamedParameters(c.conf.Engine, raw, numbers, dollar) var table *ast.TableName switch n := raw.Stmt.(type) { case *ast.InsertStmt: if err := check(validate.InsertStmt(n)); err != nil { return nil, err } var err error table, err = ParseTableName(n.Relation) if err := check(err); err != nil { return nil, err } } if err := check(validate.FuncCall(c.catalog, c.combo, raw)); err != nil { return nil, err } if err := check(validate.In(c.catalog, raw)); err != nil { return nil, err } rvs := rangeVars(raw.Stmt) refs, errs := findParameters(raw.Stmt) if len(errs) > 0 { if failfast { return nil, errs[0] } errors = append(errors, errs...) } refs = uniqueParamRefs(refs, dollar) if c.conf.Engine == config.EngineMySQL || !dollar { sort.Slice(refs, func(i, j int) bool { return refs[i].ref.Location < refs[j].ref.Location }) } else { sort.Slice(refs, func(i, j int) bool { return refs[i].ref.Number < refs[j].ref.Number }) } raw, embeds := rewrite.Embeds(raw) qc, err := c.buildQueryCatalog(c.catalog, raw.Stmt, embeds) if err := check(err); err != nil { return nil, err } params, err := c.resolveCatalogRefs(qc, rvs, refs, namedParams, embeds) if err := check(err); err != nil { return nil, err } cols, err := c.outputColumns(qc, raw.Stmt) if err := check(err); err != nil { return nil, err } expandEdits, err := c.expand(qc, raw) if check(err); err != nil { return nil, err } edits = append(edits, expandEdits...) expanded, err := source.Mutate(query, edits) if err != nil { return nil, err } var rerr error if len(errors) > 0 { rerr = errors[0] } return &analysis{ Table: table, Columns: cols, Parameters: params, Query: expanded, Named: namedParams, }, rerr } ================================================ FILE: internal/compiler/compat.go ================================================ package compiler import ( "fmt" "strings" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" ) // This is mainly copy-pasted from internal/postgresql/parse.go func stringSlice(list *ast.List) []string { items := []string{} for _, item := range list.Items { if n, ok := item.(*ast.String); ok { items = append(items, n.Str) } } return items } type Relation struct { Catalog string Schema string Name string } func parseRelation(node ast.Node) (*Relation, error) { switch n := node.(type) { case *ast.Boolean: if n == nil { return nil, fmt.Errorf("unexpected nil in %T node", n) } return &Relation{Name: "bool"}, nil case *ast.List: if n == nil { return nil, fmt.Errorf("unexpected nil in %T node", n) } parts := stringSlice(n) switch len(parts) { case 1: return &Relation{ Name: parts[0], }, nil case 2: return &Relation{ Schema: parts[0], Name: parts[1], }, nil case 3: return &Relation{ Catalog: parts[0], Schema: parts[1], Name: parts[2], }, nil default: return nil, fmt.Errorf("invalid name: %s", astutils.Join(n, ".")) } case *ast.RangeVar: if n == nil { return nil, fmt.Errorf("unexpected nil in %T node", n) } name := Relation{} if n.Catalogname != nil { name.Catalog = *n.Catalogname } if n.Schemaname != nil { name.Schema = *n.Schemaname } if n.Relname != nil { name.Name = *n.Relname } return &name, nil case *ast.TypeName: if n == nil { return nil, fmt.Errorf("unexpected nil in %T node", n) } if n.Names != nil { return parseRelation(n.Names) } else { return &Relation{Name: n.Name}, nil } default: return nil, fmt.Errorf("unexpected node type: %T", node) } } func ParseTableName(node ast.Node) (*ast.TableName, error) { rel, err := parseRelation(node) if err != nil { return nil, fmt.Errorf("parse table name: %w", err) } return &ast.TableName{ Catalog: rel.Catalog, Schema: rel.Schema, Name: rel.Name, }, nil } func ParseTypeName(node ast.Node) (*ast.TypeName, error) { rel, err := parseRelation(node) if err != nil { return nil, fmt.Errorf("parse type name: %w", err) } return &ast.TypeName{ Catalog: rel.Catalog, Schema: rel.Schema, Name: rel.Name, }, nil } func ParseRelationString(name string) (*Relation, error) { parts := strings.Split(name, ".") switch len(parts) { case 1: return &Relation{ Name: parts[0], }, nil case 2: return &Relation{ Schema: parts[0], Name: parts[1], }, nil case 3: return &Relation{ Catalog: parts[0], Schema: parts[1], Name: parts[2], }, nil default: return nil, fmt.Errorf("invalid name: %s", name) } } ================================================ FILE: internal/compiler/compile.go ================================================ package compiler import ( "context" "errors" "fmt" "io" "os" "path/filepath" "strings" "github.com/sqlc-dev/sqlc/internal/migrations" "github.com/sqlc-dev/sqlc/internal/multierr" "github.com/sqlc-dev/sqlc/internal/opts" "github.com/sqlc-dev/sqlc/internal/rpc" "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" ) // TODO: Rename this interface Engine type Parser interface { Parse(io.Reader) ([]ast.Statement, error) CommentSyntax() source.CommentSyntax IsReservedKeyword(string) bool } func (c *Compiler) parseCatalog(schemas []string) error { files, err := sqlpath.Glob(schemas) if err != nil { return err } merr := multierr.New() for _, filename := range files { blob, err := os.ReadFile(filename) if err != nil { merr.Add(filename, "", 0, err) continue } contents := migrations.RemoveRollbackStatements(string(blob)) c.schema = append(c.schema, contents) // In database-only mode, we parse the schema to validate syntax // but don't update the catalog - the database will be the source of truth stmts, err := c.parser.Parse(strings.NewReader(contents)) if err != nil { merr.Add(filename, contents, 0, err) continue } // Skip catalog updates in database-only mode if c.databaseOnlyMode { continue } for i := range stmts { if err := c.catalog.Update(stmts[i], c); err != nil { merr.Add(filename, contents, stmts[i].Pos(), err) continue } } } if len(merr.Errs()) > 0 { return merr } return nil } func (c *Compiler) parseQueries(o opts.Parser) (*Result, error) { ctx := context.Background() // In database-only mode, initialize the database connection before parsing queries if c.databaseOnlyMode && c.analyzer != nil { if err := c.analyzer.EnsureConn(ctx, c.schema); err != nil { return nil, fmt.Errorf("failed to initialize database connection: %w", err) } } var q []*Query merr := multierr.New() set := map[string]struct{}{} files, err := sqlpath.Glob(c.conf.Queries) if err != nil { return nil, err } for _, filename := range files { blob, err := os.ReadFile(filename) if err != nil { merr.Add(filename, "", 0, err) continue } src := string(blob) stmts, err := c.parser.Parse(strings.NewReader(src)) if err != nil { merr.Add(filename, src, 0, err) continue } for _, stmt := range stmts { query, err := c.parseQuery(stmt.Raw, src, o) if err != nil { var e *sqlerr.Error loc := stmt.Raw.Pos() if errors.As(err, &e) && e.Location != 0 { loc = e.Location } merr.Add(filename, src, loc, err) // If this rpc unauthenticated error bubbles up, then all future parsing/analysis will fail if errors.Is(err, rpc.ErrUnauthenticated) { return nil, merr } continue } if query == nil { continue } query.Metadata.Filename = filepath.Base(filename) queryName := query.Metadata.Name if queryName != "" { if _, exists := set[queryName]; exists { merr.Add(filename, src, stmt.Raw.Pos(), fmt.Errorf("duplicate query name: %s", queryName)) continue } set[queryName] = struct{}{} } q = append(q, query) } } if len(merr.Errs()) > 0 { return nil, merr } if len(q) == 0 { return nil, fmt.Errorf("no queries contained in paths %s", strings.Join(c.conf.Queries, ",")) } return &Result{ Catalog: c.catalog, Queries: q, }, nil } ================================================ FILE: internal/compiler/engine.go ================================================ package compiler import ( "context" "fmt" "github.com/sqlc-dev/sqlc/internal/analyzer" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/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" sqliteanalyze "github.com/sqlc-dev/sqlc/internal/engine/sqlite/analyzer" "github.com/sqlc-dev/sqlc/internal/opts" "github.com/sqlc-dev/sqlc/internal/sql/catalog" "github.com/sqlc-dev/sqlc/internal/x/expander" ) type Compiler struct { conf config.SQL combo config.CombinedSettings catalog *catalog.Catalog parser Parser result *Result analyzer analyzer.Analyzer client dbmanager.Client selector selector schema []string // databaseOnlyMode indicates that the compiler should use database-only analysis // and skip building the internal catalog from schema files (analyzer.database: only) databaseOnlyMode bool // expander is used to expand SELECT * and RETURNING * in database-only mode expander *expander.Expander } func NewCompiler(conf config.SQL, combo config.CombinedSettings, parserOpts opts.Parser) (*Compiler, error) { c := &Compiler{conf: conf, combo: combo} if conf.Database != nil && conf.Database.Managed { client := dbmanager.NewClient(combo.Global.Servers) c.client = client } // Check for database-only mode (analyzer.database: only) // This feature requires the analyzerv2 experiment to be enabled databaseOnlyMode := conf.Analyzer.Database.IsOnly() && parserOpts.Experiment.AnalyzerV2 switch conf.Engine { case config.EngineSQLite: parser := sqlite.NewParser() c.parser = parser c.catalog = sqlite.NewCatalog() c.selector = newSQLiteSelector() if databaseOnlyMode { // Database-only mode requires a database connection if conf.Database == nil { return nil, fmt.Errorf("analyzer.database: only requires database configuration") } if conf.Database.URI == "" && !conf.Database.Managed { return nil, fmt.Errorf("analyzer.database: only requires database.uri or database.managed") } c.databaseOnlyMode = true // Create the SQLite analyzer (implements Analyzer interface) sqliteAnalyzer := sqliteanalyze.New(*conf.Database) c.analyzer = analyzer.Cached(sqliteAnalyzer, combo.Global, *conf.Database) // Create the expander using the analyzer as the column getter c.expander = expander.New(c.analyzer, parser, parser) } else if conf.Database != nil { if conf.Analyzer.Database.IsEnabled() { c.analyzer = analyzer.Cached( sqliteanalyze.New(*conf.Database), combo.Global, *conf.Database, ) } } case config.EngineMySQL: c.parser = dolphin.NewParser() c.catalog = dolphin.NewCatalog() c.selector = newDefaultSelector() case config.EnginePostgreSQL: parser := postgresql.NewParser() c.parser = parser c.catalog = postgresql.NewCatalog() c.selector = newDefaultSelector() if databaseOnlyMode { // Database-only mode requires a database connection if conf.Database == nil { return nil, fmt.Errorf("analyzer.database: only requires database configuration") } if conf.Database.URI == "" && !conf.Database.Managed { return nil, fmt.Errorf("analyzer.database: only requires database.uri or database.managed") } c.databaseOnlyMode = true // Create the PostgreSQL analyzer (implements Analyzer interface) pgAnalyzer := pganalyze.New(c.client, *conf.Database) c.analyzer = analyzer.Cached(pgAnalyzer, combo.Global, *conf.Database) // Create the expander using the analyzer as the column getter c.expander = expander.New(c.analyzer, parser, parser) } else if conf.Database != nil { if conf.Analyzer.Database.IsEnabled() { c.analyzer = analyzer.Cached( pganalyze.New(c.client, *conf.Database), combo.Global, *conf.Database, ) } } default: return nil, fmt.Errorf("unknown engine: %s", conf.Engine) } return c, nil } func (c *Compiler) Catalog() *catalog.Catalog { return c.catalog } func (c *Compiler) ParseCatalog(schema []string) error { return c.parseCatalog(schema) } func (c *Compiler) ParseQueries(queries []string, o opts.Parser) error { r, err := c.parseQueries(o) if err != nil { return err } c.result = r return nil } func (c *Compiler) Result() *Result { return c.result } func (c *Compiler) Close(ctx context.Context) { if c.analyzer != nil { c.analyzer.Close(ctx) } if c.client != nil { c.client.Close(ctx) } } ================================================ FILE: internal/compiler/expand.go ================================================ package compiler import ( "fmt" "regexp" "strings" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" ) func (c *Compiler) expand(qc *QueryCatalog, raw *ast.RawStmt) ([]source.Edit, error) { // Return early if there are no A_Star nodes to expand stars := astutils.Search(raw, func(node ast.Node) bool { _, ok := node.(*ast.A_Star) return ok }) if len(stars.Items) == 0 { return nil, nil } list := astutils.Search(raw, func(node ast.Node) bool { switch node.(type) { case *ast.DeleteStmt: case *ast.InsertStmt: case *ast.SelectStmt: case *ast.UpdateStmt: default: return false } return true }) if len(list.Items) == 0 { return nil, nil } var edits []source.Edit for _, item := range list.Items { edit, err := c.expandStmt(qc, raw, item) if err != nil { return nil, err } edits = append(edits, edit...) } return edits, nil } var validPostgresIdent = regexp.MustCompile(`^[a-z_][a-z0-9_$]*$`) func (c *Compiler) quoteIdent(ident string) string { if c.parser.IsReservedKeyword(ident) { return c.quote(ident) } // SQL identifiers and key words must begin with a letter (a-z, but also // letters with diacritical marks and non-Latin letters) or an underscore // (_). Subsequent characters in an identifier or key word can be letters, // underscores, digits (0-9), or dollar signs ($). // // https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS if c.conf.Engine == config.EnginePostgreSQL { // camelCase means the column is also camelCase if strings.ToLower(ident) != ident { return c.quote(ident) } if !validPostgresIdent.MatchString(strings.ToLower(ident)) { return c.quote(ident) } } return ident } func (c *Compiler) quote(x string) string { switch c.conf.Engine { case config.EngineMySQL: return "`" + x + "`" default: return "\"" + x + "\"" } } func (c *Compiler) expandStmt(qc *QueryCatalog, raw *ast.RawStmt, node ast.Node) ([]source.Edit, error) { tables, err := c.sourceTables(qc, node) if err != nil { return nil, err } var targets *ast.List switch n := node.(type) { case *ast.DeleteStmt: targets = n.ReturningList case *ast.InsertStmt: targets = n.ReturningList case *ast.SelectStmt: targets = n.TargetList case *ast.UpdateStmt: targets = n.ReturningList default: return nil, fmt.Errorf("outputColumns: unsupported node type: %T", n) } var edits []source.Edit for _, target := range targets.Items { res, ok := target.(*ast.ResTarget) if !ok { continue } ref, ok := res.Val.(*ast.ColumnRef) if !ok { continue } if !hasStarRef(ref) { continue } var parts, cols []string for _, f := range ref.Fields.Items { switch field := f.(type) { case *ast.String: parts = append(parts, field.Str) case *ast.A_Star: parts = append(parts, "*") default: return nil, fmt.Errorf("unknown field in ColumnRef: %T", f) } } scope := astutils.Join(ref.Fields, ".") counts := map[string]int{} if scope == "" { for _, t := range tables { for _, c := range t.Columns { counts[c.Name] += 1 } } } for _, t := range tables { if scope != "" && scope != t.Rel.Name { continue } tableName := c.quoteIdent(t.Rel.Name) scopeName := c.quoteIdent(scope) for _, column := range t.Columns { cname := column.Name if res.Name != nil { cname = *res.Name } cname = c.quoteIdent(cname) if scope != "" { cname = scopeName + "." + cname } 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) } } var old []string for _, p := range parts { if p == "*" { old = append(old, p) } else { old = append(old, c.quoteIdent(p)) } } var oldString string var oldFunc func(string) int // use the sqlc.embed string instead if embed, ok := qc.embeds.Find(ref); ok { oldString = embed.Orig() } else { oldFunc = func(s string) int { length := 0 for i, o := range old { if hasSeparator := i > 0; hasSeparator { length++ } if strings.HasPrefix(s[length:], o) { length += len(o) } else if quoted := c.quote(o); strings.HasPrefix(s[length:], quoted) { length += len(quoted) } else { length += len(o) } } return length } } edits = append(edits, source.Edit{ Location: res.Location - raw.StmtLocation, Old: oldString, OldFunc: oldFunc, New: strings.Join(cols, ", "), }) } return edits, nil } ================================================ FILE: internal/compiler/find_params.go ================================================ package compiler import ( "fmt" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" ) func findParameters(root ast.Node) ([]paramRef, []error) { refs := make([]paramRef, 0) errors := make([]error, 0) v := paramSearch{seen: make(map[int]struct{}), refs: &refs, errs: &errors} astutils.Walk(v, root) if len(*v.errs) > 0 { return refs, *v.errs } else { return refs, nil } } type paramRef struct { parent ast.Node rv *ast.RangeVar ref *ast.ParamRef name string // Named parameter support } type paramSearch struct { parent ast.Node rangeVar *ast.RangeVar refs *[]paramRef seen map[int]struct{} errs *[]error // XXX: Gross state hack for limit limitCount ast.Node limitOffset ast.Node } type limitCount struct { } func (l *limitCount) Pos() int { return 0 } type limitOffset struct { } func (l *limitOffset) Pos() int { return 0 } func (p paramSearch) Visit(node ast.Node) astutils.Visitor { switch n := node.(type) { case *ast.A_Expr: p.parent = node case *ast.BetweenExpr: p.parent = node case *ast.CallStmt: p.parent = n.FuncCall case *ast.DeleteStmt: if n.LimitCount != nil { p.limitCount = n.LimitCount } case *ast.FuncCall: p.parent = node case *ast.InsertStmt: if s, ok := n.SelectStmt.(*ast.SelectStmt); ok { for i, item := range s.TargetList.Items { target, ok := item.(*ast.ResTarget) if !ok { continue } ref, ok := target.Val.(*ast.ParamRef) if !ok { continue } if len(n.Cols.Items) <= i { *p.errs = append(*p.errs, fmt.Errorf("INSERT has more expressions than target columns")) return p } *p.refs = append(*p.refs, paramRef{parent: n.Cols.Items[i], ref: ref, rv: n.Relation}) p.seen[ref.Location] = struct{}{} } for _, item := range s.ValuesLists.Items { vl, ok := item.(*ast.List) if !ok { continue } for i, v := range vl.Items { ref, ok := v.(*ast.ParamRef) if !ok { continue } if len(n.Cols.Items) <= i { *p.errs = append(*p.errs, fmt.Errorf("INSERT has more expressions than target columns")) return p } *p.refs = append(*p.refs, paramRef{parent: n.Cols.Items[i], ref: ref, rv: n.Relation}) p.seen[ref.Location] = struct{}{} } } } case *ast.UpdateStmt: for _, item := range n.TargetList.Items { target, ok := item.(*ast.ResTarget) if !ok { continue } ref, ok := target.Val.(*ast.ParamRef) if !ok { continue } for _, relation := range n.Relations.Items { rv, ok := relation.(*ast.RangeVar) if !ok { continue } *p.refs = append(*p.refs, paramRef{parent: target, ref: ref, rv: rv}) } p.seen[ref.Location] = struct{}{} } if n.LimitCount != nil { p.limitCount = n.LimitCount } case *ast.RangeVar: p.rangeVar = n case *ast.ResTarget: p.parent = node case *ast.SelectStmt: if n.LimitCount != nil { p.limitCount = n.LimitCount } if n.LimitOffset != nil { p.limitOffset = n.LimitOffset } case *ast.TypeCast: p.parent = node case *ast.ParamRef: parent := p.parent if count, ok := p.limitCount.(*ast.ParamRef); ok { if n.Number == count.Number { parent = &limitCount{} } } if offset, ok := p.limitOffset.(*ast.ParamRef); ok { if n.Number == offset.Number { parent = &limitOffset{} } } if _, found := p.seen[n.Location]; found { break } // Special, terrible case for *ast.MultiAssignRef set := true if res, ok := parent.(*ast.ResTarget); ok { if multi, ok := res.Val.(*ast.MultiAssignRef); ok { set = false if row, ok := multi.Source.(*ast.RowExpr); ok { for i, arg := range row.Args.Items { if ref, ok := arg.(*ast.ParamRef); ok { if multi.Colno == i+1 && ref.Number == n.Number { set = true } } } } } } if set { *p.refs = append(*p.refs, paramRef{parent: parent, ref: n, rv: p.rangeVar}) p.seen[n.Location] = struct{}{} } return nil case *ast.In: if n.Sel == nil { p.parent = node } else { 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{ Catalogname: schema.Catalogname, Schemaname: schema.Schemaname, Relname: schema.Relname, } } } } if _, ok := n.Expr.(*ast.ParamRef); ok { p.Visit(n.Expr) } } return p } ================================================ FILE: internal/compiler/output_columns.go ================================================ package compiler import ( "errors" "fmt" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" "github.com/sqlc-dev/sqlc/internal/sql/catalog" "github.com/sqlc-dev/sqlc/internal/sql/lang" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) // OutputColumns determines which columns a statement will output func (c *Compiler) OutputColumns(stmt ast.Node) ([]*catalog.Column, error) { qc, err := c.buildQueryCatalog(c.catalog, stmt, nil) if err != nil { return nil, err } cols, err := c.outputColumns(qc, stmt) if err != nil { return nil, err } catCols := make([]*catalog.Column, 0, len(cols)) for _, col := range cols { catCols = append(catCols, &catalog.Column{ Name: col.Name, Type: ast.TypeName{Name: col.DataType}, IsNotNull: col.NotNull, IsUnsigned: col.Unsigned, IsArray: col.IsArray, ArrayDims: col.ArrayDims, Comment: col.Comment, Length: col.Length, }) } return catCols, nil } func hasStarRef(cf *ast.ColumnRef) bool { for _, item := range cf.Fields.Items { if _, ok := item.(*ast.A_Star); ok { return true } } return false } // Compute the output columns for a statement. // // Return an error if column references are ambiguous // Return an error if column references don't exist func (c *Compiler) outputColumns(qc *QueryCatalog, node ast.Node) ([]*Column, error) { tables, err := c.sourceTables(qc, node) if err != nil { return nil, err } targets := &ast.List{} switch n := node.(type) { case *ast.DeleteStmt: targets = n.ReturningList case *ast.InsertStmt: targets = n.ReturningList case *ast.SelectStmt: targets = n.TargetList isUnion := len(targets.Items) == 0 && n.Larg != nil if n.GroupClause != nil { for _, item := range n.GroupClause.Items { if err := findColumnForNode(item, tables, targets); err != nil { return nil, err } } } validateOrderBy := true if c.conf.StrictOrderBy != nil { validateOrderBy = *c.conf.StrictOrderBy } if !isUnion && validateOrderBy { if n.SortClause != nil { for _, item := range n.SortClause.Items { sb, ok := item.(*ast.SortBy) if !ok { continue } if err := findColumnForNode(sb.Node, tables, targets); err != nil { return nil, fmt.Errorf("%v: if you want to skip this validation, set 'strict_order_by' to false", err) } } } if n.WindowClause != nil { for _, item := range n.WindowClause.Items { sb, ok := item.(*ast.List) if !ok { continue } for _, single := range sb.Items { caseExpr, ok := single.(*ast.CaseExpr) if !ok { continue } if err := findColumnForNode(caseExpr.Xpr, tables, targets); err != nil { return nil, fmt.Errorf("%v: if you want to skip this validation, set 'strict_order_by' to false", err) } } } } } // For UNION queries, targets is empty and we need to look for the // columns in Largs. if isUnion { return c.outputColumns(qc, n.Larg) } case *ast.UpdateStmt: targets = n.ReturningList } var cols []*Column for _, target := range targets.Items { res, ok := target.(*ast.ResTarget) if !ok { continue } switch n := res.Val.(type) { case *ast.A_Const: name := "" if res.Name != nil { name = *res.Name } switch n.Val.(type) { case *ast.String: cols = append(cols, &Column{Name: name, DataType: "text", NotNull: true}) case *ast.Integer: cols = append(cols, &Column{Name: name, DataType: "int", NotNull: true}) case *ast.Float: cols = append(cols, &Column{Name: name, DataType: "float", NotNull: true}) case *ast.Boolean: cols = append(cols, &Column{Name: name, DataType: "bool", NotNull: true}) default: cols = append(cols, &Column{Name: name, DataType: "any", NotNull: false}) } case *ast.A_Expr: name := "" if res.Name != nil { name = *res.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(op): cols = append(cols, &Column{Name: name, DataType: "int", NotNull: true}) default: cols = append(cols, &Column{Name: name, DataType: "any", NotNull: false}) } case *ast.BoolExpr: name := "" if res.Name != nil { name = *res.Name } notNull := false if len(n.Args.Items) == 1 { switch n.Boolop { case ast.BoolExprTypeIsNull, ast.BoolExprTypeIsNotNull: notNull = true case ast.BoolExprTypeNot: sublink, ok := n.Args.Items[0].(*ast.SubLink) if ok && sublink.SubLinkType == ast.EXISTS_SUBLINK { notNull = true if name == "" { name = "not_exists" } } } } cols = append(cols, &Column{Name: name, DataType: "bool", NotNull: notNull}) case *ast.CaseExpr: name := "" if res.Name != nil { name = *res.Name } // TODO: The TypeCase and A_Const code has been copied from below. Instead, we // need a recurse function to get the type of a node. if tc, ok := n.Defresult.(*ast.TypeCast); ok { if tc.TypeName == nil { return nil, errors.New("no type name type cast") } name := "" if ref, ok := tc.Arg.(*ast.ColumnRef); ok { name = astutils.Join(ref.Fields, "_") } if res.Name != nil { name = *res.Name } // TODO Validate column names col := toColumn(tc.TypeName) col.Name = name cols = append(cols, col) } else if aconst, ok := n.Defresult.(*ast.A_Const); ok { switch aconst.Val.(type) { case *ast.String: cols = append(cols, &Column{Name: name, DataType: "text", NotNull: true}) case *ast.Integer: cols = append(cols, &Column{Name: name, DataType: "int", NotNull: true}) case *ast.Float: cols = append(cols, &Column{Name: name, DataType: "float", NotNull: true}) case *ast.Boolean: cols = append(cols, &Column{Name: name, DataType: "bool", NotNull: true}) default: cols = append(cols, &Column{Name: name, DataType: "any", NotNull: false}) } } else { cols = append(cols, &Column{Name: name, DataType: "any", NotNull: false}) } case *ast.CoalesceExpr: name := "coalesce" if res.Name != nil { name = *res.Name } var firstColumn *Column var shouldNotBeNull bool for _, arg := range n.Args.Items { if _, ok := arg.(*ast.A_Const); ok { shouldNotBeNull = true continue } if ref, ok := arg.(*ast.ColumnRef); ok { columns, err := outputColumnRefs(res, tables, ref) if err != nil { return nil, err } for _, c := range columns { if firstColumn == nil { firstColumn = c } shouldNotBeNull = shouldNotBeNull || c.NotNull } } } if firstColumn != nil { firstColumn.NotNull = shouldNotBeNull firstColumn.skipTableRequiredCheck = true cols = append(cols, firstColumn) } else { cols = append(cols, &Column{Name: name, DataType: "any", NotNull: false}) } case *ast.ColumnRef: if hasStarRef(n) { // add a column with a reference to an embedded table if embed, ok := qc.embeds.Find(n); ok { cols = append(cols, &Column{ Name: embed.Table.Name, EmbedTable: embed.Table, }) continue } // TODO: This code is copied in func expand() for _, t := range tables { scope := astutils.Join(n.Fields, ".") if scope != "" && scope != t.Rel.Name { continue } for _, c := range t.Columns { cname := c.Name if res.Name != nil { cname = *res.Name } cols = append(cols, &Column{ Name: cname, OriginalName: c.Name, Type: c.Type, Scope: scope, Table: c.Table, TableAlias: t.Rel.Name, DataType: c.DataType, NotNull: c.NotNull, Unsigned: c.Unsigned, IsArray: c.IsArray, ArrayDims: c.ArrayDims, Length: c.Length, }) } } continue } columns, err := outputColumnRefs(res, tables, n) if err != nil { return nil, err } cols = append(cols, columns...) case *ast.FuncCall: rel := n.Func name := rel.Name if res.Name != nil { name = *res.Name } fun, err := qc.catalog.ResolveFuncCall(n) if err == nil { cols = append(cols, &Column{ Name: name, DataType: dataType(fun.ReturnType), NotNull: !fun.ReturnTypeNullable, IsFuncCall: true, }) } else { cols = append(cols, &Column{ Name: name, DataType: "any", IsFuncCall: true, }) } case *ast.SubLink: name := "exists" if res.Name != nil { name = *res.Name } switch n.SubLinkType { case ast.EXISTS_SUBLINK: cols = append(cols, &Column{Name: name, DataType: "bool", NotNull: true}) case ast.EXPR_SUBLINK: subcols, err := c.outputColumns(qc, n.Subselect) if err != nil { return nil, err } first := subcols[0] if res.Name != nil { first.Name = *res.Name } cols = append(cols, first) default: cols = append(cols, &Column{Name: name, DataType: "any", NotNull: false}) } case *ast.TypeCast: if n.TypeName == nil { return nil, errors.New("no type name type cast") } name := "" if ref, ok := n.Arg.(*ast.ColumnRef); ok { name = astutils.Join(ref.Fields, "_") } if res.Name != nil { name = *res.Name } // TODO Validate column names col := toColumn(n.TypeName) col.Name = name // TODO Add correct, real type inference if constant, ok := n.Arg.(*ast.A_Const); ok { if _, ok := constant.Val.(*ast.Null); ok { col.NotNull = false } } cols = append(cols, col) case *ast.SelectStmt: subcols, err := c.outputColumns(qc, n) if err != nil { return nil, err } first := subcols[0] if res.Name != nil { first.Name = *res.Name } cols = append(cols, first) default: name := "" if res.Name != nil { name = *res.Name } cols = append(cols, &Column{Name: name, DataType: "any", NotNull: false}) } } if n, ok := node.(*ast.SelectStmt); ok { for _, col := range cols { if !col.NotNull || col.Table == nil || col.skipTableRequiredCheck { continue } for _, f := range n.FromClause.Items { res := isTableRequired(f, col, tableRequired) if res != tableNotFound { col.NotNull = res == tableRequired break } } } } return cols, nil } const ( tableNotFound = iota tableRequired tableOptional ) func isTableRequired(n ast.Node, col *Column, prior int) int { switch n := n.(type) { case *ast.RangeVar: tableMatch := *n.Relname == col.Table.Name aliasMatch := true if n.Alias != nil && col.TableAlias != "" { aliasMatch = *n.Alias.Aliasname == col.TableAlias } if aliasMatch && tableMatch { return prior } case *ast.JoinExpr: helper := func(l, r int) int { if res := isTableRequired(n.Larg, col, l); res != tableNotFound { return res } if res := isTableRequired(n.Rarg, col, r); res != tableNotFound { return res } return tableNotFound } switch n.Jointype { case ast.JoinTypeLeft: return helper(tableRequired, tableOptional) case ast.JoinTypeRight: return helper(tableOptional, tableRequired) case ast.JoinTypeFull: return helper(tableOptional, tableOptional) case ast.JoinTypeInner: return helper(tableRequired, tableRequired) } case *ast.List: for _, item := range n.Items { if res := isTableRequired(item, col, prior); res != tableNotFound { return res } } } return tableNotFound } type tableVisitor struct { list ast.List } func (r *tableVisitor) Visit(n ast.Node) astutils.Visitor { switch n.(type) { case *ast.RangeVar, *ast.RangeFunction: r.list.Items = append(r.list.Items, n) return r case *ast.RangeSubselect: r.list.Items = append(r.list.Items, n) return nil default: return r } } // Compute the output columns for a statement. // // Return an error if column references are ambiguous // Return an error if column references don't exist // 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) { list := &ast.List{} switch n := node.(type) { case *ast.DeleteStmt: if n.Relations != nil { list = n.Relations } else if n.FromClause != nil { // Multi-table DELETE: walk FromClause to find tables var tv tableVisitor astutils.Walk(&tv, n.FromClause) list = &tv.list } case *ast.InsertStmt: list = &ast.List{ Items: []ast.Node{n.Relation}, } case *ast.SelectStmt: var tv tableVisitor astutils.Walk(&tv, n.FromClause) list = &tv.list case *ast.TruncateStmt: list = astutils.Search(n.Relations, func(node ast.Node) bool { _, ok := node.(*ast.RangeVar) return ok }) case *ast.RefreshMatViewStmt: list = astutils.Search(n.Relation, func(node ast.Node) bool { _, ok := node.(*ast.RangeVar) return ok }) case *ast.UpdateStmt: var tv tableVisitor astutils.Walk(&tv, n.FromClause) astutils.Walk(&tv, n.Relations) list = &tv.list } var tables []*Table for _, item := range list.Items { item := item switch n := item.(type) { case *ast.RangeFunction: var funcCall *ast.FuncCall switch f := n.Functions.Items[0].(type) { case *ast.List: switch fi := f.Items[0].(type) { case *ast.FuncCall: funcCall = fi case *ast.SQLValueFunction: continue // TODO handle this correctly default: continue } case *ast.FuncCall: funcCall = f default: return nil, fmt.Errorf("sourceTables: unsupported function call type %T", n.Functions.Items[0]) } // If the function or table can't be found, don't error out. There // are many queries that depend on functions unknown to sqlc. fn, err := qc.GetFunc(funcCall.Func) if err != nil { continue } var table *Table if fn.ReturnType != nil { table, err = qc.GetTable(&ast.TableName{ Catalog: fn.ReturnType.Catalog, Schema: fn.ReturnType.Schema, Name: fn.ReturnType.Name, }) } if table == nil || err != nil { if n.Alias != nil && len(n.Alias.Colnames.Items) > 0 { table = &Table{} for _, colName := range n.Alias.Colnames.Items { table.Columns = append(table.Columns, &Column{ Name: colName.(*ast.String).Str, DataType: "any", }) } } else { colName := fn.Rel.Name if n.Alias != nil { colName = *n.Alias.Aliasname } table = &Table{ Rel: &ast.TableName{ Catalog: fn.Rel.Catalog, Schema: fn.Rel.Schema, Name: fn.Rel.Name, }, } if len(fn.Outs) > 0 { for _, arg := range fn.Outs { table.Columns = append(table.Columns, &Column{ Name: arg.Name, DataType: arg.Type.Name, }) } } if fn.ReturnType != nil { table.Columns = []*Column{ { Name: colName, DataType: fn.ReturnType.Name, }, } } } } if n.Alias != nil { table.Rel = &ast.TableName{ Name: *n.Alias.Aliasname, } } tables = append(tables, table) case *ast.RangeSubselect: cols, err := c.outputColumns(qc, n.Subquery) 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: tableName, }, Columns: cols, }) case *ast.RangeVar: fqn, err := ParseTableName(n) if err != nil { return nil, err } if qc == nil { return nil, fmt.Errorf("query catalog is empty") } table, cerr := qc.GetTable(fqn) if cerr != nil { // TODO: Update error location // cerr.Location = n.Location // return nil, *cerr return nil, cerr } if n.Alias != nil { table.Rel = &ast.TableName{ Catalog: table.Rel.Catalog, Schema: table.Rel.Schema, Name: *n.Alias.Aliasname, } } tables = append(tables, table) default: return nil, fmt.Errorf("sourceTable: unsupported list item type: %T", n) } } return tables, nil } func outputColumnRefs(res *ast.ResTarget, tables []*Table, node *ast.ColumnRef) ([]*Column, error) { parts := stringSlice(node.Fields) var schema, name, alias string switch { case len(parts) == 1: name = parts[0] case len(parts) == 2: alias = parts[0] name = parts[1] case len(parts) == 3: schema = parts[0] alias = parts[1] name = parts[2] default: return nil, fmt.Errorf("unknown number of fields: %d", len(parts)) } var cols []*Column var found int for _, t := range tables { if schema != "" && t.Rel.Schema != schema { continue } if alias != "" && t.Rel.Name != alias { continue } for _, c := range t.Columns { if c.Name == name { found += 1 cname := c.Name if res.Name != nil { cname = *res.Name } cols = append(cols, &Column{ Name: cname, Type: c.Type, Table: c.Table, TableAlias: alias, DataType: c.DataType, NotNull: c.NotNull, Unsigned: c.Unsigned, IsArray: c.IsArray, ArrayDims: c.ArrayDims, Length: c.Length, EmbedTable: c.EmbedTable, OriginalName: c.Name, }) } } } if found == 0 { return nil, &sqlerr.Error{ Code: "42703", Message: fmt.Sprintf("column %q does not exist", name), Location: res.Location, } } if found > 1 { return nil, &sqlerr.Error{ Code: "42703", Message: fmt.Sprintf("column reference %q is ambiguous", name), Location: res.Location, } } return cols, nil } func findColumnForNode(item ast.Node, tables []*Table, targetList *ast.List) error { ref, ok := item.(*ast.ColumnRef) if !ok { return nil } return findColumnForRef(ref, tables, targetList) } func findColumnForRef(ref *ast.ColumnRef, tables []*Table, targetList *ast.List) error { parts := stringSlice(ref.Fields) var alias, name string if len(parts) == 1 { name = parts[0] } else if len(parts) == 2 { alias = parts[0] name = parts[1] } var found int for _, t := range tables { if alias != "" && t.Rel.Name != alias { continue } // Find matching column for _, c := range t.Columns { if c.Name == name { found++ break } } } // Find matching alias if necessary if found == 0 { for _, c := range targetList.Items { resTarget, ok := c.(*ast.ResTarget) if !ok { continue } if resTarget.Name != nil && *resTarget.Name == name { found++ } } } if found == 0 { return &sqlerr.Error{ Code: "42703", Message: fmt.Sprintf("column reference %q not found", name), Location: ref.Location, } } if found > 1 { return &sqlerr.Error{ Code: "42703", Message: fmt.Sprintf("column reference %q is ambiguous", name), Location: ref.Location, } } return nil } ================================================ FILE: internal/compiler/parse.go ================================================ package compiler import ( "context" "errors" "fmt" "strings" "github.com/sqlc-dev/sqlc/internal/debug" "github.com/sqlc-dev/sqlc/internal/metadata" "github.com/sqlc-dev/sqlc/internal/opts" "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" "github.com/sqlc-dev/sqlc/internal/sql/validate" ) func (c *Compiler) parseQuery(stmt ast.Node, src string, o opts.Parser) (*Query, error) { ctx := context.Background() if o.Debug.DumpAST { debug.Dump(stmt) } // validate sqlc-specific syntax if err := validate.SqlcFunctions(stmt); err != nil { return nil, err } // rewrite queries to remove sqlc.* functions raw, ok := stmt.(*ast.RawStmt) if !ok { return nil, errors.New("node is not a statement") } rawSQL, err := source.Pluck(src, raw.StmtLocation, raw.StmtLen) if err != nil { return nil, err } if rawSQL == "" { return nil, errors.New("missing semicolon at end of file") } name, cmd, err := metadata.ParseQueryNameAndType(rawSQL, metadata.CommentSyntax(c.parser.CommentSyntax())) if err != nil { return nil, err } if name == "" { return nil, nil } if err := validate.Cmd(raw.Stmt, name, cmd); err != nil { return nil, err } md := metadata.Metadata{ Name: name, Cmd: cmd, } // TODO eventually can use this for name and type/cmd parsing too cleanedComments, err := source.CleanedComments(rawSQL, c.parser.CommentSyntax()) if err != nil { return nil, err } md.Params, md.Flags, md.RuleSkiplist, err = metadata.ParseCommentFlags(cleanedComments) if err != nil { return nil, err } var anlys *analysis if c.databaseOnlyMode && c.expander != nil { // In database-only mode, use the expander for star expansion // and rely entirely on the database analyzer for type resolution expandedQuery, err := c.expander.Expand(ctx, rawSQL) if err != nil { return nil, fmt.Errorf("star expansion failed: %w", err) } // Parse named parameters from the expanded query expandedStmts, err := c.parser.Parse(strings.NewReader(expandedQuery)) if err != nil { return nil, fmt.Errorf("parsing expanded query failed: %w", err) } if len(expandedStmts) == 0 { return nil, errors.New("no statements in expanded query") } expandedRaw := expandedStmts[0].Raw // Use the analyzer to get type information from the database result, err := c.analyzer.Analyze(ctx, expandedRaw, expandedQuery, c.schema, nil) if err != nil { return nil, err } // Convert the analyzer result to the internal analysis format var cols []*Column for _, col := range result.Columns { cols = append(cols, convertColumn(col)) } var params []Parameter for _, p := range result.Params { params = append(params, Parameter{ Number: int(p.Number), Column: convertColumn(p.Column), }) } // Determine the insert table if applicable var table *ast.TableName if insert, ok := expandedRaw.Stmt.(*ast.InsertStmt); ok { table, _ = ParseTableName(insert.Relation) } anlys = &analysis{ Table: table, Columns: cols, Parameters: params, Query: expandedQuery, } } else if c.analyzer != nil { inference, _ := c.inferQuery(raw, rawSQL) if inference == nil { inference = &analysis{} } if inference.Query == "" { inference.Query = rawSQL } result, err := c.analyzer.Analyze(ctx, raw, inference.Query, c.schema, inference.Named) if err != nil { return nil, err } // If the query uses star expansion, verify that it was edited. If not, // return an error. stars := astutils.Search(raw, func(node ast.Node) bool { _, ok := node.(*ast.A_Star) return ok }) hasStars := len(stars.Items) > 0 unchanged := inference.Query == rawSQL if unchanged && hasStars { return nil, fmt.Errorf("star expansion failed for query") } // FOOTGUN: combineAnalysis mutates inference anlys = combineAnalysis(inference, result) } else { anlys, err = c.analyzeQuery(raw, rawSQL) if err != nil { return nil, err } } expanded := anlys.Query // If the query string was edited, make sure the syntax is valid if expanded != rawSQL { if _, err := c.parser.Parse(strings.NewReader(expanded)); err != nil { return nil, fmt.Errorf("edited query syntax is invalid: %w", err) } } trimmed, comments, err := source.StripComments(expanded) if err != nil { return nil, err } md.Comments = comments return &Query{ RawStmt: raw, Metadata: md, Params: anlys.Parameters, Columns: anlys.Columns, SQL: trimmed, InsertIntoTable: anlys.Table, }, nil } func rangeVars(root ast.Node) []*ast.RangeVar { var vars []*ast.RangeVar find := astutils.VisitorFunc(func(node ast.Node) { switch n := node.(type) { case *ast.RangeVar: vars = append(vars, n) } }) astutils.Walk(find, root) return vars } func uniqueParamRefs(in []paramRef, dollar bool) []paramRef { m := make(map[int]bool, len(in)) o := make([]paramRef, 0, len(in)) for _, v := range in { if !m[v.ref.Number] { m[v.ref.Number] = true if v.ref.Number != 0 { o = append(o, v) } } } if !dollar { start := 1 for _, v := range in { if v.ref.Number == 0 { for m[start] { start++ } v.ref.Number = start o = append(o, v) } } } return o } ================================================ FILE: internal/compiler/query.go ================================================ package compiler import ( "github.com/sqlc-dev/sqlc/internal/metadata" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) type Function struct { Rel *ast.FuncName ReturnType *ast.TypeName Outs []*catalog.Argument } type Table struct { Rel *ast.TableName Columns []*Column } type Column struct { Name string OriginalName string DataType string NotNull bool Unsigned bool IsArray bool ArrayDims int Comment string Length *int IsNamedParam bool IsFuncCall bool // XXX: Figure out what PostgreSQL calls `foo.id` Scope string Table *ast.TableName TableAlias string Type *ast.TypeName EmbedTable *ast.TableName IsSqlcSlice bool // is this sqlc.slice() skipTableRequiredCheck bool } type Query struct { SQL string Metadata metadata.Metadata Columns []*Column Params []Parameter // Needed for CopyFrom InsertIntoTable *ast.TableName // Needed for vet RawStmt *ast.RawStmt } type Parameter struct { Number int Column *Column } ================================================ FILE: internal/compiler/query_catalog.go ================================================ package compiler import ( "fmt" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" "github.com/sqlc-dev/sqlc/internal/sql/rewrite" ) type QueryCatalog struct { catalog *catalog.Catalog ctes map[string]*Table embeds rewrite.EmbedSet } func (comp *Compiler) buildQueryCatalog(c *catalog.Catalog, node ast.Node, embeds rewrite.EmbedSet) (*QueryCatalog, error) { var with *ast.WithClause switch n := node.(type) { case *ast.DeleteStmt: with = n.WithClause case *ast.InsertStmt: with = n.WithClause case *ast.UpdateStmt: with = n.WithClause case *ast.SelectStmt: with = n.WithClause default: with = nil } qc := &QueryCatalog{catalog: c, ctes: map[string]*Table{}, embeds: embeds} if with != nil { for _, item := range with.Ctes.Items { if cte, ok := item.(*ast.CommonTableExpr); ok { cols, err := comp.outputColumns(qc, cte.Ctequery) if err != nil { return nil, err } var names []string if cte.Aliascolnames != nil { for _, item := range cte.Aliascolnames.Items { if val, ok := item.(*ast.String); ok { names = append(names, val.Str) } else { names = append(names, "") } } } rel := &ast.TableName{Name: *cte.Ctename} for i := range cols { cols[i].Table = rel if len(names) > i { cols[i].Name = names[i] } } qc.ctes[*cte.Ctename] = &Table{ Rel: rel, Columns: cols, } } } } return qc, nil } func ConvertColumn(rel *ast.TableName, c *catalog.Column) *Column { return &Column{ Table: rel, Name: c.Name, DataType: dataType(&c.Type), NotNull: c.IsNotNull, Unsigned: c.IsUnsigned, IsArray: c.IsArray, ArrayDims: c.ArrayDims, Type: &c.Type, Length: c.Length, } } func (qc QueryCatalog) GetTable(rel *ast.TableName) (*Table, error) { cte, exists := qc.ctes[rel.Name] if exists { return &Table{Rel: rel, Columns: cte.Columns}, nil } src, err := qc.catalog.GetTable(rel) if err != nil { return nil, err } var cols []*Column for _, c := range src.Columns { cols = append(cols, ConvertColumn(rel, c)) } return &Table{Rel: rel, Columns: cols}, nil } func (qc QueryCatalog) GetFunc(rel *ast.FuncName) (*Function, error) { funcs, err := qc.catalog.ListFuncsByName(rel) if err != nil { return nil, err } if len(funcs) == 0 { return nil, fmt.Errorf("function not found: %s", rel.Name) } return &Function{ Rel: rel, Outs: funcs[0].OutArgs(), ReturnType: funcs[0].ReturnType, }, nil } ================================================ FILE: internal/compiler/resolve.go ================================================ package compiler import ( "fmt" "log/slog" "strconv" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" "github.com/sqlc-dev/sqlc/internal/sql/catalog" "github.com/sqlc-dev/sqlc/internal/sql/named" "github.com/sqlc-dev/sqlc/internal/sql/rewrite" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) func dataType(n *ast.TypeName) string { if n.Schema != "" { return n.Schema + "." + n.Name } else { return n.Name } } func (comp *Compiler) resolveCatalogRefs(qc *QueryCatalog, rvs []*ast.RangeVar, args []paramRef, params *named.ParamSet, embeds rewrite.EmbedSet) ([]Parameter, error) { c := comp.catalog aliasMap := map[string]*ast.TableName{} // TODO: Deprecate defaultTable var defaultTable *ast.TableName var tables []*ast.TableName typeMap := map[string]map[string]map[string]*catalog.Column{} indexTable := func(table catalog.Table) error { tables = append(tables, table.Rel) if defaultTable == nil { defaultTable = table.Rel } schema := table.Rel.Schema if schema == "" { schema = c.DefaultSchema } if _, exists := typeMap[schema]; !exists { typeMap[schema] = map[string]map[string]*catalog.Column{} } typeMap[schema][table.Rel.Name] = map[string]*catalog.Column{} for _, c := range table.Columns { cc := c typeMap[schema][table.Rel.Name][c.Name] = cc } return nil } for _, rv := range rvs { if rv.Relname == nil { continue } fqn, err := ParseTableName(rv) if err != nil { return nil, err } if _, found := aliasMap[fqn.Name]; found { continue } table, err := c.GetTable(fqn) if err != nil { if qc == nil { continue } // If the table name doesn't exist, first check if it's a CTE if _, qcerr := qc.GetTable(fqn); qcerr != nil { return nil, err } continue } err = indexTable(table) if err != nil { return nil, err } if rv.Alias != nil { aliasMap[*rv.Alias.Aliasname] = fqn } } // resolve a table for an embed for _, embed := range embeds { table, err := c.GetTable(embed.Table) if err == nil { embed.Table = table.Rel continue } if alias, ok := aliasMap[embed.Table.Name]; ok { embed.Table = alias continue } return nil, fmt.Errorf("unable to resolve table with %q: %w", embed.Orig(), err) } 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) { case *limitOffset: defaultP := named.NewInferredParam("offset", true) p, isNamed := params.FetchMerge(ref.ref.Number, defaultP) a = append(a, Parameter{ Number: ref.ref.Number, Column: &Column{ Name: p.Name(), DataType: "integer", NotNull: p.NotNull(), IsNamedParam: isNamed, }, }) case *limitCount: defaultP := named.NewInferredParam("limit", true) p, isNamed := params.FetchMerge(ref.ref.Number, defaultP) a = append(a, Parameter{ Number: ref.ref.Number, Column: &Column{ Name: p.Name(), DataType: "integer", NotNull: p.NotNull(), IsNamedParam: isNamed, }, }) case *ast.A_Expr: // TODO: While this works for a wide range of simple expressions, // more complicated expressions will cause this logic to fail. list := astutils.Search(n.Lexpr, func(node ast.Node) bool { _, ok := node.(*ast.ColumnRef) return ok }) if len(list.Items) == 0 { list = astutils.Search(n.Rexpr, func(node ast.Node) bool { _, ok := node.(*ast.ColumnRef) return ok }) } if len(list.Items) == 0 { // TODO: Move this to database-specific engine package dataType := "any" if astutils.Join(n.Name, ".") == "||" { dataType = "text" } defaultP := named.NewParam("") p, isNamed := params.FetchMerge(ref.ref.Number, defaultP) a = append(a, Parameter{ Number: ref.ref.Number, Column: &Column{ Name: p.Name(), DataType: dataType, IsNamedParam: isNamed, NotNull: p.NotNull(), IsSqlcSlice: p.IsSqlcSlice(), }, }) continue } switch node := list.Items[0].(type) { case *ast.ColumnRef: items := stringSlice(node.Fields) var key, alias string switch len(items) { case 1: key = items[0] 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))) } search := tables if alias != "" { if original, ok := aliasMap[alias]; ok { search = []*ast.TableName{original} } else { var located bool for _, fqn := range tables { if fqn.Name == alias { located = true search = []*ast.TableName{fqn} } } if !located { return nil, &sqlerr.Error{ Code: "42703", Message: fmt.Sprintf("table alias %q does not exist", alias), Location: node.Location, } } } } var found int for _, table := range search { schema := table.Schema if schema == "" { schema = c.DefaultSchema } if c, ok := typeMap[schema][table.Name][key]; ok { found += 1 if ref.name != "" { key = ref.name } defaultP := named.NewInferredParam(key, c.IsNotNull) p, isNamed := params.FetchMerge(ref.ref.Number, defaultP) a = append(a, Parameter{ Number: ref.ref.Number, Column: &Column{ Name: p.Name(), OriginalName: c.Name, DataType: dataType(&c.Type), NotNull: p.NotNull(), Unsigned: c.IsUnsigned, IsArray: c.IsArray, ArrayDims: c.ArrayDims, Length: c.Length, Table: table, IsNamedParam: isNamed, IsSqlcSlice: p.IsSqlcSlice(), }, }) } } if found == 0 { return nil, &sqlerr.Error{ Code: "42703", Message: fmt.Sprintf("column %q does not exist", key), Location: node.Location, } } if found > 1 { return nil, &sqlerr.Error{ Code: "42703", Message: fmt.Sprintf("column reference %q is ambiguous", key), Location: node.Location, } } } case *ast.BetweenExpr: if n == nil || n.Expr == nil || n.Left == nil || n.Right == nil { fmt.Println("ast.BetweenExpr is nil") continue } var key string if ref, ok := n.Expr.(*ast.ColumnRef); ok { itemsCount := len(ref.Fields.Items) if str, ok := ref.Fields.Items[itemsCount-1].(*ast.String); ok { key = str.Str } } for _, table := range tables { schema := table.Schema if schema == "" { schema = c.DefaultSchema } if c, ok := typeMap[schema][table.Name][key]; ok { defaultP := named.NewInferredParam(key, c.IsNotNull) p, isNamed := params.FetchMerge(ref.ref.Number, defaultP) var namePrefix string if !isNamed { if ref.ref == n.Left { namePrefix = "from_" } else if ref.ref == n.Right { namePrefix = "to_" } } a = append(a, Parameter{ Number: ref.ref.Number, Column: &Column{ Name: namePrefix + p.Name(), DataType: dataType(&c.Type), NotNull: p.NotNull(), Unsigned: c.IsUnsigned, IsArray: c.IsArray, ArrayDims: c.ArrayDims, Table: table, IsNamedParam: isNamed, IsSqlcSlice: p.IsSqlcSlice(), }, }) } } case *ast.FuncCall: fun, err := c.ResolveFuncCall(n) if err != nil { // Synthesize a function on the fly to avoid returning with an error // for an unknown Postgres function (e.g. defined in an extension) var args []*catalog.Argument for range n.Args.Items { args = append(args, &catalog.Argument{ Type: &ast.TypeName{Name: "any"}, }) } fun = &catalog.Function{ Name: n.Func.Name, Args: args, ReturnType: &ast.TypeName{Name: "any"}, } } var added bool for i, item := range n.Args.Items { funcName := fun.Name var argName string switch inode := item.(type) { case *ast.ParamRef: if inode.Number != ref.ref.Number { continue } case *ast.TypeCast: pr, ok := inode.Arg.(*ast.ParamRef) if !ok { continue } if pr.Number != ref.ref.Number { continue } case *ast.NamedArgExpr: pr, ok := inode.Arg.(*ast.ParamRef) if !ok { continue } if pr.Number != ref.ref.Number { continue } if inode.Name != nil { argName = *inode.Name } default: continue } if fun.Args == nil { defaultName := funcName if argName != "" { defaultName = argName } 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{ Name: p.Name(), DataType: "any", IsNamedParam: isNamed, NotNull: p.NotNull(), IsSqlcSlice: p.IsSqlcSlice(), }, }) continue } var paramName string var paramType *ast.TypeName if argName == "" { if i < len(fun.Args) { paramName = fun.Args[i].Name paramType = fun.Args[i].Type } } else { paramName = argName for _, arg := range fun.Args { if arg.Name == argName { paramType = arg.Type } } if paramType == nil { panic(fmt.Sprintf("named argument %s has no type", paramName)) } } if paramName == "" { paramName = funcName } if paramType == nil { paramType = &ast.TypeName{Name: ""} } 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{ Name: p.Name(), DataType: dataType(paramType), NotNull: p.NotNull(), IsNamedParam: isNamed, IsSqlcSlice: p.IsSqlcSlice(), }, }) } if fun.ReturnType == nil { if !added { addUnknownParam(ref) } continue } table, err := c.GetTable(&ast.TableName{ Catalog: fun.ReturnType.Catalog, Schema: fun.ReturnType.Schema, Name: fun.ReturnType.Name, }) if err != nil { if !added { addUnknownParam(ref) } continue } err = indexTable(table) if err != nil { return nil, err } case *ast.ResTarget: if n.Name == nil { return nil, fmt.Errorf("*ast.ResTarget has nil name") } key := *n.Name var schema, rel string // TODO: Deprecate defaultTable if defaultTable != nil { schema = defaultTable.Schema rel = defaultTable.Name } if ref.rv != nil { fqn, err := ParseTableName(ref.rv) if err != nil { return nil, err } schema = fqn.Schema rel = fqn.Name } if schema == "" { schema = c.DefaultSchema } tableMap, ok := typeMap[schema][rel] if !ok { return nil, sqlerr.RelationNotFound(rel) } if c, ok := tableMap[key]; ok { defaultP := named.NewInferredParam(key, c.IsNotNull) p, isNamed := params.FetchMerge(ref.ref.Number, defaultP) a = append(a, Parameter{ Number: ref.ref.Number, Column: &Column{ Name: p.Name(), OriginalName: c.Name, DataType: dataType(&c.Type), NotNull: p.NotNull(), Unsigned: c.IsUnsigned, IsArray: c.IsArray, ArrayDims: c.ArrayDims, Table: &ast.TableName{Schema: schema, Name: rel}, Length: c.Length, IsNamedParam: isNamed, IsSqlcSlice: p.IsSqlcSlice(), }, }) } else { return nil, &sqlerr.Error{ Code: "42703", Message: fmt.Sprintf("column %q does not exist", key), Location: n.Location, } } case *ast.TypeCast: if n.TypeName == nil { return nil, fmt.Errorf("*ast.TypeCast has nil type name") } col := toColumn(n.TypeName) defaultP := named.NewInferredParam(col.Name, col.NotNull) p, _ := params.FetchMerge(ref.ref.Number, defaultP) col.Name = p.Name() col.NotNull = p.NotNull() a = append(a, Parameter{ Number: ref.ref.Number, Column: col, }) case *ast.ParamRef: a = append(a, Parameter{Number: ref.ref.Number}) case *ast.In: if n == nil || n.List == nil { fmt.Println("ast.In is nil") continue } number := 0 if pr, ok := n.List[0].(*ast.ParamRef); ok { number = pr.Number } location := 0 var key, alias string var items []string if left, ok := n.Expr.(*ast.ColumnRef); ok { location = left.Location items = stringSlice(left.Fields) } else if left, ok := n.Expr.(*ast.ParamRef); ok { if len(n.List) <= 0 { continue } if right, ok := n.List[0].(*ast.ColumnRef); ok { location = left.Location items = stringSlice(right.Fields) } else { continue } } else { continue } switch len(items) { case 1: key = items[0] case 2: alias = items[0] key = items[1] default: panic("too many field items: " + strconv.Itoa(len(items))) } var found int if n.Sel == nil { search := tables if alias != "" { if original, ok := aliasMap[alias]; ok { search = []*ast.TableName{original} } else { for _, fqn := range tables { if fqn.Name == alias { search = []*ast.TableName{fqn} } } } } for _, table := range search { schema := table.Schema if schema == "" { schema = c.DefaultSchema } if c, ok := typeMap[schema][table.Name][key]; ok { found += 1 if ref.name != "" { key = ref.name } defaultP := named.NewInferredParam(key, c.IsNotNull) p, isNamed := params.FetchMerge(ref.ref.Number, defaultP) a = append(a, Parameter{ Number: number, Column: &Column{ Name: p.Name(), OriginalName: c.Name, DataType: dataType(&c.Type), NotNull: c.IsNotNull, Unsigned: c.IsUnsigned, IsArray: c.IsArray, ArrayDims: c.ArrayDims, Table: table, IsNamedParam: isNamed, IsSqlcSlice: p.IsSqlcSlice(), }, }) } } } if found == 0 { return nil, &sqlerr.Error{ Code: "42703", Message: fmt.Sprintf("396: column %q does not exist", key), Location: location, } } if found > 1 { return nil, &sqlerr.Error{ Code: "42703", Message: fmt.Sprintf("in same name column reference %q is ambiguous", key), Location: location, } } default: slog.Debug("unsupported reference type", "type", fmt.Sprintf("%T", n)) addUnknownParam(ref) } } return a, nil } ================================================ FILE: internal/compiler/result.go ================================================ package compiler import ( "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) type Result struct { Catalog *catalog.Catalog Queries []*Query } ================================================ FILE: internal/compiler/selector.go ================================================ 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 } ================================================ FILE: internal/compiler/selector_test.go ================================================ 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"}) }) } ================================================ FILE: internal/compiler/to_column.go ================================================ package compiler import ( "strings" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" ) func arrayDims(n *ast.TypeName) int { if n == nil || n.ArrayBounds == nil { return 0 } return len(n.ArrayBounds.Items) } func toColumn(n *ast.TypeName) *Column { if n == nil { panic("can't build column for nil type name") } typ, err := ParseTypeName(n) if err != nil { panic("toColumn: " + err.Error()) } arrayDims := arrayDims(n) return &Column{ Type: typ, DataType: strings.TrimPrefix(astutils.Join(n.Names, "."), "."), NotNull: true, // XXX: How do we know if this should be null? IsArray: arrayDims > 0, ArrayDims: arrayDims, } } ================================================ FILE: internal/config/config.go ================================================ package config import ( "bytes" "encoding/json" "errors" "io" "gopkg.in/yaml.v3" golang "github.com/sqlc-dev/sqlc/internal/codegen/golang/opts" ) type versionSetting struct { Number string `json:"version" yaml:"version"` } type Engine string type Paths []string func (p *Paths) UnmarshalJSON(data []byte) error { if string(data[0]) == `[` { var out []string if err := json.Unmarshal(data, &out); err != nil { return nil } *p = Paths(out) return nil } var out string if err := json.Unmarshal(data, &out); err != nil { return nil } *p = Paths([]string{out}) return nil } func (p *Paths) UnmarshalYAML(unmarshal func(interface{}) error) error { out := []string{} if sliceErr := unmarshal(&out); sliceErr != nil { var ele string if strErr := unmarshal(&ele); strErr != nil { return strErr } out = []string{ele} } *p = Paths(out) return nil } const ( EngineMySQL Engine = "mysql" EnginePostgreSQL Engine = "postgresql" EngineSQLite Engine = "sqlite" ) type Config struct { 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 { URI string `json:"uri" yaml:"uri"` Managed bool `json:"managed" yaml:"managed"` } type Cloud struct { Organization string `json:"organization" yaml:"organization"` Project string `json:"project" yaml:"project"` Hostname string `json:"hostname" yaml:"hostname"` AuthToken string `json:"-" yaml:"-"` } type Plugin struct { Name string `json:"name" yaml:"name"` Env []string `json:"env" yaml:"env"` Process *struct { Cmd string `json:"cmd" yaml:"cmd"` Format string `json:"format" yaml:"format"` } `json:"process" yaml:"process"` WASM *struct { URL string `json:"url" yaml:"url"` SHA256 string `json:"sha256" yaml:"sha256"` } `json:"wasm" yaml:"wasm"` } type Rule struct { Name string `json:"name" yaml:"name"` Rule string `json:"rule" yaml:"rule"` Msg string `json:"message" yaml:"message"` } type Overrides struct { Go *golang.GlobalOptions `json:"go,omitempty" yaml:"go"` } type SQL struct { Name string `json:"name" yaml:"name"` Engine Engine `json:"engine,omitempty" yaml:"engine"` Schema Paths `json:"schema" yaml:"schema"` Queries Paths `json:"queries" yaml:"queries"` Database *Database `json:"database" yaml:"database"` StrictFunctionChecks bool `json:"strict_function_checks" yaml:"strict_function_checks"` StrictOrderBy *bool `json:"strict_order_by" yaml:"strict_order_by"` Gen SQLGen `json:"gen" yaml:"gen"` Codegen []Codegen `json:"codegen" yaml:"codegen"` Rules []string `json:"rules" yaml:"rules"` Analyzer Analyzer `json:"analyzer" yaml:"analyzer"` } // AnalyzerDatabase represents the database analyzer setting. // It can be a boolean (true/false) or the string "only" for database-only mode. type AnalyzerDatabase struct { value *bool // nil means not set, true/false for boolean values isOnly bool // true when set to "only" } // IsEnabled returns true if the database analyzer should be used. // Returns true for both `true` and `"only"` settings. func (a AnalyzerDatabase) IsEnabled() bool { if a.isOnly { return true } return a.value == nil || *a.value } // IsOnly returns true if the analyzer is set to "only" mode. func (a AnalyzerDatabase) IsOnly() bool { return a.isOnly } func (a *AnalyzerDatabase) UnmarshalJSON(data []byte) error { // Try to unmarshal as boolean first var b bool if err := json.Unmarshal(data, &b); err == nil { a.value = &b a.isOnly = false return nil } // Try to unmarshal as string var s string if err := json.Unmarshal(data, &s); err == nil { if s == "only" { a.isOnly = true a.value = nil return nil } return errors.New("analyzer.database must be true, false, or \"only\"") } return errors.New("analyzer.database must be true, false, or \"only\"") } func (a *AnalyzerDatabase) UnmarshalYAML(unmarshal func(interface{}) error) error { // Try to unmarshal as boolean first var b bool if err := unmarshal(&b); err == nil { a.value = &b a.isOnly = false return nil } // Try to unmarshal as string var s string if err := unmarshal(&s); err == nil { if s == "only" { a.isOnly = true a.value = nil return nil } return errors.New("analyzer.database must be true, false, or \"only\"") } return errors.New("analyzer.database must be true, false, or \"only\"") } type Analyzer struct { Database AnalyzerDatabase `json:"database" yaml:"database"` } // TODO: Figure out a better name for this type Codegen struct { Out string `json:"out" yaml:"out"` Plugin string `json:"plugin" yaml:"plugin"` Options yaml.Node `json:"options" yaml:"options"` } type SQLGen struct { Go *golang.Options `json:"go,omitempty" yaml:"go"` JSON *SQLJSON `json:"json,omitempty" yaml:"json"` } type SQLJSON struct { Out string `json:"out" yaml:"out"` Indent string `json:"indent,omitempty" yaml:"indent"` Filename string `json:"filename,omitempty" yaml:"filename"` } var ErrMissingEngine = errors.New("unknown engine") var ErrMissingVersion = errors.New("no version number") var ErrNoOutPath = errors.New("no output path") 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 ErrPluginBuiltin = errors.New("a built-in plugin with that name already exists") var ErrPluginNoName = errors.New("missing plugin name") var ErrPluginExists = errors.New("a plugin with that name already exists") var ErrPluginNotFound = errors.New("no plugin found") var ErrPluginNoType = errors.New("plugin: field `process` or `wasm` required") var ErrPluginBothTypes = errors.New("plugin: `process` and `wasm` cannot both be defined") var ErrPluginProcessNoCmd = errors.New("plugin: missing process command") var ErrInvalidDatabase = errors.New("database must be managed or have a non-empty URI") var ErrManagedDatabaseNoProject = errors.New(`managed databases require a cloud project If you don't have a project, you can create one from the sqlc Cloud dashboard at https://dashboard.sqlc.dev/. If you have a project, ensure you've set its id as the value of the "project" field within the "cloud" section of your sqlc configuration. The id will look similar to "01HA8TWGMYPHK0V2GGMB3R2TP9".`) var ErrManagedDatabaseNoAuthToken = errors.New(`managed databases require an auth token If you don't have an auth token, you can create one from the sqlc Cloud dashboard at https://dashboard.sqlc.dev/. If you have an auth token, ensure you've set it as the value of the SQLC_AUTH_TOKEN environment variable.`) func ParseConfig(rd io.Reader) (Config, error) { var buf bytes.Buffer var config Config var version versionSetting ver := io.TeeReader(rd, &buf) dec := yaml.NewDecoder(ver) if err := dec.Decode(&version); err != nil { return config, err } if version.Number == "" { return config, ErrMissingVersion } var err error switch version.Number { case "1": config, err = v1ParseConfig(&buf) if err != nil { return config, err } case "2": config, err = v2ParseConfig(&buf) if err != nil { return config, err } default: return config, ErrUnknownVersion } err = config.addEnvVars() if err != nil { return config, err } return config, nil } type CombinedSettings struct { Global Config Package SQL Go golang.Options JSON SQLJSON // TODO: Combine these into a more usable type Codegen Codegen } func Combine(conf Config, pkg SQL) CombinedSettings { cs := CombinedSettings{ Global: conf, Package: pkg, } if pkg.Gen.Go != nil { cs.Go = *pkg.Gen.Go } if pkg.Gen.JSON != nil { cs.JSON = *pkg.Gen.JSON } return cs } ================================================ FILE: internal/config/config_test.go ================================================ package config import ( "strings" "testing" "github.com/google/go-cmp/cmp" ) const missingVersion = `{ }` const missingPackages = `{ "version": "1" }` const unknownVersion = `{ "version": "foo" }` const unknownFields = `{ "version": "1", "foo": "bar" }` func TestBadConfigs(t *testing.T) { for _, test := range []struct { name string err string json string }{ { "missing version", "no version number", missingVersion, }, { "missing packages", "no packages", missingPackages, }, { "unknown version", "invalid version number", unknownVersion, }, { "unknown fields", `yaml: unmarshal errors: line 3: field foo not found in type config.V1GenerateSettings`, unknownFields, }, } { tt := test t.Run(tt.name, func(t *testing.T) { _, err := ParseConfig(strings.NewReader(tt.json)) if err == nil { t.Fatalf("expected err; got nil") } if diff := cmp.Diff(err.Error(), tt.err); diff != "" { t.Errorf("differed (-want +got):\n%s", diff) } }) } } const validConfigOne = `{ "version": "1" "packages": [] }` func FuzzConfig(f *testing.F) { f.Add(validConfigOne) f.Fuzz(func(t *testing.T, orig string) { ParseConfig(strings.NewReader(orig)) }) } func TestInvalidConfig(t *testing.T) { err := Validate(&Config{ SQL: []SQL{{ Database: &Database{ URI: "", Managed: false, }, }}, }) if err == nil { t.Errorf("expected err; got nil") } } ================================================ FILE: internal/config/convert/convert.go ================================================ package convert import ( "encoding/json" "fmt" "strconv" "gopkg.in/yaml.v3" ) func gen(n *yaml.Node) (interface{}, error) { switch n.Kind { case yaml.MappingNode: nn := map[string]interface{}{} for i, _ := range n.Content { if i%2 == 0 { k := n.Content[i] v, err := gen(n.Content[i+1]) if err != nil { return nil, err } nn[k.Value] = v } } return nn, nil case yaml.SequenceNode: nn := []interface{}{} for i, _ := range n.Content { v, err := gen(n.Content[i]) if err != nil { return nil, err } nn = append(nn, v) } return nn, nil case yaml.ScalarNode: switch n.Tag { case "!!bool": return strconv.ParseBool(n.Value) case "!!float": return strconv.ParseFloat(n.Value, 64) case "!!int": return strconv.Atoi(n.Value) case "!!null": return nil, nil case "!!str": return n.Value, nil default: return n.Value, nil } case yaml.AliasNode: return gen(n.Alias) default: return nil, fmt.Errorf("unknown yaml value: %s (%s)", n.Value, n.Tag) } } func YAMLtoJSON(n yaml.Node) ([]byte, error) { if n.Kind == 0 { return []byte{}, nil } iface, err := gen(&n) if err != nil { return nil, err } blob, err := json.Marshal(iface) if err != nil { return nil, err } return blob, nil } ================================================ FILE: internal/config/convert/convert_test.go ================================================ package convert import ( "testing" "gopkg.in/yaml.v3" ) const anchor = ` sql: - schema: query.sql queries: query.sql engine: postgresql codegen: - out: gateway/src/gateway/services/organization plugin: py options: &base-options query_parameter_limit: 1 package: gateway output_models_file_name: null emit_module: true emit_generators: false emit_async: true - schema: query.sql queries: query.sql engine: postgresql codegen: - out: gateway/src/gateway/services/project plugin: py options: *base-options ` type config struct { SQL yaml.Node `yaml:"sql"` } func TestAlias(t *testing.T) { var a config err := yaml.Unmarshal([]byte(anchor), &a) if err != nil { t.Fatal(err) } if _, err := gen(&a.SQL); err != nil { t.Fatal(err) } } ================================================ FILE: internal/config/env.go ================================================ package config import ( "fmt" "os" "strings" ) func (c *Config) addEnvVars() error { authToken := os.Getenv("SQLC_AUTH_TOKEN") if authToken != "" && !strings.HasPrefix(authToken, "sqlc_") { return fmt.Errorf("$SQLC_AUTH_TOKEN doesn't start with \"sqlc_\"") } c.Cloud.AuthToken = authToken return nil } ================================================ FILE: internal/config/v_one.go ================================================ package config import ( "fmt" "io" "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 []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"` 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) { dec := yaml.NewDecoder(rd) dec.KnownFields(true) var settings V1GenerateSettings var config Config if err := dec.Decode(&settings); err != nil { return config, err } if settings.Version == "" { return config, ErrMissingVersion } if settings.Version != "1" { return config, ErrUnknownVersion } if len(settings.Packages) == 0 { return config, ErrNoPackages } if err := settings.ValidateGlobalOverrides(); err != nil { return config, err } for j := range settings.Packages { if settings.Packages[j].Path == "" { return config, ErrNoPackagePath } 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 } func (c *V1GenerateSettings) ValidateGlobalOverrides() error { engines := map[Engine]struct{}{} for _, pkg := range c.Packages { if _, ok := engines[pkg.Engine]; !ok { engines[pkg.Engine] = struct{}{} } } usesMultipleEngines := len(engines) > 1 for _, oride := range c.Overrides { if usesMultipleEngines && oride.Engine == "" { return fmt.Errorf(`the "engine" field is required for global type overrides because your configuration uses multiple database engines`) } } return nil } func (c *V1GenerateSettings) Translate() Config { conf := Config{ Version: c.Version, Cloud: c.Cloud, Rules: c.Rules, } for _, pkg := range c.Packages { if pkg.StrictOrderBy == nil { defaultValue := true pkg.StrictOrderBy = &defaultValue } conf.SQL = append(conf.SQL, SQL{ Name: pkg.Name, Engine: pkg.Engine, Database: pkg.Database, Schema: pkg.Schema, Queries: pkg.Queries, Rules: pkg.Rules, Analyzer: pkg.Analyzer, Gen: SQLGen{ Go: &golang.Options{ EmitInterface: pkg.EmitInterface, 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, EmitPointersForNullTypes: pkg.EmitPointersForNullTypes, EmitEnumValidMethod: pkg.EmitEnumValidMethod, EmitAllEnumValues: pkg.EmitAllEnumValues, EmitSqlAsComment: pkg.EmitSqlAsComment, Package: pkg.Name, Out: pkg.Path, SqlPackage: pkg.SQLPackage, SqlDriver: pkg.SQLDriver, Overrides: pkg.Overrides, JsonTagsCaseStyle: pkg.JSONTagsCaseStyle, OutputBatchFileName: pkg.OutputBatchFileName, OutputDbFileName: pkg.OutputDBFileName, OutputModelsFileName: pkg.OutputModelsFileName, OutputQuerierFileName: pkg.OutputQuerierFileName, OutputCopyfromFileName: pkg.OutputCopyFromFileName, OutputFilesSuffix: pkg.OutputFilesSuffix, QueryParameterLimit: pkg.QueryParameterLimit, OmitSqlcVersion: pkg.OmitSqlcVersion, OmitUnusedStructs: pkg.OmitUnusedStructs, BuildTags: pkg.BuildTags, }, }, StrictFunctionChecks: pkg.StrictFunctionChecks, StrictOrderBy: pkg.StrictOrderBy, }) } if len(c.Overrides) > 0 || len(c.Rename) > 0 { conf.Overrides.Go = &golang.GlobalOptions{ Overrides: c.Overrides, Rename: c.Rename, } } return conf } ================================================ FILE: internal/config/v_one.json ================================================ { "$schema": "http://json-schema.org/draft-07/schema", "type": "object", "required": [ "version" ], "properties": { "version": { "const": "1" }, "cloud": { "type": "object", "properties": { "organization": { "type": "string" }, "project": { "type": "string" }, "hostname": { "type": "string" } } }, "packages": { "type": "array", "minItems": 1, "items": { "type": "object", "required": [ "engine" ], "properties": { "engine": { "enum": [ "postgresql", "mysql", "sqlite" ] }, "schema": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "queries": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "database": { "type": "object", "properties": { "uri": { "type": "string" }, "managed": { "type": "boolean" } } }, "analyzer": { "type": "object", "properties": { "database": { "oneOf": [ {"type": "boolean"}, {"const": "only"} ] } } }, "strict_function_checks": { "type": "boolean" }, "strict_order_by": { "type": "boolean" }, "emit_interface": { "type": "boolean" }, "emit_json_tags": { "type": "boolean" }, "json_tags_id_uppercase": { "type": "boolean" }, "emit_db_tags": { "type": "boolean" }, "emit_prepared_queries": { "type": "boolean" }, "emit_exact_table_names": { "type": "boolean" }, "emit_empty_slices": { "type": "boolean" }, "emit_exported_queries": { "type": "boolean" }, "emit_result_struct_pointers": { "type": "boolean" }, "emit_params_struct_pointers": { "type": "boolean" }, "emit_methods_with_db_argument": { "type": "boolean" }, "emit_pointers_for_null_types": { "type": "boolean" }, "emit_enum_valid_method": { "type": "boolean" }, "emit_all_enum_values": { "type": "boolean" }, "emit_sql_as_comment": { "type": "boolean" }, "build_tags": { "type": "string" }, "json_tags_case_style": { "type": "string" }, "package": { "type": "string" }, "out": { "type": "string" }, "overrides": { "type": "array", "items": { "type": "object", "properties": { "go_type": { "oneOf": [ { "type": "object", "properties": { "import": { "type": "string" }, "package": { "type": "string" }, "type": { "type": "string" }, "pointer": { "type": "boolean" }, "slice": { "type": "boolean" }, "spec": { "type": "string" }, "builtin": { "type": "boolean" } } }, { "type": "string" } ] }, "go_struct_tag": { "type": "string" }, "db_type": { "type": "string" }, "engine": { "enum": [ "postgresql", "mysql", "sqlite" ] }, "nullable": { "type": "boolean" }, "unsigned": { "type": "boolean" }, "column": { "type": "string" } } } }, "sql_package": { "type": "string" }, "sql_driver": { "type": "string" }, "output_batch_file_name": { "type": "string" }, "output_db_file_name": { "type": "string" }, "output_models_file_name": { "type": "string" }, "output_querier_file_name": { "type": "string" }, "output_copyfrom_file_name": { "type": "string" }, "output_files_suffix": { "type": "string" }, "inflection_exclude_table_names": { "type": "array", "items": { "type": "string" } }, "query_parameter_limit": { "type": "integer" }, "omit_unused_structs": { "type": "boolean" }, "rules": { "type": "array", "items": { "type": "string" } } } } }, "overrides": { "type": "array", "items": { "type": "object", "properties": { "go_type": { "oneOf": [ { "type": "object", "properties": { "import": { "type": "string" }, "package": { "type": "string" }, "type": { "type": "string" }, "pointer": { "type": "boolean" }, "slice": { "type": "boolean" }, "spec": { "type": "string" }, "builtin": { "type": "boolean" } } }, { "type": "string" } ] }, "go_struct_tag": { "type": "string" }, "db_type": { "type": "string" }, "engine": { "enum": [ "postgresql", "mysql", "sqlite" ] }, "nullable": { "type": "boolean" }, "unsigned": { "type": "boolean" }, "column": { "type": "string" } } } } }, "rename": { "type": "object", "patternProperties": { ".*": { "type": "string" } } }, "rules": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "rule": { "type": "string" }, "message": { "type": "string" } } } } } ================================================ FILE: internal/config/v_two.go ================================================ package config import ( "fmt" "io" yaml "gopkg.in/yaml.v3" ) func v2ParseConfig(rd io.Reader) (Config, error) { dec := yaml.NewDecoder(rd) dec.KnownFields(true) var conf Config if err := dec.Decode(&conf); err != nil { return conf, err } if conf.Version == "" { return conf, ErrMissingVersion } if conf.Version != "2" { return conf, ErrUnknownVersion } if len(conf.SQL) == 0 { return conf, ErrNoPackages } if err := conf.validateGlobalOverrides(); err != nil { return conf, err } // TODO: Store built-in plugins somewhere else builtins := map[string]struct{}{ "go": {}, "json": {}, } plugins := map[string]struct{}{} for i := range conf.Plugins { if conf.Plugins[i].Name == "" { return conf, ErrPluginNoName } if _, ok := builtins[conf.Plugins[i].Name]; ok { return conf, ErrPluginBuiltin } if _, ok := plugins[conf.Plugins[i].Name]; ok { return conf, ErrPluginExists } if conf.Plugins[i].Process == nil && conf.Plugins[i].WASM == nil { return conf, ErrPluginNoType } if conf.Plugins[i].Process != nil && conf.Plugins[i].WASM != nil { return conf, ErrPluginBothTypes } if conf.Plugins[i].Process != nil { if conf.Plugins[i].Process.Cmd == "" { return conf, ErrPluginProcessNoCmd } } plugins[conf.Plugins[i].Name] = struct{}{} } for j := range conf.SQL { if conf.SQL[j].Engine == "" { return conf, ErrMissingEngine } if conf.SQL[j].Gen.Go != nil { if conf.SQL[j].Gen.Go.Out == "" { return conf, ErrNoPackagePath } } if conf.SQL[j].Gen.JSON != nil { if conf.SQL[j].Gen.JSON.Out == "" { return conf, ErrNoOutPath } } for _, cg := range conf.SQL[j].Codegen { if cg.Plugin == "" { return conf, ErrPluginNoName } if cg.Out == "" { return conf, ErrNoOutPath } // TODO: Allow the use of built-in codegen from here if _, ok := plugins[cg.Plugin]; !ok { return conf, ErrPluginNotFound } } if conf.SQL[j].StrictOrderBy == nil { defaultValidate := true conf.SQL[j].StrictOrderBy = &defaultValidate } } return conf, nil } func (c *Config) validateGlobalOverrides() error { engines := map[Engine]struct{}{} for _, pkg := range c.SQL { if _, ok := engines[pkg.Engine]; !ok { engines[pkg.Engine] = struct{}{} } } if c.Overrides.Go == nil { return nil } usesMultipleEngines := len(engines) > 1 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`) } } return nil } ================================================ FILE: internal/config/v_two.json ================================================ { "$schema": "http://json-schema.org/draft-07/schema", "type": "object", "required": [ "version" ], "properties": { "version": { "const": "2" }, "cloud": { "type": "object", "properties": { "organization": { "type": "string" }, "project": { "type": "string" }, "hostname": { "type": "string" } } }, "sql": { "type": "array", "minItems": 1, "items": { "type": "object", "required": [ "engine" ], "properties": { "name": { "type": "string" }, "engine": { "enum": [ "postgresql", "mysql", "sqlite" ] }, "schema": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "queries": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "database": { "type": "object", "properties": { "uri": { "type": "string" }, "managed": { "type": "boolean" } } }, "analyzer": { "type": "object", "properties": { "database": { "oneOf": [ {"type": "boolean"}, {"const": "only"} ] } } }, "strict_function_checks": { "type": "boolean" }, "strict_order_by": { "type": "boolean" }, "gen": { "type": "object", "properties": { "go": { "type": "object", "properties": { "emit_interface": { "type": "boolean" }, "emit_json_tags": { "type": "boolean" }, "json_tags_id_uppercase": { "type": "boolean" }, "emit_db_tags": { "type": "boolean" }, "emit_prepared_queries": { "type": "boolean" }, "emit_exact_table_names": { "type": "boolean" }, "emit_empty_slices": { "type": "boolean" }, "emit_exported_queries": { "type": "boolean" }, "emit_result_struct_pointers": { "type": "boolean" }, "emit_params_struct_pointers": { "type": "boolean" }, "emit_methods_with_db_argument": { "type": "boolean" }, "emit_pointers_for_null_types": { "type": "boolean" }, "emit_enum_valid_method": { "type": "boolean" }, "emit_all_enum_values": { "type": "boolean" }, "emit_sql_as_comment": { "type": "boolean" }, "build_tags": { "type": "string" }, "json_tags_case_style": { "type": "string" }, "package": { "type": "string" }, "out": { "type": "string" }, "overrides": { "type": "array", "items": { "type": "object", "properties": { "go_type": { "oneOf": [ { "type": "object", "properties": { "import": { "type": "string" }, "package": { "type": "string" }, "type": { "type": "string" }, "pointer": { "type": "boolean" }, "slice": { "type": "boolean" }, "spec": { "type": "string" }, "builtin": { "type": "boolean" } } }, { "type": "string" } ] }, "go_struct_tag": { "type": "string" }, "db_type": { "type": "string" }, "engine": { "enum": [ "postgresql", "mysql", "sqlite" ] }, "nullable": { "type": "boolean" }, "unsigned": { "type": "boolean" }, "column": { "type": "string" } } } } }, "rename": { "type": "object", "patternProperties": { ".*": { "type": "string" } } }, "sql_package": { "type": "string" }, "sql_driver": { "type": "string" }, "output_batch_file_name": { "type": "string" }, "output_db_file_name": { "type": "string" }, "output_models_file_name": { "type": "string" }, "output_querier_file_name": { "type": "string" }, "output_copyfrom_file_name": { "type": "string" }, "output_files_suffix": { "type": "string" }, "inflection_exclude_table_names": { "type": "array", "items": { "type": "string" } }, "query_parameter_limit": { "type": "integer" }, "omit_unused_structs": { "type": "boolean" } }, "json": { "type": "object", "properties": { "out": { "type": "string" }, "indent": { "type": "string" }, "filename": { "type": "string" } } } } }, "codegen": { "type": "array", "items": { "type": "object", "properties": { "out": { "type": "string" }, "plugin": { "type": "string" }, "options": { "type": "object" } } } }, "rules": { "type": "array", "items": { "type": "string" } } } } }, "overrides": { "type": "object", "properties": { "go": { "type": "object", "properties": { "overrides": { "type": "array", "items": { "type": "object", "properties": { "go_type": { "oneOf": [ { "type": "object", "properties": { "import": { "type": "string" }, "package": { "type": "string" }, "type": { "type": "string" }, "pointer": { "type": "boolean" }, "slice": { "type": "boolean" }, "spec": { "type": "string" }, "builtin": { "type": "boolean" } } }, { "type": "string" } ] }, "go_struct_tag": { "type": "string" }, "db_type": { "type": "string" }, "engine": { "enum": [ "postgresql", "mysql", "sqlite" ] }, "nullable": { "type": "boolean" }, "unsigned": { "type": "boolean" }, "column": { "type": "string" } } } }, "rename": { "type": "object", "patternProperties": { ".*": { "type": "string" } } } } } } }, "plugins": { "type": "array", "items": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "minLength": 1 }, "env": { "type": "array", "items": { "type": "string" } }, "process": { "type": "object", "properties": { "cmd": { "type": "string" } } }, "wasm": { "type": "object", "properties": { "url": { "type": "string" }, "sha256": { "type": "string" } } } } } }, "rules": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "rule": { "type": "string" }, "message": { "type": "string" } } } } } } ================================================ FILE: internal/config/validate.go ================================================ package config func Validate(c *Config) error { for _, sql := range c.SQL { if sql.Database != nil { if sql.Database.URI == "" && !sql.Database.Managed { return ErrInvalidDatabase } } } return nil } ================================================ FILE: internal/constants/query.go ================================================ package constants // Flags const ( QueryFlagParam = "@param" QueryFlagSqlcVetDisable = "@sqlc-vet-disable" ) // Rules const ( QueryRuleDbPrepare = "sqlc/db-prepare" ) ================================================ FILE: internal/dbmanager/client.go ================================================ 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), } } ================================================ FILE: internal/debug/dump.go ================================================ package debug import ( "encoding/json" "fmt" "os" "github.com/davecgh/go-spew/spew" "github.com/sqlc-dev/sqlc/internal/opts" ) var Active bool var Debug opts.Debug func init() { Active = os.Getenv("SQLCDEBUG") != "" if Active { Debug = opts.DebugFromEnv() } } func Dump(n ...interface{}) { if Active { spew.Dump(n) } } func DumpAsJSON(a any) { if Active { out, _ := json.MarshalIndent(a, "", " ") fmt.Printf("%s\n", out) } } ================================================ FILE: internal/endtoend/CLAUDE.md ================================================ # End-to-End Tests - Native Database Setup This document describes how to set up MySQL and PostgreSQL for running end-to-end tests in environments without Docker, particularly when using an HTTP proxy. ## Overview The end-to-end tests support three methods for connecting to databases: 1. **Environment Variables**: Set `POSTGRESQL_SERVER_URI` and `MYSQL_SERVER_URI` directly 2. **Docker**: Automatically starts containers via the docker package 3. **Native Installation**: Starts existing database services on Linux ## Installing Databases with HTTP Proxy In environments where DNS doesn't work directly but an HTTP proxy is available (e.g., some CI environments), you need to configure apt to use the proxy before installing packages. ### Configure apt Proxy ```bash # Check if HTTP_PROXY is set echo $HTTP_PROXY # Configure apt to use the proxy sudo tee /etc/apt/apt.conf.d/99proxy << EOF Acquire::http::Proxy "$HTTP_PROXY"; Acquire::https::Proxy "$HTTPS_PROXY"; EOF # Update package lists sudo apt-get update -qq ``` ### Install PostgreSQL ```bash # Install PostgreSQL sudo DEBIAN_FRONTEND=noninteractive apt-get install -y postgresql postgresql-contrib # Start the service sudo service postgresql start # Set password for postgres user sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" # Configure pg_hba.conf for password authentication # Find the hba_file location: sudo -u postgres psql -t -c "SHOW hba_file;" # Add md5 authentication for localhost (add to the beginning of pg_hba.conf): # host all all 127.0.0.1/32 md5 # Reload PostgreSQL sudo service postgresql reload ``` ### Install MySQL ```bash # Pre-configure MySQL root password echo "mysql-server mysql-server/root_password password mysecretpassword" | sudo debconf-set-selections echo "mysql-server mysql-server/root_password_again password mysecretpassword" | sudo debconf-set-selections # Install MySQL sudo DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server # Start the service sudo service mysql start # Verify connection mysql -uroot -pmysecretpassword -e "SELECT 1;" ``` ## Expected Database Credentials The native database support expects the following credentials: ### PostgreSQL - **URI**: `postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable` - **User**: `postgres` - **Password**: `postgres` - **Port**: `5432` ### MySQL - **URI**: `root:mysecretpassword@tcp(localhost:3306)/mysql?multiStatements=true&parseTime=true` - **User**: `root` - **Password**: `mysecretpassword` - **Port**: `3306` ## Running Tests ```bash # Run end-to-end tests go test -v -run TestReplay -timeout 20m ./internal/endtoend/... # With verbose logging go test -v -run TestReplay -timeout 20m ./internal/endtoend/... 2>&1 | tee test.log ``` ## Troubleshooting ### apt-get times out or fails - Ensure HTTP proxy is configured in `/etc/apt/apt.conf.d/99proxy` - Check that the proxy URL is correct: `echo $HTTP_PROXY` - Try running `sudo apt-get update` first to verify connectivity ### MySQL connection refused - Check if MySQL is running: `sudo service mysql status` - Verify the password: `mysql -uroot -pmysecretpassword -e "SELECT 1;"` - Check if MySQL is listening on TCP: `netstat -tlnp | grep 3306` ### PostgreSQL authentication failed - Verify pg_hba.conf has md5 authentication for localhost - Check password: `PGPASSWORD=postgres psql -h localhost -U postgres -c "SELECT 1;"` - Reload PostgreSQL after config changes: `sudo service postgresql reload` ### DNS resolution fails This is expected in some environments. Configure apt proxy as shown above. ================================================ FILE: internal/endtoend/case_test.go ================================================ package main import ( "encoding/json" "fmt" "os" "path/filepath" "runtime" "strings" "testing" ) type Testcase struct { Name string Path string ConfigName string Stderr []byte 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 { if _, err := os.Stat(path); !os.IsNotExist(err) { blob, err := os.ReadFile(path) if err != nil { t.Fatal(err) } return blob } } return nil } func parseExec(t *testing.T, dir string) *Exec { t.Helper() path := filepath.Join(dir, "exec.json") if _, err := os.Stat(path); os.IsNotExist(err) { return nil } var e Exec blob, err := os.ReadFile(path) if err != nil { t.Fatalf("%s: %s", path, err) } if err := json.Unmarshal(blob, &e); err != nil { t.Fatalf("%s: %s", path, err) } if e.Command == "" { e.Command = "generate" } return &e } func FindTests(t *testing.T, root, testctx string) []*Testcase { var tcs []*Testcase err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error { if err != nil { return err } if info.Name() == "sqlc.json" || info.Name() == "sqlc.yaml" || info.Name() == "sqlc.yml" { dir := filepath.Dir(path) tcs = append(tcs, &Testcase{ Path: dir, Name: strings.TrimPrefix(dir, root+string(filepath.Separator)), ConfigName: info.Name(), Stderr: parseStderr(t, dir, testctx), Exec: parseExec(t, dir), }) return filepath.SkipDir } return nil }) if err != nil { t.Fatal(err) } return tcs } ================================================ FILE: internal/endtoend/ddl_test.go ================================================ package main import ( "fmt" "os" "path/filepath" "testing" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/sqltest/local" ) func TestValidSchema(t *testing.T) { for _, replay := range FindTests(t, "testdata", "base") { replay := replay // https://golang.org/doc/faq#closures_and_goroutines if replay.Exec != nil { if replay.Exec.Meta.InvalidSchema { continue } } file := filepath.Join(replay.Path, replay.ConfigName) rd, err := os.Open(file) if err != nil { t.Fatal(err) } conf, err := config.ParseConfig(rd) if err != nil { t.Fatal(err) } for j, pkg := range conf.SQL { j, pkg := j, pkg 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() var schema []string for _, path := range pkg.Schema { schema = append(schema, filepath.Join(filepath.Dir(file), path)) } switch pkg.Engine { case config.EnginePostgreSQL: local.PostgreSQL(t, schema) case config.EngineMySQL: local.MySQL(t, schema) } }) } } } ================================================ FILE: internal/endtoend/endtoend_test.go ================================================ package main import ( "bytes" "context" "os" osexec "os/exec" "path/filepath" "runtime" "slices" "strings" "testing" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/sqlc-dev/sqlc/internal/cmd" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/opts" "github.com/sqlc-dev/sqlc/internal/sqltest/docker" "github.com/sqlc-dev/sqlc/internal/sqltest/native" ) 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() examples, err := filepath.Abs(filepath.Join("..", "..", "examples")) if err != nil { t.Fatal(err) } files, err := os.ReadDir(examples) if err != nil { t.Fatal(err) } for _, replay := range files { if !replay.IsDir() { continue } tc := replay.Name() t.Run(tc, func(t *testing.T) { t.Parallel() path := filepath.Join(examples, tc) var stderr bytes.Buffer opts := &cmd.Options{ Env: cmd.Env{}, Stderr: &stderr, } output, err := cmd.Generate(ctx, path, "", opts) if err != nil { t.Fatalf("sqlc generate failed: %s", stderr.String()) } cmpDirectory(t, path, output) }) } } func BenchmarkExamples(b *testing.B) { ctx := context.Background() examples, err := filepath.Abs(filepath.Join("..", "..", "examples")) if err != nil { b.Fatal(err) } files, err := os.ReadDir(examples) if err != nil { b.Fatal(err) } for _, replay := range files { if !replay.IsDir() { continue } tc := replay.Name() b.Run(tc, func(b *testing.B) { path := filepath.Join(examples, tc) for i := 0; i < b.N; i++ { var stderr bytes.Buffer opts := &cmd.Options{ Env: cmd.Env{}, Stderr: &stderr, } cmd.Generate(ctx, path, "", opts) } }) } } type textContext struct { Mutate func(*testing.T, string) func(*config.Config) Enabled func() bool } func TestReplay(t *testing.T) { // Ensure that this environment variable is always set to true when running // end-to-end tests os.Setenv("SQLC_DUMMY_VALUE", "true") // t.Parallel() ctx := context.Background() var mysqlURI, postgresURI string // First, check environment variables if uri := os.Getenv("POSTGRESQL_SERVER_URI"); uri != "" { postgresURI = uri } if uri := os.Getenv("MYSQL_SERVER_URI"); uri != "" { mysqlURI = uri } // Try Docker for any missing databases if postgresURI == "" || mysqlURI == "" { if err := docker.Installed(); err == nil { if postgresURI == "" { host, err := docker.StartPostgreSQLServer(ctx) if err != nil { t.Logf("docker postgresql startup failed: %s", err) } else { postgresURI = host } } if mysqlURI == "" { host, err := docker.StartMySQLServer(ctx) if err != nil { t.Logf("docker mysql startup failed: %s", err) } else { mysqlURI = host } } } } // Try native installation for any missing databases (Linux only) if postgresURI == "" || mysqlURI == "" { if err := native.Supported(); err == nil { if postgresURI == "" { host, err := native.StartPostgreSQLServer(ctx) if err != nil { t.Logf("native postgresql startup failed: %s", err) } else { postgresURI = host } } if mysqlURI == "" { host, err := native.StartMySQLServer(ctx) if err != nil { t.Logf("native mysql startup failed: %s", err) } else { mysqlURI = host } } } } // Log which databases are available t.Logf("PostgreSQL available: %v (URI: %s)", postgresURI != "", postgresURI) t.Logf("MySQL available: %v (URI: %s)", mysqlURI != "", mysqlURI) contexts := map[string]textContext{ "base": { Mutate: func(t *testing.T, path string) func(*config.Config) { return func(c *config.Config) {} }, Enabled: func() bool { return true }, }, "managed-db": { Mutate: func(t *testing.T, path string) func(*config.Config) { return func(c *config.Config) { // Add all servers - tests will fail if database isn't available 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, } case config.EngineSQLite: c.SQL[i].Database = &config.Database{ Managed: true, } default: // pass } } } }, Enabled: func() bool { // Enabled if at least one database URI is available return postgresURI != "" || mysqlURI != "" }, }, } for name, testctx := range contexts { name := name testctx := testctx if !testctx.Enabled() { continue } for _, replay := range FindTests(t, "testdata", name) { tc := replay t.Run(filepath.Join(name, tc.Name), func(t *testing.T) { var stderr bytes.Buffer var output map[string]string var err error path, _ := filepath.Abs(tc.Path) args := tc.Exec if args == nil { args = &Exec{Command: "generate"} } expected := string(tc.Stderr) if args.Process != "" { _, err := osexec.LookPath(args.Process) if err != nil { t.Skipf("executable not found: %s %s", args.Process, err) } } if len(args.Contexts) > 0 { if !slices.Contains(args.Contexts, name) { t.Skipf("unsupported context: %s", name) } } 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"]), Experiment: opts.ExperimentFromString(args.Env["SQLCEXPERIMENT"]), NoRemote: true, }, Stderr: &stderr, MutateConfig: testctx.Mutate(t, path), } switch args.Command { case "diff": err = cmd.Diff(ctx, path, "", &opts) case "generate": output, err = cmd.Generate(ctx, path, "", &opts) if err == nil { cmpDirectory(t, path, output) } case "vet": err = cmd.Vet(ctx, path, "", &opts) default: t.Fatalf("unknown command") } if len(expected) == 0 && err != nil { t.Fatalf("sqlc %s failed: %s", args.Command, stderr.String()) } diff := cmp.Diff( strings.TrimSpace(expected), strings.TrimSpace(stderr.String()), stderrTransformer(), ) if diff != "" { t.Fatalf("stderr differed (-want +got):\n%s", diff) } }) } } } func cmpDirectory(t *testing.T, dir string, actual map[string]string) { expected := map[string]string{} var ff = func(path string, file os.FileInfo, err error) error { if err != nil { return err } if file.IsDir() { return nil } if !strings.HasSuffix(path, ".go") && !strings.HasSuffix(path, ".kt") && !strings.HasSuffix(path, ".py") && !strings.HasSuffix(path, ".json") && !strings.HasSuffix(path, ".txt") { return nil } // TODO: Figure out a better way to ignore certain files if strings.HasSuffix(path, ".txt") && filepath.Base(path) != "hello.txt" { return nil } if filepath.Base(path) == "sqlc.json" { return nil } if filepath.Base(path) == "exec.json" { return nil } if strings.Contains(path, "/kotlin/build") { return nil } if strings.HasSuffix(path, "_test.go") || strings.Contains(path, "src/test/") { return nil } if strings.Contains(path, "/python/.venv") || strings.Contains(path, "/python/src/tests/") || strings.HasSuffix(path, "__init__.py") || strings.Contains(path, "/python/src/dbtest/") || strings.Contains(path, "/python/.mypy_cache") { return nil } blob, err := os.ReadFile(path) if err != nil { return err } expected[path] = string(blob) return nil } if err := filepath.Walk(dir, ff); err != nil { t.Fatal(err) } 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 if actual[name] == "" { t.Errorf("%s is empty", name) return } if diff := cmp.Diff(contents, actual[name], opts...); diff != "" { t.Errorf("%s differed (-want +got):\n%s", name, diff) } } } } func BenchmarkReplay(b *testing.B) { ctx := context.Background() var dirs []string err := filepath.Walk("testdata", func(path string, info os.FileInfo, err error) error { if err != nil { return err } if info.Name() == "sqlc.json" || info.Name() == "sqlc.yaml" || info.Name() == "sqlc.yml" { dirs = append(dirs, filepath.Dir(path)) return filepath.SkipDir } return nil }) if err != nil { b.Fatal(err) } for _, replay := range dirs { tc := replay b.Run(tc, func(b *testing.B) { path, _ := filepath.Abs(tc) for i := 0; i < b.N; i++ { var stderr bytes.Buffer opts := &cmd.Options{ Env: cmd.Env{}, Stderr: &stderr, } cmd.Generate(ctx, path, "", opts) } }) } } ================================================ FILE: internal/endtoend/fmt_test.go ================================================ package main import ( "bytes" "fmt" "io" "os" "path/filepath" "strings" "testing" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/debug" "github.com/sqlc-dev/sqlc/internal/engine/dolphin" "github.com/sqlc-dev/sqlc/internal/engine/postgresql" "github.com/sqlc-dev/sqlc/internal/engine/sqlite" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/format" ) // sqlParser is an interface for SQL parsers type sqlParser interface { Parse(r io.Reader) ([]ast.Statement, error) } // sqlFormatter is an interface for formatters type sqlFormatter interface { format.Dialect } func TestFormat(t *testing.T) { t.Parallel() for _, tc := range FindTests(t, "testdata", "base") { tc := tc t.Run(tc.Name, func(t *testing.T) { // Parse the config file to determine the engine configPath := filepath.Join(tc.Path, tc.ConfigName) configFile, err := os.Open(configPath) if err != nil { t.Fatal(err) } conf, err := config.ParseConfig(configFile) configFile.Close() if err != nil { t.Fatal(err) } // Skip if there are no SQL packages configured if len(conf.SQL) == 0 { return } engine := conf.SQL[0].Engine // Select the appropriate parser and fingerprint function based on engine var parse sqlParser var formatter sqlFormatter var fingerprint func(string) (string, error) switch engine { case config.EnginePostgreSQL: pgParser := postgresql.NewParser() parse = pgParser formatter = pgParser fingerprint = postgresql.Fingerprint case config.EngineMySQL: mysqlParser := dolphin.NewParser() parse = mysqlParser formatter = mysqlParser // For MySQL, we use a "round-trip" fingerprint: parse the SQL, format it, // and return the formatted string. This tests that our formatting produces // valid SQL that parses to the same AST structure. fingerprint = func(sql string) (string, error) { stmts, err := mysqlParser.Parse(strings.NewReader(sql)) if err != nil { return "", err } if len(stmts) == 0 { return "", nil } return ast.Format(stmts[0].Raw, mysqlParser), nil } case config.EngineSQLite: sqliteParser := sqlite.NewParser() parse = sqliteParser formatter = sqliteParser // For SQLite, we use the same "round-trip" fingerprint strategy as MySQL: // parse the SQL, format it, and return the formatted string. fingerprint = func(sql string) (string, error) { stmts, err := sqliteParser.Parse(strings.NewReader(sql)) if err != nil { return "", err } if len(stmts) == 0 { return "", nil } return strings.ToLower(ast.Format(stmts[0].Raw, sqliteParser)), nil } default: // Skip unsupported engines return } // Find query files from config var queryFiles []string for _, sql := range conf.SQL { for _, q := range sql.Queries { queryPath := filepath.Join(tc.Path, q) info, err := os.Stat(queryPath) if err != nil { continue } if info.IsDir() { // If it's a directory, glob for .sql files matches, err := filepath.Glob(filepath.Join(queryPath, "*.sql")) if err != nil { continue } queryFiles = append(queryFiles, matches...) } else { queryFiles = append(queryFiles, queryPath) } } } if len(queryFiles) == 0 { return } for _, queryFile := range queryFiles { if _, err := os.Stat(queryFile); os.IsNotExist(err) { continue } contents, err := os.ReadFile(queryFile) if err != nil { t.Fatal(err) } // Parse the entire file to get proper statement boundaries stmts, err := parse.Parse(bytes.NewReader(contents)) if err != nil { // Skip files with parse errors (e.g., syntax_errors test cases) return } for i, stmt := range stmts { stmt := stmt t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { // Extract the original query text using statement location and length start := stmt.Raw.StmtLocation length := stmt.Raw.StmtLen if length == 0 { // If StmtLen is 0, it means the statement goes to the end of the input length = len(contents) - start } query := strings.TrimSpace(string(contents[start : start+length])) expected, err := fingerprint(query) if err != nil { t.Fatal(err) } if false { r, err := postgresql.Parse(query) debug.Dump(r, err) } out := ast.Format(stmt.Raw, formatter) actual, err := fingerprint(out) if err != nil { t.Error(err) } if expected != actual { debug.Dump(stmt.Raw) t.Errorf("- %s", expected) t.Errorf("- %s", query) t.Errorf("+ %s", actual) t.Errorf("+ %s", out) } }) } } }) } } ================================================ FILE: internal/endtoend/json_schema_test.go ================================================ package main import ( "encoding/json" "io/fs" "os" "path/filepath" "testing" "github.com/xeipuuv/gojsonschema" ) type conf struct { Version string `json:"version"` } func loadSchema(t *testing.T, path string) *gojsonschema.Schema { t.Helper() schemaBytes, err := os.ReadFile(path) if err != nil { t.Fatal(err) } loader := gojsonschema.NewStringLoader(string(schemaBytes)) schema, err := gojsonschema.NewSchema(loader) if err != nil { t.Fatalf("invalid schema: %s", err) } return schema } func TestJsonSchema(t *testing.T) { t.Parallel() schemaOne := loadSchema(t, filepath.Join("..", "config", "v_one.json")) schemaTwo := loadSchema(t, filepath.Join("..", "config", "v_two.json")) srcs := []string{ filepath.Join("..", "..", "examples"), filepath.Join("testdata"), } for _, dir := range srcs { err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error { if err != nil { return err } if filepath.Base(path) != "sqlc.json" { return nil } t.Run(path, func(t *testing.T) { t.Parallel() contents, err := os.ReadFile(path) if err != nil { t.Fatal(err) } var c conf if err := json.Unmarshal(contents, &c); err != nil { t.Fatal(err) } l := gojsonschema.NewStringLoader(string(contents)) switch c.Version { case "1": if _, err := schemaOne.Validate(l); err != nil { t.Fatal(err) } case "2": if _, err := schemaTwo.Validate(l); err != nil { t.Fatal(err) } default: t.Fatalf("unknown schema version: %s", c.Version) } }) return nil }) if err != nil { t.Error(err) } } } ================================================ FILE: internal/endtoend/testdata/accurate_cte/postgresql/stdlib/exec.json ================================================ { "contexts": ["managed-db"], "env": { "SQLCEXPERIMENT": "analyzerv2" } } ================================================ FILE: internal/endtoend/testdata/accurate_cte/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/accurate_cte/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Product struct { ID int32 Name string Price string } ================================================ FILE: internal/endtoend/testdata/accurate_cte/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getProductStats = `-- name: GetProductStats :one WITH product_stats AS ( SELECT COUNT(*) as total, AVG(price) as avg_price FROM products ) SELECT total, avg_price FROM product_stats ` type GetProductStatsRow struct { Total int64 AvgPrice string } func (q *Queries) GetProductStats(ctx context.Context) (GetProductStatsRow, error) { row := q.db.QueryRowContext(ctx, getProductStats) var i GetProductStatsRow err := row.Scan(&i.Total, &i.AvgPrice) return i, err } const listExpensiveProducts = `-- name: ListExpensiveProducts :many WITH expensive AS ( SELECT id, name, price FROM products WHERE price > 100 ) SELECT id, name, price FROM expensive ` type ListExpensiveProductsRow struct { ID int32 Name string Price string } func (q *Queries) ListExpensiveProducts(ctx context.Context) ([]ListExpensiveProductsRow, error) { rows, err := q.db.QueryContext(ctx, listExpensiveProducts) if err != nil { return nil, err } defer rows.Close() var items []ListExpensiveProductsRow for rows.Next() { var i ListExpensiveProductsRow if err := rows.Scan(&i.ID, &i.Name, &i.Price); 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 } ================================================ FILE: internal/endtoend/testdata/accurate_cte/postgresql/stdlib/query.sql ================================================ -- name: ListExpensiveProducts :many WITH expensive AS ( SELECT * FROM products WHERE price > 100 ) SELECT * FROM expensive; -- name: GetProductStats :one WITH product_stats AS ( SELECT COUNT(*) as total, AVG(price) as avg_price FROM products ) SELECT * FROM product_stats; ================================================ FILE: internal/endtoend/testdata/accurate_cte/postgresql/stdlib/schema.sql ================================================ CREATE TABLE products ( id SERIAL PRIMARY KEY, name TEXT NOT NULL, price NUMERIC(10,2) NOT NULL ); ================================================ FILE: internal/endtoend/testdata/accurate_cte/postgresql/stdlib/sqlc.yaml ================================================ version: "2" sql: - engine: postgresql schema: "schema.sql" queries: "query.sql" database: managed: true analyzer: database: "only" gen: go: package: "querytest" out: "go" ================================================ FILE: internal/endtoend/testdata/accurate_enum/postgresql/stdlib/exec.json ================================================ { "contexts": ["managed-db"], "env": { "SQLCEXPERIMENT": "analyzerv2" } } ================================================ FILE: internal/endtoend/testdata/accurate_enum/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/accurate_enum/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type Status string const ( StatusPending Status = "pending" StatusActive Status = "active" StatusCompleted Status = "completed" ) func (e *Status) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Status(s) case string: *e = Status(s) default: return fmt.Errorf("unsupported scan type for Status: %T", src) } return nil } type NullStatus struct { Status Status Valid bool // Valid is true if Status is not NULL } // Scan implements the Scanner interface. func (ns *NullStatus) Scan(value interface{}) error { if value == nil { ns.Status, ns.Valid = "", false return nil } ns.Valid = true return ns.Status.Scan(value) } // Value implements the driver Valuer interface. func (ns NullStatus) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Status), nil } type Task struct { ID int32 Title string Status Status } ================================================ FILE: internal/endtoend/testdata/accurate_enum/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const createTask = `-- name: CreateTask :one INSERT INTO tasks (title, status) VALUES ($1, $2) RETURNING id, title, status ` type CreateTaskParams struct { Title string Status Status } func (q *Queries) CreateTask(ctx context.Context, arg CreateTaskParams) (Task, error) { row := q.db.QueryRowContext(ctx, createTask, arg.Title, arg.Status) var i Task err := row.Scan(&i.ID, &i.Title, &i.Status) return i, err } const getTasksByStatus = `-- name: GetTasksByStatus :many SELECT id, title, status FROM tasks WHERE status = $1 ` func (q *Queries) GetTasksByStatus(ctx context.Context, status Status) ([]Task, error) { rows, err := q.db.QueryContext(ctx, getTasksByStatus, status) if err != nil { return nil, err } defer rows.Close() var items []Task for rows.Next() { var i Task if err := rows.Scan(&i.ID, &i.Title, &i.Status); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listTasks = `-- name: ListTasks :many SELECT id, title, status FROM tasks ` func (q *Queries) ListTasks(ctx context.Context) ([]Task, error) { rows, err := q.db.QueryContext(ctx, listTasks) if err != nil { return nil, err } defer rows.Close() var items []Task for rows.Next() { var i Task if err := rows.Scan(&i.ID, &i.Title, &i.Status); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/accurate_enum/postgresql/stdlib/query.sql ================================================ -- name: ListTasks :many SELECT * FROM tasks; -- name: GetTasksByStatus :many SELECT * FROM tasks WHERE status = $1; -- name: CreateTask :one INSERT INTO tasks (title, status) VALUES ($1, $2) RETURNING *; ================================================ FILE: internal/endtoend/testdata/accurate_enum/postgresql/stdlib/schema.sql ================================================ CREATE TYPE status AS ENUM ('pending', 'active', 'completed'); CREATE TABLE tasks ( id SERIAL PRIMARY KEY, title TEXT NOT NULL, status status NOT NULL DEFAULT 'pending' ); ================================================ FILE: internal/endtoend/testdata/accurate_enum/postgresql/stdlib/sqlc.yaml ================================================ version: "2" sql: - engine: postgresql schema: "schema.sql" queries: "query.sql" database: managed: true analyzer: database: "only" gen: go: package: "querytest" out: "go" ================================================ FILE: internal/endtoend/testdata/accurate_sqlite/sqlite/stdlib/exec.json ================================================ { "contexts": ["managed-db"], "env": { "SQLCEXPERIMENT": "analyzerv2" } } ================================================ FILE: internal/endtoend/testdata/accurate_sqlite/sqlite/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/accurate_sqlite/sqlite/stdlib/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/accurate_sqlite/sqlite/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const createAuthor = `-- name: CreateAuthor :one INSERT INTO authors (name, bio) VALUES (?, ?) 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 getAuthor = `-- name: GetAuthor :one SELECT id, name, bio 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, &i.Bio) return i, err } const listAuthors = `-- name: ListAuthors :many SELECT id, name, bio FROM authors ` func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/accurate_sqlite/sqlite/stdlib/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE id = ?; -- name: ListAuthors :many SELECT * FROM authors; -- name: CreateAuthor :one INSERT INTO authors (name, bio) VALUES (?, ?) RETURNING *; ================================================ FILE: internal/endtoend/testdata/accurate_sqlite/sqlite/stdlib/schema.sql ================================================ CREATE TABLE authors ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, bio TEXT ); ================================================ FILE: internal/endtoend/testdata/accurate_sqlite/sqlite/stdlib/sqlc.yaml ================================================ version: "2" sql: - engine: sqlite schema: "schema.sql" queries: "query.sql" database: managed: true analyzer: database: "only" gen: go: package: "querytest" out: "go" ================================================ FILE: internal/endtoend/testdata/accurate_star_expansion/postgresql/stdlib/exec.json ================================================ { "contexts": ["managed-db"], "env": { "SQLCEXPERIMENT": "analyzerv2" } } ================================================ FILE: internal/endtoend/testdata/accurate_star_expansion/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/accurate_star_expansion/postgresql/stdlib/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/accurate_star_expansion/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest 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 :one DELETE FROM authors WHERE id = $1 RETURNING id, name, bio ` func (q *Queries) DeleteAuthor(ctx context.Context, id int32) (Author, error) { row := q.db.QueryRowContext(ctx, deleteAuthor, id) var i Author err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err } const getAuthor = `-- name: GetAuthor :one SELECT id, name, bio FROM authors WHERE id = $1 ` func (q *Queries) GetAuthor(ctx context.Context, id int32) (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 ` func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const updateAuthor = `-- name: UpdateAuthor :one UPDATE authors SET name = $1, bio = $2 WHERE id = $3 RETURNING id, name, bio ` type UpdateAuthorParams struct { Name string Bio sql.NullString ID int32 } func (q *Queries) UpdateAuthor(ctx context.Context, arg UpdateAuthorParams) (Author, error) { row := q.db.QueryRowContext(ctx, updateAuthor, arg.Name, arg.Bio, arg.ID) var i Author err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err } ================================================ FILE: internal/endtoend/testdata/accurate_star_expansion/postgresql/stdlib/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM authors; -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1; -- name: CreateAuthor :one INSERT INTO authors (name, bio) VALUES ($1, $2) RETURNING *; -- name: UpdateAuthor :one UPDATE authors SET name = $1, bio = $2 WHERE id = $3 RETURNING *; -- name: DeleteAuthor :one DELETE FROM authors WHERE id = $1 RETURNING *; ================================================ FILE: internal/endtoend/testdata/accurate_star_expansion/postgresql/stdlib/schema.sql ================================================ CREATE TABLE authors ( id SERIAL PRIMARY KEY, name TEXT NOT NULL, bio TEXT ); ================================================ FILE: internal/endtoend/testdata/accurate_star_expansion/postgresql/stdlib/sqlc.yaml ================================================ version: "2" sql: - engine: postgresql schema: "schema.sql" queries: "query.sql" database: managed: true analyzer: database: "only" gen: go: package: "querytest" out: "go" ================================================ FILE: internal/endtoend/testdata/alias/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/alias/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID uint64 } ================================================ FILE: internal/endtoend/testdata/alias/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const aliasBar = `-- name: AliasBar :exec DELETE FROM bar b WHERE b.id = ? ` func (q *Queries) AliasBar(ctx context.Context, id uint64) error { _, err := q.db.ExecContext(ctx, aliasBar, id) return err } ================================================ FILE: internal/endtoend/testdata/alias/mysql/query.sql ================================================ -- name: AliasBar :exec DELETE FROM bar b WHERE b.id = ?; ================================================ FILE: internal/endtoend/testdata/alias/mysql/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/alias/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/alias/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/alias/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/alias/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const aliasBar = `-- name: AliasBar :exec DELETE FROM bar b WHERE b.id = $1 ` func (q *Queries) AliasBar(ctx context.Context, id int32) error { _, err := q.db.Exec(ctx, aliasBar, id) return err } ================================================ FILE: internal/endtoend/testdata/alias/postgresql/pgx/v4/query.sql ================================================ -- name: AliasBar :exec DELETE FROM bar b WHERE b.id = $1; ================================================ FILE: internal/endtoend/testdata/alias/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/alias/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/alias/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/alias/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/alias/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const aliasBar = `-- name: AliasBar :exec DELETE FROM bar b WHERE b.id = $1 ` func (q *Queries) AliasBar(ctx context.Context, id int32) error { _, err := q.db.Exec(ctx, aliasBar, id) return err } ================================================ FILE: internal/endtoend/testdata/alias/postgresql/pgx/v5/query.sql ================================================ -- name: AliasBar :exec DELETE FROM bar b WHERE b.id = $1; ================================================ FILE: internal/endtoend/testdata/alias/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/alias/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/alias/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/alias/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/alias/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const aliasBar = `-- name: AliasBar :exec DELETE FROM bar b WHERE b.id = $1 ` func (q *Queries) AliasBar(ctx context.Context, id int32) error { _, err := q.db.ExecContext(ctx, aliasBar, id) return err } ================================================ FILE: internal/endtoend/testdata/alias/postgresql/stdlib/query.sql ================================================ -- name: AliasBar :exec DELETE FROM bar b WHERE b.id = $1; ================================================ FILE: internal/endtoend/testdata/alias/postgresql/stdlib/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/alias/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/alias/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/alias/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/alias/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const aliasBar = `-- name: AliasBar :exec DELETE FROM bar AS b WHERE b.id = ? ` func (q *Queries) AliasBar(ctx context.Context, id int64) error { _, err := q.db.ExecContext(ctx, aliasBar, id) return err } ================================================ FILE: internal/endtoend/testdata/alias/sqlite/query.sql ================================================ -- name: AliasBar :exec DELETE FROM bar AS b WHERE b.id = ?; ================================================ FILE: internal/endtoend/testdata/alias/sqlite/schema.sql ================================================ CREATE TABLE bar (id integer NOT NULL PRIMARY KEY AUTOINCREMENT); ================================================ FILE: internal/endtoend/testdata/alias/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/any/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/any/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/any/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const any = `-- name: Any :many SELECT id FROM bar WHERE id = ANY($1::bigint[]) ` func (q *Queries) Any(ctx context.Context, dollar_1 []int64) ([]int64, error) { rows, err := q.db.Query(ctx, any, dollar_1) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/any/pgx/v4/query.sql ================================================ -- name: Any :many SELECT id FROM bar WHERE id = ANY($1::bigint[]); ================================================ FILE: internal/endtoend/testdata/any/pgx/v4/schema.sql ================================================ CREATE TABLE bar (id bigserial not null); ================================================ FILE: internal/endtoend/testdata/any/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/any/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/any/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/any/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const any = `-- name: Any :many SELECT id FROM bar WHERE id = ANY($1::bigint[]) ` func (q *Queries) Any(ctx context.Context, dollar_1 []int64) ([]int64, error) { rows, err := q.db.Query(ctx, any, dollar_1) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/any/pgx/v5/query.sql ================================================ -- name: Any :many SELECT id FROM bar WHERE id = ANY($1::bigint[]); ================================================ FILE: internal/endtoend/testdata/any/pgx/v5/schema.sql ================================================ CREATE TABLE bar (id bigserial not null); ================================================ FILE: internal/endtoend/testdata/any/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/any/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/any/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/any/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/lib/pq" ) const any = `-- name: Any :many SELECT id FROM bar WHERE id = ANY($1::bigint[]) ` func (q *Queries) Any(ctx context.Context, dollar_1 []int64) ([]int64, error) { rows, err := q.db.QueryContext(ctx, any, pq.Array(dollar_1)) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/any/stdlib/query.sql ================================================ -- name: Any :many SELECT id FROM bar WHERE id = ANY($1::bigint[]); ================================================ FILE: internal/endtoend/testdata/any/stdlib/schema.sql ================================================ CREATE TABLE bar (id bigserial not null); ================================================ FILE: internal/endtoend/testdata/any/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/array_in/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/array_in/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/array_in/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const in = `-- name: In :many SELECT id FROM bar WHERE id IN ($1, $2) ` type InParams struct { ID int32 ID_2 int32 } func (q *Queries) In(ctx context.Context, arg InParams) ([]int32, error) { rows, err := q.db.Query(ctx, in, arg.ID, arg.ID_2) 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.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/array_in/pgx/v4/query.sql ================================================ -- name: In :many SELECT * FROM bar WHERE id IN ($1, $2); ================================================ FILE: internal/endtoend/testdata/array_in/pgx/v4/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/array_in/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/array_in/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/array_in/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/array_in/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const in = `-- name: In :many SELECT id FROM bar WHERE id IN ($1, $2) ` type InParams struct { ID int32 ID_2 int32 } func (q *Queries) In(ctx context.Context, arg InParams) ([]int32, error) { rows, err := q.db.Query(ctx, in, arg.ID, arg.ID_2) 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.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/array_in/pgx/v5/query.sql ================================================ -- name: In :many SELECT * FROM bar WHERE id IN ($1, $2); ================================================ FILE: internal/endtoend/testdata/array_in/pgx/v5/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/array_in/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/array_in/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/array_in/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/array_in/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const in = `-- name: In :many SELECT id FROM bar WHERE id IN ($1, $2) ` type InParams struct { ID int32 ID_2 int32 } func (q *Queries) In(ctx context.Context, arg InParams) ([]int32, error) { rows, err := q.db.QueryContext(ctx, in, arg.ID, arg.ID_2) 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 } ================================================ FILE: internal/endtoend/testdata/array_in/stdlib/query.sql ================================================ -- name: In :many SELECT * FROM bar WHERE id IN ($1, $2); ================================================ FILE: internal/endtoend/testdata/array_in/stdlib/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/array_in/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/array_text/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/array_text/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Tags []string } ================================================ FILE: internal/endtoend/testdata/array_text/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const textArray = `-- name: TextArray :many SELECT tags FROM bar ` func (q *Queries) TextArray(ctx context.Context) ([][]string, error) { rows, err := q.db.Query(ctx, textArray) if err != nil { return nil, err } defer rows.Close() var items [][]string for rows.Next() { var tags []string if err := rows.Scan(&tags); err != nil { return nil, err } items = append(items, tags) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/array_text/pgx/v4/query.sql ================================================ -- name: TextArray :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/array_text/pgx/v4/schema.sql ================================================ CREATE TABLE bar (tags text[] not null); ================================================ FILE: internal/endtoend/testdata/array_text/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/array_text/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/array_text/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Tags []string } ================================================ FILE: internal/endtoend/testdata/array_text/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const textArray = `-- name: TextArray :many SELECT tags FROM bar ` func (q *Queries) TextArray(ctx context.Context) ([][]string, error) { rows, err := q.db.Query(ctx, textArray) if err != nil { return nil, err } defer rows.Close() var items [][]string for rows.Next() { var tags []string if err := rows.Scan(&tags); err != nil { return nil, err } items = append(items, tags) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/array_text/pgx/v5/query.sql ================================================ -- name: TextArray :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/array_text/pgx/v5/schema.sql ================================================ CREATE TABLE bar (tags text[] not null); ================================================ FILE: internal/endtoend/testdata/array_text/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/array_text/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/array_text/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Tags []string } ================================================ FILE: internal/endtoend/testdata/array_text/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/lib/pq" ) const textArray = `-- name: TextArray :many SELECT tags FROM bar ` func (q *Queries) TextArray(ctx context.Context) ([][]string, error) { rows, err := q.db.QueryContext(ctx, textArray) if err != nil { return nil, err } defer rows.Close() var items [][]string for rows.Next() { var tags []string if err := rows.Scan(pq.Array(&tags)); err != nil { return nil, err } items = append(items, tags) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/array_text/stdlib/query.sql ================================================ -- name: TextArray :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/array_text/stdlib/schema.sql ================================================ CREATE TABLE bar (tags text[] not null); ================================================ FILE: internal/endtoend/testdata/array_text/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/array_text_join/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/array_text_join/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID string Info []string } type Foo struct { ID string Bar string } ================================================ FILE: internal/endtoend/testdata/array_text_join/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const joinTextArray = `-- name: JoinTextArray :many SELECT bar.info FROM foo JOIN bar ON foo.bar = bar.id ` func (q *Queries) JoinTextArray(ctx context.Context) ([][]string, error) { rows, err := q.db.Query(ctx, joinTextArray) if err != nil { return nil, err } defer rows.Close() var items [][]string for rows.Next() { var info []string if err := rows.Scan(&info); err != nil { return nil, err } items = append(items, info) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/array_text_join/pgx/v4/query.sql ================================================ -- name: JoinTextArray :many SELECT bar.info FROM foo JOIN bar ON foo.bar = bar.id; ================================================ FILE: internal/endtoend/testdata/array_text_join/pgx/v4/schema.sql ================================================ CREATE TABLE foo (id text not null, bar text not null); CREATE TABLE bar (id text not null, info text[] not null); ================================================ FILE: internal/endtoend/testdata/array_text_join/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/array_text_join/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/array_text_join/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID string Info []string } type Foo struct { ID string Bar string } ================================================ FILE: internal/endtoend/testdata/array_text_join/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const joinTextArray = `-- name: JoinTextArray :many SELECT bar.info FROM foo JOIN bar ON foo.bar = bar.id ` func (q *Queries) JoinTextArray(ctx context.Context) ([][]string, error) { rows, err := q.db.Query(ctx, joinTextArray) if err != nil { return nil, err } defer rows.Close() var items [][]string for rows.Next() { var info []string if err := rows.Scan(&info); err != nil { return nil, err } items = append(items, info) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/array_text_join/pgx/v5/query.sql ================================================ -- name: JoinTextArray :many SELECT bar.info FROM foo JOIN bar ON foo.bar = bar.id; ================================================ FILE: internal/endtoend/testdata/array_text_join/pgx/v5/schema.sql ================================================ CREATE TABLE foo (id text not null, bar text not null); CREATE TABLE bar (id text not null, info text[] not null); ================================================ FILE: internal/endtoend/testdata/array_text_join/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/array_text_join/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/array_text_join/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID string Info []string } type Foo struct { ID string Bar string } ================================================ FILE: internal/endtoend/testdata/array_text_join/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/lib/pq" ) const joinTextArray = `-- name: JoinTextArray :many SELECT bar.info FROM foo JOIN bar ON foo.bar = bar.id ` func (q *Queries) JoinTextArray(ctx context.Context) ([][]string, error) { rows, err := q.db.QueryContext(ctx, joinTextArray) if err != nil { return nil, err } defer rows.Close() var items [][]string for rows.Next() { var info []string if err := rows.Scan(pq.Array(&info)); err != nil { return nil, err } items = append(items, info) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/array_text_join/stdlib/query.sql ================================================ -- name: JoinTextArray :many SELECT bar.info FROM foo JOIN bar ON foo.bar = bar.id; ================================================ FILE: internal/endtoend/testdata/array_text_join/stdlib/schema.sql ================================================ CREATE TABLE foo (id text not null, bar text not null); CREATE TABLE bar (id text not null, info text[] not null); ================================================ FILE: internal/endtoend/testdata/array_text_join/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/bad_config/engine/query.sql ================================================ -- name: Test :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/bad_config/engine/sqlc.yaml ================================================ version: 2 sql: - queries: query.sql schema: query.sql engine: "bad_engine" gen: go: out: "db" ================================================ FILE: internal/endtoend/testdata/bad_config/engine/stderr.txt ================================================ error creating compiler: unknown engine: bad_engine ================================================ FILE: internal/endtoend/testdata/batch/postgresql/pgx/v4/go/batch.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: batch.go package querytest import ( "context" "database/sql" "errors" "github.com/jackc/pgx/v4" ) var ( ErrBatchAlreadyClosed = errors.New("batch already closed") ) const getValues = `-- name: GetValues :batchmany SELECT a, b FROM myschema.foo WHERE b = $1 ` type GetValuesBatchResults struct { br pgx.BatchResults tot int closed bool } func (q *Queries) GetValues(ctx context.Context, b []sql.NullInt32) *GetValuesBatchResults { batch := &pgx.Batch{} for _, a := range b { vals := []interface{}{ a, } batch.Queue(getValues, vals...) } br := q.db.SendBatch(ctx, batch) return &GetValuesBatchResults{br, len(b), false} } func (b *GetValuesBatchResults) Query(f func(int, []MyschemaFoo, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var items []MyschemaFoo if b.closed { if f != nil { f(t, items, ErrBatchAlreadyClosed) } continue } err := func() error { rows, err := b.br.Query() if err != nil { return err } defer rows.Close() for rows.Next() { var i MyschemaFoo if err := rows.Scan(&i.A, &i.B); err != nil { return err } items = append(items, i) } return rows.Err() }() if f != nil { f(t, items, err) } } } func (b *GetValuesBatchResults) Close() error { b.closed = true return b.br.Close() } const insertValues = `-- name: InsertValues :batchone INSERT INTO myschema.foo (a, b) VALUES ($1, $2) RETURNING a ` type InsertValuesBatchResults struct { br pgx.BatchResults tot int closed bool } type InsertValuesParams struct { A sql.NullString B sql.NullInt32 } func (q *Queries) InsertValues(ctx context.Context, arg []InsertValuesParams) *InsertValuesBatchResults { batch := &pgx.Batch{} for _, a := range arg { vals := []interface{}{ a.A, a.B, } batch.Queue(insertValues, vals...) } br := q.db.SendBatch(ctx, batch) return &InsertValuesBatchResults{br, len(arg), false} } func (b *InsertValuesBatchResults) QueryRow(f func(int, sql.NullString, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var a sql.NullString if b.closed { if f != nil { f(t, a, ErrBatchAlreadyClosed) } continue } row := b.br.QueryRow() err := row.Scan(&a) if f != nil { f(t, a, err) } } } func (b *InsertValuesBatchResults) Close() error { b.closed = true return b.br.Close() } const updateValues = `-- name: UpdateValues :batchexec UPDATE myschema.foo SET a = $1, b = $2 ` type UpdateValuesBatchResults struct { br pgx.BatchResults tot int closed bool } type UpdateValuesParams struct { A sql.NullString B sql.NullInt32 } func (q *Queries) UpdateValues(ctx context.Context, arg []UpdateValuesParams) *UpdateValuesBatchResults { batch := &pgx.Batch{} for _, a := range arg { vals := []interface{}{ a.A, a.B, } batch.Queue(updateValues, vals...) } br := q.db.SendBatch(ctx, batch) return &UpdateValuesBatchResults{br, len(arg), false} } func (b *UpdateValuesBatchResults) 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 *UpdateValuesBatchResults) Close() error { b.closed = true return b.br.Close() } ================================================ FILE: internal/endtoend/testdata/batch/postgresql/pgx/v4/go/db.go ================================================ // 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 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, } } ================================================ FILE: internal/endtoend/testdata/batch/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type MyschemaFoo struct { A sql.NullString B sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/batch/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest ================================================ FILE: internal/endtoend/testdata/batch/postgresql/pgx/v4/query.sql ================================================ -- name: InsertValues :batchone INSERT INTO myschema.foo (a, b) VALUES ($1, $2) RETURNING a; -- name: GetValues :batchmany SELECT * FROM myschema.foo WHERE b = $1; -- name: UpdateValues :batchexec UPDATE myschema.foo SET a = $1, b = $2; ================================================ FILE: internal/endtoend/testdata/batch/postgresql/pgx/v4/schema.sql ================================================ CREATE SCHEMA myschema; CREATE TABLE myschema.foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/batch/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/batch/postgresql/pgx/v5/go/batch.go ================================================ // 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 getValues = `-- name: GetValues :batchmany SELECT a, b FROM myschema.foo WHERE b = $1 ` type GetValuesBatchResults struct { br pgx.BatchResults tot int closed bool } func (q *Queries) GetValues(ctx context.Context, b []pgtype.Int4) *GetValuesBatchResults { batch := &pgx.Batch{} for _, a := range b { vals := []interface{}{ a, } batch.Queue(getValues, vals...) } br := q.db.SendBatch(ctx, batch) return &GetValuesBatchResults{br, len(b), false} } func (b *GetValuesBatchResults) Query(f func(int, []MyschemaFoo, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var items []MyschemaFoo if b.closed { if f != nil { f(t, items, ErrBatchAlreadyClosed) } continue } err := func() error { rows, err := b.br.Query() if err != nil { return err } defer rows.Close() for rows.Next() { var i MyschemaFoo if err := rows.Scan(&i.A, &i.B); err != nil { return err } items = append(items, i) } return rows.Err() }() if f != nil { f(t, items, err) } } } func (b *GetValuesBatchResults) Close() error { b.closed = true return b.br.Close() } const insertValues = `-- name: InsertValues :batchone INSERT INTO myschema.foo (a, b) VALUES ($1, $2) RETURNING a ` type InsertValuesBatchResults struct { br pgx.BatchResults tot int closed bool } type InsertValuesParams struct { A pgtype.Text B pgtype.Int4 } func (q *Queries) InsertValues(ctx context.Context, arg []InsertValuesParams) *InsertValuesBatchResults { batch := &pgx.Batch{} for _, a := range arg { vals := []interface{}{ a.A, a.B, } batch.Queue(insertValues, vals...) } br := q.db.SendBatch(ctx, batch) return &InsertValuesBatchResults{br, len(arg), false} } func (b *InsertValuesBatchResults) QueryRow(f func(int, pgtype.Text, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var a pgtype.Text if b.closed { if f != nil { f(t, a, ErrBatchAlreadyClosed) } continue } row := b.br.QueryRow() err := row.Scan(&a) if f != nil { f(t, a, err) } } } func (b *InsertValuesBatchResults) Close() error { b.closed = true return b.br.Close() } const updateValues = `-- name: UpdateValues :batchexec UPDATE myschema.foo SET a = $1, b = $2 ` type UpdateValuesBatchResults struct { br pgx.BatchResults tot int closed bool } type UpdateValuesParams struct { A pgtype.Text B pgtype.Int4 } func (q *Queries) UpdateValues(ctx context.Context, arg []UpdateValuesParams) *UpdateValuesBatchResults { batch := &pgx.Batch{} for _, a := range arg { vals := []interface{}{ a.A, a.B, } batch.Queue(updateValues, vals...) } br := q.db.SendBatch(ctx, batch) return &UpdateValuesBatchResults{br, len(arg), false} } func (b *UpdateValuesBatchResults) 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 *UpdateValuesBatchResults) Close() error { b.closed = true return b.br.Close() } ================================================ FILE: internal/endtoend/testdata/batch/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/batch/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type MyschemaFoo struct { A pgtype.Text B pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/batch/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest ================================================ FILE: internal/endtoend/testdata/batch/postgresql/pgx/v5/query.sql ================================================ -- name: InsertValues :batchone INSERT INTO myschema.foo (a, b) VALUES ($1, $2) RETURNING a; -- name: GetValues :batchmany SELECT * FROM myschema.foo WHERE b = $1; -- name: UpdateValues :batchexec UPDATE myschema.foo SET a = $1, b = $2; ================================================ FILE: internal/endtoend/testdata/batch/postgresql/pgx/v5/schema.sql ================================================ CREATE SCHEMA myschema; CREATE TABLE myschema.foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/batch/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/batch.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: batch.go package querytest import ( "context" "database/sql" "errors" "github.com/jackc/pgx/v4" ) var ( ErrBatchAlreadyClosed = errors.New("batch already closed") ) const getValues = `-- name: GetValues :batchmany SELECT a, b FROM myschema.foo WHERE b = $1 ` type GetValuesBatchResults struct { br pgx.BatchResults tot int closed bool } func (q *Queries) GetValues(ctx context.Context, b []sql.NullInt32) *GetValuesBatchResults { batch := &pgx.Batch{} for _, a := range b { vals := []interface{}{ a, } batch.Queue(getValues, vals...) } br := q.db.SendBatch(ctx, batch) return &GetValuesBatchResults{br, len(b), false} } func (b *GetValuesBatchResults) Query(f func(int, []MyschemaFoo, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var items []MyschemaFoo if b.closed { if f != nil { f(t, items, ErrBatchAlreadyClosed) } continue } err := func() error { rows, err := b.br.Query() if err != nil { return err } defer rows.Close() for rows.Next() { var i MyschemaFoo if err := rows.Scan(&i.A, &i.B); err != nil { return err } items = append(items, i) } return rows.Err() }() if f != nil { f(t, items, err) } } } func (b *GetValuesBatchResults) Close() error { b.closed = true return b.br.Close() } const insertValues = `-- name: InsertValues :batchone INSERT INTO myschema.foo (a, b) VALUES ($1, $2) RETURNING a ` type InsertValuesBatchResults struct { br pgx.BatchResults tot int closed bool } type InsertValuesParams struct { A sql.NullString B sql.NullInt32 } func (q *Queries) InsertValues(ctx context.Context, arg []InsertValuesParams) *InsertValuesBatchResults { batch := &pgx.Batch{} for _, a := range arg { vals := []interface{}{ a.A, a.B, } batch.Queue(insertValues, vals...) } br := q.db.SendBatch(ctx, batch) return &InsertValuesBatchResults{br, len(arg), false} } func (b *InsertValuesBatchResults) QueryRow(f func(int, sql.NullString, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var a sql.NullString if b.closed { if f != nil { f(t, a, ErrBatchAlreadyClosed) } continue } row := b.br.QueryRow() err := row.Scan(&a) if f != nil { f(t, a, err) } } } func (b *InsertValuesBatchResults) Close() error { b.closed = true return b.br.Close() } ================================================ FILE: internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/db.go ================================================ // 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 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, } } ================================================ FILE: internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type MyschemaFoo struct { A sql.NullString B sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const updateValues = `-- name: UpdateValues :exec UPDATE myschema.foo SET a = $1, b = $2 ` type UpdateValuesParams struct { A sql.NullString B sql.NullInt32 } func (q *Queries) UpdateValues(ctx context.Context, arg UpdateValuesParams) error { _, err := q.db.Exec(ctx, updateValues, arg.A, arg.B) return err } ================================================ FILE: internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/query.sql ================================================ -- name: InsertValues :batchone INSERT INTO myschema.foo (a, b) VALUES ($1, $2) RETURNING a; -- name: GetValues :batchmany SELECT * FROM myschema.foo WHERE b = $1; -- name: UpdateValues :exec UPDATE myschema.foo SET a = $1, b = $2; ================================================ FILE: internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/schema.sql ================================================ CREATE SCHEMA myschema; CREATE TABLE myschema.foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/batch_imports/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/batch.go ================================================ // 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 getValues = `-- name: GetValues :batchmany SELECT a, b FROM myschema.foo WHERE b = $1 ` type GetValuesBatchResults struct { br pgx.BatchResults tot int closed bool } func (q *Queries) GetValues(ctx context.Context, b []pgtype.Int4) *GetValuesBatchResults { batch := &pgx.Batch{} for _, a := range b { vals := []interface{}{ a, } batch.Queue(getValues, vals...) } br := q.db.SendBatch(ctx, batch) return &GetValuesBatchResults{br, len(b), false} } func (b *GetValuesBatchResults) Query(f func(int, []MyschemaFoo, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var items []MyschemaFoo if b.closed { if f != nil { f(t, items, ErrBatchAlreadyClosed) } continue } err := func() error { rows, err := b.br.Query() if err != nil { return err } defer rows.Close() for rows.Next() { var i MyschemaFoo if err := rows.Scan(&i.A, &i.B); err != nil { return err } items = append(items, i) } return rows.Err() }() if f != nil { f(t, items, err) } } } func (b *GetValuesBatchResults) Close() error { b.closed = true return b.br.Close() } const insertValues = `-- name: InsertValues :batchone INSERT INTO myschema.foo (a, b) VALUES ($1, $2) RETURNING a ` type InsertValuesBatchResults struct { br pgx.BatchResults tot int closed bool } type InsertValuesParams struct { A pgtype.Text B pgtype.Int4 } func (q *Queries) InsertValues(ctx context.Context, arg []InsertValuesParams) *InsertValuesBatchResults { batch := &pgx.Batch{} for _, a := range arg { vals := []interface{}{ a.A, a.B, } batch.Queue(insertValues, vals...) } br := q.db.SendBatch(ctx, batch) return &InsertValuesBatchResults{br, len(arg), false} } func (b *InsertValuesBatchResults) QueryRow(f func(int, pgtype.Text, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var a pgtype.Text if b.closed { if f != nil { f(t, a, ErrBatchAlreadyClosed) } continue } row := b.br.QueryRow() err := row.Scan(&a) if f != nil { f(t, a, err) } } } func (b *InsertValuesBatchResults) Close() error { b.closed = true return b.br.Close() } ================================================ FILE: internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type MyschemaFoo struct { A pgtype.Text B pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 updateValues = `-- name: UpdateValues :exec UPDATE myschema.foo SET a = $1, b = $2 ` type UpdateValuesParams struct { A pgtype.Text B pgtype.Int4 } func (q *Queries) UpdateValues(ctx context.Context, arg UpdateValuesParams) error { _, err := q.db.Exec(ctx, updateValues, arg.A, arg.B) return err } ================================================ FILE: internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/query.sql ================================================ -- name: InsertValues :batchone INSERT INTO myschema.foo (a, b) VALUES ($1, $2) RETURNING a; -- name: GetValues :batchmany SELECT * FROM myschema.foo WHERE b = $1; -- name: UpdateValues :exec UPDATE myschema.foo SET a = $1, b = $2; ================================================ FILE: internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/schema.sql ================================================ CREATE SCHEMA myschema; CREATE TABLE myschema.foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/batch_imports/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/batch_parameter_limit/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/3185 ================================================ FILE: internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/go/batch.go ================================================ // 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() } ================================================ FILE: internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest ================================================ FILE: internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/query.sql ================================================ -- name: CreateAuthors :batchexec INSERT INTO authors ( name, bio ) VALUES ( $1, $2 ); ================================================ FILE: internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/batch_parameter_limit/postgresql/pgx/sqlc.yaml ================================================ 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 ================================================ FILE: internal/endtoend/testdata/batch_parameter_type/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/2152 ================================================ FILE: internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/batch.go ================================================ // 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 insertMappping = `-- name: InsertMappping :batchexec WITH table1 AS ( SELECT version FROM solar_commcard_mapping WHERE "deviceId" = $1 ORDER BY "updatedAt" DESC LIMIT 1 ) INSERT INTO solar_commcard_mapping ("deviceId", version, sn, "updatedAt") SELECT $1, $2::text, $3, $4 WHERE NOT EXISTS( SELECT version FROM table1 WHERE table1.version = $2::text ) OR NOT EXISTS(SELECT version FROM table1) ` type InsertMapppingBatchResults struct { br pgx.BatchResults tot int closed bool } type InsertMapppingParams struct { DeviceId int64 Version string Sn string UpdatedAt pgtype.Timestamptz } func (q *Queries) InsertMappping(ctx context.Context, arg []InsertMapppingParams) *InsertMapppingBatchResults { batch := &pgx.Batch{} for _, a := range arg { vals := []interface{}{ a.DeviceId, a.Version, a.Sn, a.UpdatedAt, } batch.Queue(insertMappping, vals...) } br := q.db.SendBatch(ctx, batch) return &InsertMapppingBatchResults{br, len(arg), false} } func (b *InsertMapppingBatchResults) Exec(f func(int, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { if b.closed { if f != nil { f(t, ErrBatchAlreadyClosed) } continue } _, err := b.br.Exec() if f != nil { f(t, err) } } } func (b *InsertMapppingBatchResults) Close() error { b.closed = true return b.br.Close() } ================================================ FILE: internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type SolarCommcardMapping struct { ID int64 DeviceId int64 Version string Sn string CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } ================================================ FILE: internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest ================================================ FILE: internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/query.sql ================================================ -- name: InsertMappping :batchexec WITH table1 AS ( SELECT version FROM solar_commcard_mapping WHERE "deviceId" = $1 ORDER BY "updatedAt" DESC LIMIT 1 ) INSERT INTO solar_commcard_mapping ("deviceId", version, sn, "updatedAt") SELECT $1, @version::text, $3, $4 WHERE NOT EXISTS( SELECT * FROM table1 WHERE table1.version = @version::text ) OR NOT EXISTS(SELECT * FROM table1); ================================================ FILE: internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/schema.sql ================================================ CREATE TABLE public.solar_commcard_mapping ( id INT8 NOT NULL, "deviceId" INT8 NOT NULL, version VARCHAR(32) DEFAULT ''::VARCHAR NOT NULL, sn VARCHAR(32) DEFAULT ''::VARCHAR NOT NULL, "createdAt" TIMESTAMPTZ DEFAULT now(), "updatedAt" TIMESTAMPTZ DEFAULT now() ); ================================================ FILE: internal/endtoend/testdata/batch_parameter_type/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/between_args/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/between_args/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Product struct { ID int64 Name string Price int32 } ================================================ FILE: internal/endtoend/testdata/between_args/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getBetweenPrices = `-- name: GetBetweenPrices :many SELECT id, name, price FROM products WHERE price BETWEEN ? AND ? ` type GetBetweenPricesParams struct { FromPrice int32 ToPrice int32 } func (q *Queries) GetBetweenPrices(ctx context.Context, arg GetBetweenPricesParams) ([]Product, error) { rows, err := q.db.QueryContext(ctx, getBetweenPrices, arg.FromPrice, arg.ToPrice) if err != nil { return nil, err } defer rows.Close() var items []Product for rows.Next() { var i Product if err := rows.Scan(&i.ID, &i.Name, &i.Price); 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 getBetweenPricesNamed = `-- name: GetBetweenPricesNamed :many SELECT id, name, price FROM products WHERE price BETWEEN ? AND ? ` type GetBetweenPricesNamedParams struct { MinPrice int32 MaxPrice int32 } func (q *Queries) GetBetweenPricesNamed(ctx context.Context, arg GetBetweenPricesNamedParams) ([]Product, error) { rows, err := q.db.QueryContext(ctx, getBetweenPricesNamed, arg.MinPrice, arg.MaxPrice) if err != nil { return nil, err } defer rows.Close() var items []Product for rows.Next() { var i Product if err := rows.Scan(&i.ID, &i.Name, &i.Price); 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 getBetweenPricesTable = `-- name: GetBetweenPricesTable :many SELECT id, name, price FROM products WHERE products.price BETWEEN ? AND ? ` type GetBetweenPricesTableParams struct { FromPrice int32 ToPrice int32 } func (q *Queries) GetBetweenPricesTable(ctx context.Context, arg GetBetweenPricesTableParams) ([]Product, error) { rows, err := q.db.QueryContext(ctx, getBetweenPricesTable, arg.FromPrice, arg.ToPrice) if err != nil { return nil, err } defer rows.Close() var items []Product for rows.Next() { var i Product if err := rows.Scan(&i.ID, &i.Name, &i.Price); 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 getBetweenPricesTableAlias = `-- name: GetBetweenPricesTableAlias :many SELECT id, name, price FROM products as p WHERE p.price BETWEEN ? AND ? ` type GetBetweenPricesTableAliasParams struct { FromPrice int32 ToPrice int32 } func (q *Queries) GetBetweenPricesTableAlias(ctx context.Context, arg GetBetweenPricesTableAliasParams) ([]Product, error) { rows, err := q.db.QueryContext(ctx, getBetweenPricesTableAlias, arg.FromPrice, arg.ToPrice) if err != nil { return nil, err } defer rows.Close() var items []Product for rows.Next() { var i Product if err := rows.Scan(&i.ID, &i.Name, &i.Price); 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 } ================================================ FILE: internal/endtoend/testdata/between_args/mysql/query.sql ================================================ -- name: GetBetweenPrices :many SELECT * FROM products WHERE price BETWEEN ? AND ?; -- name: GetBetweenPricesTable :many SELECT * FROM products WHERE products.price BETWEEN ? AND ?; -- name: GetBetweenPricesTableAlias :many SELECT * FROM products as p WHERE p.price BETWEEN ? AND ?; -- name: GetBetweenPricesNamed :many SELECT * FROM products WHERE price BETWEEN sqlc.arg(min_price) AND sqlc.arg(max_price); ================================================ FILE: internal/endtoend/testdata/between_args/mysql/schema.sql ================================================ CREATE TABLE products ( id BIGINT NOT NULL AUTO_INCREMENT, name TEXT NOT NULL, price INT NOT NULL, PRIMARY KEY (id) ); ================================================ FILE: internal/endtoend/testdata/between_args/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/between_args/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/between_args/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Product struct { Name string Price int64 } ================================================ FILE: internal/endtoend/testdata/between_args/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getBetweenPrices = `-- name: GetBetweenPrices :many SELECT name, price FROM products WHERE price BETWEEN ? AND ? ` type GetBetweenPricesParams struct { FromPrice int64 ToPrice int64 } func (q *Queries) GetBetweenPrices(ctx context.Context, arg GetBetweenPricesParams) ([]Product, error) { rows, err := q.db.QueryContext(ctx, getBetweenPrices, arg.FromPrice, arg.ToPrice) if err != nil { return nil, err } defer rows.Close() var items []Product for rows.Next() { var i Product if err := rows.Scan(&i.Name, &i.Price); 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 getBetweenPricesTable = `-- name: GetBetweenPricesTable :many SELECT name, price FROM products WHERE products.price BETWEEN ? AND ? ` type GetBetweenPricesTableParams struct { FromPrice int64 ToPrice int64 } func (q *Queries) GetBetweenPricesTable(ctx context.Context, arg GetBetweenPricesTableParams) ([]Product, error) { rows, err := q.db.QueryContext(ctx, getBetweenPricesTable, arg.FromPrice, arg.ToPrice) if err != nil { return nil, err } defer rows.Close() var items []Product for rows.Next() { var i Product if err := rows.Scan(&i.Name, &i.Price); 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 getBetweenPricesTableAlias = `-- name: GetBetweenPricesTableAlias :many SELECT name, price FROM products as p WHERE p.price BETWEEN ? AND ? ` type GetBetweenPricesTableAliasParams struct { FromPrice int64 ToPrice int64 } func (q *Queries) GetBetweenPricesTableAlias(ctx context.Context, arg GetBetweenPricesTableAliasParams) ([]Product, error) { rows, err := q.db.QueryContext(ctx, getBetweenPricesTableAlias, arg.FromPrice, arg.ToPrice) if err != nil { return nil, err } defer rows.Close() var items []Product for rows.Next() { var i Product if err := rows.Scan(&i.Name, &i.Price); 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 } ================================================ FILE: internal/endtoend/testdata/between_args/sqlite/query.sql ================================================ -- name: GetBetweenPrices :many SELECT * FROM products WHERE price BETWEEN ? AND ?; -- name: GetBetweenPricesTable :many SELECT * FROM products WHERE products.price BETWEEN ? AND ?; -- name: GetBetweenPricesTableAlias :many SELECT * FROM products as p WHERE p.price BETWEEN ? AND ?; ================================================ FILE: internal/endtoend/testdata/between_args/sqlite/schema.sql ================================================ CREATE TABLE products ( name TEXT NOT NULL, price INT NOT NULL ); ================================================ FILE: internal/endtoend/testdata/between_args/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/bit_string/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/bit_string/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgtype" ) type TestTable struct { VBitNull pgtype.Varbit VVarbitNull pgtype.Varbit VBit pgtype.Varbit VVarbit pgtype.Varbit } ================================================ FILE: internal/endtoend/testdata/bit_string/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectTest = `-- name: SelectTest :many SELECT v_bit_null, v_varbit_null, v_bit, v_varbit from test_table ` func (q *Queries) SelectTest(ctx context.Context) ([]TestTable, error) { rows, err := q.db.Query(ctx, selectTest) if err != nil { return nil, err } defer rows.Close() var items []TestTable for rows.Next() { var i TestTable if err := rows.Scan( &i.VBitNull, &i.VVarbitNull, &i.VBit, &i.VVarbit, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/bit_string/pgx/v4/query.sql ================================================ -- name: SelectTest :many SELECT * from test_table; ================================================ FILE: internal/endtoend/testdata/bit_string/pgx/v4/schema.sql ================================================ CREATE TABLE test_table ( v_bit_null bit(3), v_varbit_null bit varying(3), v_bit bit(3) not null, v_varbit bit varying(3) not null ); ================================================ FILE: internal/endtoend/testdata/bit_string/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/bit_string/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/bit_string/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type TestTable struct { VBitNull pgtype.Bits VVarbitNull pgtype.Bits VBit pgtype.Bits VVarbit pgtype.Bits } ================================================ FILE: internal/endtoend/testdata/bit_string/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectTest = `-- name: SelectTest :many SELECT v_bit_null, v_varbit_null, v_bit, v_varbit from test_table ` func (q *Queries) SelectTest(ctx context.Context) ([]TestTable, error) { rows, err := q.db.Query(ctx, selectTest) if err != nil { return nil, err } defer rows.Close() var items []TestTable for rows.Next() { var i TestTable if err := rows.Scan( &i.VBitNull, &i.VVarbitNull, &i.VBit, &i.VVarbit, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/bit_string/pgx/v5/query.sql ================================================ -- name: SelectTest :many SELECT * from test_table; ================================================ FILE: internal/endtoend/testdata/bit_string/pgx/v5/schema.sql ================================================ CREATE TABLE test_table ( v_bit_null bit(3), v_varbit_null bit varying(3), v_bit bit(3) not null, v_varbit bit varying(3) not null ); ================================================ FILE: internal/endtoend/testdata/bit_string/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/build_tags/postgresql/stdlib/go/db.go ================================================ //go:build some_tag // 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, } } ================================================ FILE: internal/endtoend/testdata/build_tags/postgresql/stdlib/go/models.go ================================================ //go:build some_tag // 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 } ================================================ FILE: internal/endtoend/testdata/build_tags/postgresql/stdlib/go/querier.go ================================================ //go:build some_tag // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package authors import ( "context" ) type Querier interface { CreateAuthor(ctx context.Context, arg CreateAuthorParams) (Author, error) DeleteAuthor(ctx context.Context, id int64) error GetAuthor(ctx context.Context, id int64) (Author, error) ListAuthors(ctx context.Context) ([]Author, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/build_tags/postgresql/stdlib/go/query.sql.go ================================================ //go:build some_tag // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package authors import ( "context" "database/sql" ) const createAuthor = `-- name: CreateAuthor :one INSERT INTO authors ( name, bio ) VALUES ( $1, $2 ) RETURNING id, name, bio ` type CreateAuthorParams struct { Name string Bio sql.NullString } func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (Author, error) { row := q.db.QueryRowContext(ctx, createAuthor, arg.Name, arg.Bio) var i Author err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err } const deleteAuthor = `-- name: DeleteAuthor :exec DELETE FROM authors WHERE id = $1 ` func (q *Queries) DeleteAuthor(ctx context.Context, id int64) error { _, err := q.db.ExecContext(ctx, deleteAuthor, id) return err } const getAuthor = `-- name: GetAuthor :one SELECT id, name, bio FROM authors WHERE id = $1 LIMIT 1 ` func (q *Queries) GetAuthor(ctx context.Context, id int64) (Author, error) { row := q.db.QueryRowContext(ctx, getAuthor, id) var i Author err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err } const listAuthors = `-- name: ListAuthors :many SELECT id, name, bio FROM authors ORDER BY name ` func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/build_tags/postgresql/stdlib/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/build_tags/postgresql/stdlib/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/build_tags/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "authors", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "omit_unused_structs": true, "emit_interface": true, "build_tags": "some_tag" } ] } ================================================ FILE: internal/endtoend/testdata/builtins/postgresql/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/builtins/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/builtins/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/builtins/postgresql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/builtins/postgresql/query.sql ================================================ -- 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[]); ================================================ FILE: internal/endtoend/testdata/builtins/postgresql/schema.sql ================================================ create schema if not exists sqlc; ================================================ FILE: internal/endtoend/testdata/builtins/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/builtins/sqlite/go/aggfunc.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: aggfunc.sql package querytest import ( "context" "database/sql" ) const getAvg = `-- name: GetAvg :one SELECT avg(int_val) FROM test ` func (q *Queries) GetAvg(ctx context.Context) (sql.NullFloat64, error) { row := q.db.QueryRowContext(ctx, getAvg) var avg sql.NullFloat64 err := row.Scan(&avg) return avg, err } const getCount = `-- name: GetCount :one SELECT count(*) FROM test ` func (q *Queries) GetCount(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, getCount) var count int64 err := row.Scan(&count) return count, err } const getCountId = `-- name: GetCountId :one SELECT count(id) FROM test ` func (q *Queries) GetCountId(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, getCountId) var count int64 err := row.Scan(&count) return count, err } const getGroupConcatInt = `-- name: GetGroupConcatInt :one SELECT group_concat(int_val) FROM test ` func (q *Queries) GetGroupConcatInt(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getGroupConcatInt) var group_concat string err := row.Scan(&group_concat) return group_concat, err } const getGroupConcatInt2 = `-- name: GetGroupConcatInt2 :one SELECT group_concat(1, ':') FROM test ` func (q *Queries) GetGroupConcatInt2(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getGroupConcatInt2) var group_concat string err := row.Scan(&group_concat) return group_concat, err } const getGroupConcatText = `-- name: GetGroupConcatText :one SELECT group_concat(text_val) FROM test ` func (q *Queries) GetGroupConcatText(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getGroupConcatText) var group_concat string err := row.Scan(&group_concat) return group_concat, err } const getGroupConcatText2 = `-- name: GetGroupConcatText2 :one SELECT group_concat(text_val, ':') FROM test ` func (q *Queries) GetGroupConcatText2(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getGroupConcatText2) var group_concat string err := row.Scan(&group_concat) return group_concat, err } const getMaxInt = `-- name: GetMaxInt :one SELECT max(int_val) FROM test ` func (q *Queries) GetMaxInt(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, getMaxInt) var max interface{} err := row.Scan(&max) return max, err } const getMaxText = `-- name: GetMaxText :one SELECT max(text_val) FROM test ` func (q *Queries) GetMaxText(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, getMaxText) var max interface{} err := row.Scan(&max) return max, err } const getMinInt = `-- name: GetMinInt :one SELECT min(int_val) FROM test ` func (q *Queries) GetMinInt(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, getMinInt) var min interface{} err := row.Scan(&min) return min, err } const getMinText = `-- name: GetMinText :one SELECT min(text_val) FROM test ` func (q *Queries) GetMinText(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, getMinText) var min interface{} err := row.Scan(&min) return min, err } const getSumInt = `-- name: GetSumInt :one SELECT sum(int_val) FROM test ` func (q *Queries) GetSumInt(ctx context.Context) (sql.NullFloat64, error) { row := q.db.QueryRowContext(ctx, getSumInt) var sum sql.NullFloat64 err := row.Scan(&sum) return sum, err } const getSumText = `-- name: GetSumText :one SELECT sum(text_val) FROM test ` func (q *Queries) GetSumText(ctx context.Context) (sql.NullFloat64, error) { row := q.db.QueryRowContext(ctx, getSumText) var sum sql.NullFloat64 err := row.Scan(&sum) return sum, err } const getTotalInt = `-- name: GetTotalInt :one SELECT total(int_val) FROM test ` func (q *Queries) GetTotalInt(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getTotalInt) var total float64 err := row.Scan(&total) return total, err } ================================================ FILE: internal/endtoend/testdata/builtins/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/builtins/sqlite/go/mathfunc.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: mathfunc.sql package querytest import ( "context" ) const getAcos = `-- name: GetAcos :one select acos(1.0) ` func (q *Queries) GetAcos(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getAcos) var acos float64 err := row.Scan(&acos) return acos, err } const getAcosh = `-- name: GetAcosh :one select acosh(1.0) ` func (q *Queries) GetAcosh(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getAcosh) var acosh float64 err := row.Scan(&acosh) return acosh, err } const getAsin = `-- name: GetAsin :one select asin(1.0) ` func (q *Queries) GetAsin(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getAsin) var asin float64 err := row.Scan(&asin) return asin, err } const getAsinh = `-- name: GetAsinh :one select asinh(1.0) ` func (q *Queries) GetAsinh(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getAsinh) var asinh float64 err := row.Scan(&asinh) return asinh, err } const getAtan = `-- name: GetAtan :one select atan(1.0) ` func (q *Queries) GetAtan(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getAtan) var atan float64 err := row.Scan(&atan) return atan, err } const getAtan2 = `-- name: GetAtan2 :one select atan2(1.0, 0.5) ` func (q *Queries) GetAtan2(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getAtan2) var atan2 float64 err := row.Scan(&atan2) return atan2, err } const getAtanh = `-- name: GetAtanh :one select atanh(1.0) ` func (q *Queries) GetAtanh(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getAtanh) var atanh float64 err := row.Scan(&atanh) return atanh, err } const getCeil = `-- name: GetCeil :one select ceil(1.0) ` func (q *Queries) GetCeil(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, getCeil) var ceil int64 err := row.Scan(&ceil) return ceil, err } const getCeilin = `-- name: GetCeilin :one select ceiling(1.0) ` func (q *Queries) GetCeilin(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, getCeilin) var ceiling int64 err := row.Scan(&ceiling) return ceiling, err } const getCos = `-- name: GetCos :one select cos(1.0) ` func (q *Queries) GetCos(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getCos) var cos float64 err := row.Scan(&cos) return cos, err } const getCosh = `-- name: GetCosh :one select cosh(1.0) ` func (q *Queries) GetCosh(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getCosh) var cosh float64 err := row.Scan(&cosh) return cosh, err } const getDegrees = `-- name: GetDegrees :one select degrees(1.0) ` func (q *Queries) GetDegrees(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getDegrees) var degrees float64 err := row.Scan(°rees) return degrees, err } const getExp = `-- name: GetExp :one select exp(1.0) ` func (q *Queries) GetExp(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getExp) var exp float64 err := row.Scan(&exp) return exp, err } const getFloor = `-- name: GetFloor :one select floor(1.0) ` func (q *Queries) GetFloor(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, getFloor) var floor int64 err := row.Scan(&floor) return floor, err } const getLn = `-- name: GetLn :one select ln(1.0) ` func (q *Queries) GetLn(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getLn) var ln float64 err := row.Scan(&ln) return ln, err } const getLog = `-- name: GetLog :one select log(1.0) ` func (q *Queries) GetLog(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getLog) var log float64 err := row.Scan(&log) return log, err } const getLog10 = `-- name: GetLog10 :one select log10(1.0) ` func (q *Queries) GetLog10(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getLog10) var log10 float64 err := row.Scan(&log10) return log10, err } const getLog2 = `-- name: GetLog2 :one select log2(1.0) ` func (q *Queries) GetLog2(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getLog2) var log2 float64 err := row.Scan(&log2) return log2, err } const getLogBase = `-- name: GetLogBase :one select log(1.0, 2.0) ` func (q *Queries) GetLogBase(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getLogBase) var log float64 err := row.Scan(&log) return log, err } const getMod = `-- name: GetMod :one select mod(1, 2) ` func (q *Queries) GetMod(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getMod) var mod float64 err := row.Scan(&mod) return mod, err } const getPi = `-- name: GetPi :one select pi() ` func (q *Queries) GetPi(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getPi) var pi float64 err := row.Scan(&pi) return pi, err } const getPow = `-- name: GetPow :one select pow(1, 2) ` func (q *Queries) GetPow(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getPow) var pow float64 err := row.Scan(&pow) return pow, err } const getPower = `-- name: GetPower :one select power(1, 2) ` func (q *Queries) GetPower(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getPower) var power float64 err := row.Scan(&power) return power, err } const getRadians = `-- name: GetRadians :one select radians(1) ` func (q *Queries) GetRadians(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getRadians) var radians float64 err := row.Scan(&radians) return radians, err } const getSin = `-- name: GetSin :one select sin(1.0) ` func (q *Queries) GetSin(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getSin) var sin float64 err := row.Scan(&sin) return sin, err } const getSinh = `-- name: GetSinh :one select sinh(1.0) ` func (q *Queries) GetSinh(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getSinh) var sinh float64 err := row.Scan(&sinh) return sinh, err } const getSqrt = `-- name: GetSqrt :one select sqrt(1.0) ` func (q *Queries) GetSqrt(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getSqrt) var sqrt float64 err := row.Scan(&sqrt) return sqrt, err } const getTan = `-- name: GetTan :one select tan(1.0) ` func (q *Queries) GetTan(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getTan) var tan float64 err := row.Scan(&tan) return tan, err } const getTrunc = `-- name: GetTrunc :one select trunc(1.0) ` func (q *Queries) GetTrunc(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, getTrunc) var trunc int64 err := row.Scan(&trunc) return trunc, err } ================================================ FILE: internal/endtoend/testdata/builtins/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Test struct { ID int64 IntVal int64 TextVal string } ================================================ FILE: internal/endtoend/testdata/builtins/sqlite/go/scalarfunc.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: scalarfunc.sql package querytest import ( "context" "database/sql" ) const getAbs = `-- name: GetAbs :one SELECT abs(int_val) FROM test ` func (q *Queries) GetAbs(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getAbs) var abs float64 err := row.Scan(&abs) return abs, err } const getChanges = `-- name: GetChanges :one SELECT changes() ` func (q *Queries) GetChanges(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, getChanges) var changes int64 err := row.Scan(&changes) return changes, err } const getChar1 = `-- name: GetChar1 :one SELECT char(65) ` func (q *Queries) GetChar1(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getChar1) var char string err := row.Scan(&char) return char, err } const getChar3 = `-- name: GetChar3 :one SELECT char(65, 66, 67) ` func (q *Queries) GetChar3(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getChar3) var char string err := row.Scan(&char) return char, err } const getCoalesce = `-- name: GetCoalesce :one SELECT coalesce(NULL, 1, 'test') ` func (q *Queries) GetCoalesce(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, getCoalesce) var coalesce interface{} err := row.Scan(&coalesce) return coalesce, err } const getFormat = `-- name: GetFormat :one SELECT format('Hello %s', 'world') ` func (q *Queries) GetFormat(ctx context.Context) (sql.NullString, error) { row := q.db.QueryRowContext(ctx, getFormat) var format sql.NullString err := row.Scan(&format) return format, err } const getGlob = `-- name: GetGlob :one SELECT glob('a*c', 'abc') ` func (q *Queries) GetGlob(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, getGlob) var glob int64 err := row.Scan(&glob) return glob, err } const getHex = `-- name: GetHex :one SELECT hex(123456) ` func (q *Queries) GetHex(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getHex) var hex string err := row.Scan(&hex) return hex, err } const getIfnull = `-- name: GetIfnull :one SELECT ifnull(1, 2) ` func (q *Queries) GetIfnull(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, getIfnull) var ifnull interface{} err := row.Scan(&ifnull) return ifnull, err } const getIif = `-- name: GetIif :one SELECT iif(1, 2, 3) ` func (q *Queries) GetIif(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, getIif) var iif interface{} err := row.Scan(&iif) return iif, err } const getInstr = `-- name: GetInstr :one SELECT instr('hello', 'l') ` func (q *Queries) GetInstr(ctx context.Context) (sql.NullInt64, error) { row := q.db.QueryRowContext(ctx, getInstr) var instr sql.NullInt64 err := row.Scan(&instr) return instr, err } const getLastInsertRowID = `-- name: GetLastInsertRowID :one SELECT last_insert_rowid() ` func (q *Queries) GetLastInsertRowID(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, getLastInsertRowID) var last_insert_rowid int64 err := row.Scan(&last_insert_rowid) return last_insert_rowid, err } const getLength = `-- name: GetLength :one SELECT length('12345') ` func (q *Queries) GetLength(ctx context.Context) (sql.NullInt64, error) { row := q.db.QueryRowContext(ctx, getLength) var length sql.NullInt64 err := row.Scan(&length) return length, err } const getLike2 = `-- name: GetLike2 :one SELECT like('%bc%', 'abcd') ` func (q *Queries) GetLike2(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, getLike2) var like int64 err := row.Scan(&like) return like, err } const getLike3 = `-- name: GetLike3 :one SELECT like('$%1%', '%100', '$') ` func (q *Queries) GetLike3(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, getLike3) var like int64 err := row.Scan(&like) return like, err } const getLikelihood = `-- name: GetLikelihood :one SELECT likelihood('12345', 0.5) ` func (q *Queries) GetLikelihood(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, getLikelihood) var likelihood interface{} err := row.Scan(&likelihood) return likelihood, err } const getLikely = `-- name: GetLikely :one SELECT likely('12345') ` func (q *Queries) GetLikely(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, getLikely) var likely interface{} err := row.Scan(&likely) return likely, err } const getLower = `-- name: GetLower :one SELECT lower('ABCDE') ` func (q *Queries) GetLower(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getLower) var lower string err := row.Scan(&lower) return lower, err } const getLtrim = `-- name: GetLtrim :one SELECT ltrim(' ABCDE') ` func (q *Queries) GetLtrim(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getLtrim) var ltrim string err := row.Scan(<rim) return ltrim, err } const getLtrim2 = `-- name: GetLtrim2 :one SELECT ltrim(':ABCDE', ':') ` func (q *Queries) GetLtrim2(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getLtrim2) var ltrim string err := row.Scan(<rim) return ltrim, err } const getMax3 = `-- name: GetMax3 :one SELECT max(1, 3, 2) ` func (q *Queries) GetMax3(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, getMax3) var max interface{} err := row.Scan(&max) return max, err } const getMin3 = `-- name: GetMin3 :one SELECT min(1, 3, 2) ` func (q *Queries) GetMin3(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, getMin3) var min interface{} err := row.Scan(&min) return min, err } const getNullif = `-- name: GetNullif :one SELECT nullif(1, 2) ` func (q *Queries) GetNullif(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, getNullif) var nullif interface{} err := row.Scan(&nullif) return nullif, err } const getPrintf = `-- name: GetPrintf :one SELECT printf('Hello %s', 'world') ` func (q *Queries) GetPrintf(ctx context.Context) (sql.NullString, error) { row := q.db.QueryRowContext(ctx, getPrintf) var printf sql.NullString err := row.Scan(&printf) return printf, err } const getQuote = `-- name: GetQuote :one SELECT quote(1) ` func (q *Queries) GetQuote(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getQuote) var quote string err := row.Scan("e) return quote, err } const getRandom = `-- name: GetRandom :one SELECT random() ` func (q *Queries) GetRandom(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, getRandom) var random interface{} err := row.Scan(&random) return random, err } const getRandomBlob = `-- name: GetRandomBlob :one SELECT randomblob(16) ` func (q *Queries) GetRandomBlob(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, getRandomBlob) var randomblob interface{} err := row.Scan(&randomblob) return randomblob, err } const getReplace = `-- name: GetReplace :one SELECT replace('abc', 'bc', 'df') ` func (q *Queries) GetReplace(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getReplace) var replace string err := row.Scan(&replace) return replace, err } const getRound = `-- name: GetRound :one SELECT round(1.1) ` func (q *Queries) GetRound(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getRound) var round float64 err := row.Scan(&round) return round, err } const getRound2 = `-- name: GetRound2 :one SELECT round(1.1, 2) ` func (q *Queries) GetRound2(ctx context.Context) (float64, error) { row := q.db.QueryRowContext(ctx, getRound2) var round float64 err := row.Scan(&round) return round, err } const getRtrim = `-- name: GetRtrim :one SELECT rtrim('ABCDE ') ` func (q *Queries) GetRtrim(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getRtrim) var rtrim string err := row.Scan(&rtrim) return rtrim, err } const getRtrim2 = `-- name: GetRtrim2 :one SELECT rtrim('ABCDE:', ':') ` func (q *Queries) GetRtrim2(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getRtrim2) var rtrim string err := row.Scan(&rtrim) return rtrim, err } const getSQLiteCompileOptionGet = `-- name: GetSQLiteCompileOptionGet :one SELECT sqlite_compileoption_get(1) ` func (q *Queries) GetSQLiteCompileOptionGet(ctx context.Context) (sql.NullString, error) { row := q.db.QueryRowContext(ctx, getSQLiteCompileOptionGet) var sqlite_compileoption_get sql.NullString err := row.Scan(&sqlite_compileoption_get) return sqlite_compileoption_get, err } const getSQLiteCompileOptionUsed = `-- name: GetSQLiteCompileOptionUsed :one SELECT sqlite_compileoption_used(1) ` func (q *Queries) GetSQLiteCompileOptionUsed(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, getSQLiteCompileOptionUsed) var sqlite_compileoption_used int64 err := row.Scan(&sqlite_compileoption_used) return sqlite_compileoption_used, err } const getSQLiteSourceID = `-- name: GetSQLiteSourceID :one SELECT sqlite_source_id() ` func (q *Queries) GetSQLiteSourceID(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getSQLiteSourceID) var sqlite_source_id string err := row.Scan(&sqlite_source_id) return sqlite_source_id, err } const getSQLiteVersion = `-- name: GetSQLiteVersion :one SELECT sqlite_version() ` func (q *Queries) GetSQLiteVersion(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getSQLiteVersion) var sqlite_version string err := row.Scan(&sqlite_version) return sqlite_version, err } const getSign = `-- name: GetSign :one SELECT sign(1) ` func (q *Queries) GetSign(ctx context.Context) (sql.NullInt64, error) { row := q.db.QueryRowContext(ctx, getSign) var sign sql.NullInt64 err := row.Scan(&sign) return sign, err } const getSoundex = `-- name: GetSoundex :one SELECT soundex('abc') ` func (q *Queries) GetSoundex(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getSoundex) var soundex string err := row.Scan(&soundex) return soundex, err } const getSubstr2 = `-- name: GetSubstr2 :one SELECT substr('abcdef', 2) ` func (q *Queries) GetSubstr2(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getSubstr2) var substr string err := row.Scan(&substr) return substr, err } const getSubstr3 = `-- name: GetSubstr3 :one SELECT substr('abcdef', 1, 2) ` func (q *Queries) GetSubstr3(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getSubstr3) var substr string err := row.Scan(&substr) return substr, err } const getSubstring2 = `-- name: GetSubstring2 :one SELECT substring('abcdef', 1) ` func (q *Queries) GetSubstring2(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getSubstring2) var substring string err := row.Scan(&substring) return substring, err } const getSusbstring3 = `-- name: GetSusbstring3 :one SELECT substring('abcdef', 1, 2) ` func (q *Queries) GetSusbstring3(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getSusbstring3) var substring string err := row.Scan(&substring) return substring, err } const getTotalChanges = `-- name: GetTotalChanges :one SELECT total_changes() ` func (q *Queries) GetTotalChanges(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, getTotalChanges) var total_changes int64 err := row.Scan(&total_changes) return total_changes, err } const getTrim = `-- name: GetTrim :one SELECT trim(' ABCDE ') ` func (q *Queries) GetTrim(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getTrim) var trim string err := row.Scan(&trim) return trim, err } const getTrim2 = `-- name: GetTrim2 :one SELECT trim(':ABCDE:', ':') ` func (q *Queries) GetTrim2(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getTrim2) var trim string err := row.Scan(&trim) return trim, err } const getTypeof = `-- name: GetTypeof :one SELECT typeof('ABCDE') ` func (q *Queries) GetTypeof(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getTypeof) var typeof string err := row.Scan(&typeof) return typeof, err } const getUnicode = `-- name: GetUnicode :one SELECT unicode('A') ` func (q *Queries) GetUnicode(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, getUnicode) var unicode int64 err := row.Scan(&unicode) return unicode, err } const getUnlikely = `-- name: GetUnlikely :one SELECT unlikely('12345') ` func (q *Queries) GetUnlikely(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, getUnlikely) var unlikely interface{} err := row.Scan(&unlikely) return unlikely, err } const getUpper = `-- name: GetUpper :one SELECT upper('abcde') ` func (q *Queries) GetUpper(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, getUpper) var upper string err := row.Scan(&upper) return upper, err } const getZeroblob = `-- name: GetZeroblob :one SELECT zeroblob(16) ` func (q *Queries) GetZeroblob(ctx context.Context) ([]byte, error) { row := q.db.QueryRowContext(ctx, getZeroblob) var zeroblob []byte err := row.Scan(&zeroblob) return zeroblob, err } ================================================ FILE: internal/endtoend/testdata/builtins/sqlite/queries/aggfunc.sql ================================================ -- name: GetAvg :one SELECT avg(int_val) FROM test; -- name: GetCount :one SELECT count(*) FROM test; -- name: GetCountId :one SELECT count(id) FROM test; -- name: GetGroupConcatInt :one SELECT group_concat(int_val) FROM test; -- name: GetGroupConcatInt2 :one SELECT group_concat(1, ':') FROM test; -- name: GetGroupConcatText :one SELECT group_concat(text_val) FROM test; -- name: GetGroupConcatText2 :one SELECT group_concat(text_val, ':') FROM test; -- name: GetMaxInt :one SELECT max(int_val) FROM test; -- name: GetMaxText :one SELECT max(text_val) FROM test; -- name: GetMinInt :one SELECT min(int_val) FROM test; -- name: GetMinText :one SELECT min(text_val) FROM test; -- name: GetSumInt :one SELECT sum(int_val) FROM test; -- name: GetSumText :one SELECT sum(text_val) FROM test; -- name: GetTotalInt :one SELECT total(int_val) FROM test; ================================================ FILE: internal/endtoend/testdata/builtins/sqlite/queries/mathfunc.sql ================================================ -- name: GetAcos :one select acos(1.0); -- name: GetAcosh :one select acosh(1.0); -- name: GetAsin :one select asin(1.0); -- name: GetAsinh :one select asinh(1.0); -- name: GetAtan :one select atan(1.0); -- name: GetAtan2 :one select atan2(1.0, 0.5); -- name: GetAtanh :one select atanh(1.0); -- name: GetCeil :one select ceil(1.0); -- name: GetCeilin :one select ceiling(1.0); -- name: GetCos :one select cos(1.0); -- name: GetCosh :one select cosh(1.0); -- name: GetDegrees :one select degrees(1.0); -- name: GetExp :one select exp(1.0); -- name: GetFloor :one select floor(1.0); -- name: GetLn :one select ln(1.0); -- name: GetLog :one select log(1.0); -- name: GetLog10 :one select log10(1.0); -- name: GetLogBase :one select log(1.0, 2.0); -- name: GetLog2 :one select log2(1.0); -- name: GetMod :one select mod(1, 2); -- name: GetPi :one select pi(); -- name: GetPow :one select pow(1, 2); -- name: GetPower :one select power(1, 2); -- name: GetRadians :one select radians(1); -- name: GetSin :one select sin(1.0); -- name: GetSinh :one select sinh(1.0); -- name: GetSqrt :one select sqrt(1.0); -- name: GetTan :one select tan(1.0); -- name: GetTrunc :one select trunc(1.0); ================================================ FILE: internal/endtoend/testdata/builtins/sqlite/queries/scalarfunc.sql ================================================ -- name: GetAbs :one SELECT abs(int_val) FROM test; -- name: GetChanges :one SELECT changes(); -- name: GetChar1 :one SELECT char(65); -- name: GetChar3 :one SELECT char(65, 66, 67); -- name: GetCoalesce :one SELECT coalesce(NULL, 1, 'test'); -- name: GetFormat :one SELECT format('Hello %s', 'world'); -- name: GetGlob :one SELECT glob('a*c', 'abc'); -- name: GetHex :one SELECT hex(123456); -- name: GetIfnull :one SELECT ifnull(1, 2); -- name: GetIif :one SELECT iif(1, 2, 3); -- name: GetLastInsertRowID :one SELECT last_insert_rowid(); -- name: GetInstr :one SELECT instr('hello', 'l'); -- name: GetLength :one SELECT length('12345'); -- name: GetLike2 :one SELECT like('%bc%', 'abcd'); -- name: GetLike3 :one SELECT like('$%1%', '%100', '$'); -- name: GetLikelihood :one SELECT likelihood('12345', 0.5); -- name: GetLikely :one SELECT likely('12345'); -- name: GetLower :one SELECT lower('ABCDE'); -- name: GetLtrim :one SELECT ltrim(' ABCDE'); -- name: GetLtrim2 :one SELECT ltrim(':ABCDE', ':'); -- name: GetMax3 :one SELECT max(1, 3, 2); -- name: GetMin3 :one SELECT min(1, 3, 2); -- name: GetNullif :one SELECT nullif(1, 2); -- name: GetPrintf :one SELECT printf('Hello %s', 'world'); -- name: GetQuote :one SELECT quote(1); -- name: GetRandom :one SELECT random(); -- name: GetRandomBlob :one SELECT randomblob(16); -- name: GetRound :one SELECT round(1.1); -- name: GetRound2 :one SELECT round(1.1, 2); -- name: GetReplace :one SELECT replace('abc', 'bc', 'df'); -- name: GetRtrim :one SELECT rtrim('ABCDE '); -- name: GetRtrim2 :one SELECT rtrim('ABCDE:', ':'); -- name: GetSign :one SELECT sign(1); -- name: GetSoundex :one SELECT soundex('abc'); -- name: GetSQLiteCompileOptionGet :one SELECT sqlite_compileoption_get(1); -- name: GetSQLiteCompileOptionUsed :one SELECT sqlite_compileoption_used(1); -- name: GetSQLiteSourceID :one SELECT sqlite_source_id(); -- name: GetSQLiteVersion :one SELECT sqlite_version(); -- name: GetSubstr3 :one SELECT substr('abcdef', 1, 2); -- name: GetSubstr2 :one SELECT substr('abcdef', 2); -- name: GetSusbstring3 :one SELECT substring('abcdef', 1, 2); -- name: GetSubstring2 :one SELECT substring('abcdef', 1); -- name: GetTotalChanges :one SELECT total_changes(); -- name: GetTrim :one SELECT trim(' ABCDE '); -- name: GetTrim2 :one SELECT trim(':ABCDE:', ':'); -- name: GetTypeof :one SELECT typeof('ABCDE'); -- name: GetUnicode :one SELECT unicode('A'); -- name: GetUnlikely :one SELECT unlikely('12345'); -- name: GetUpper :one SELECT upper('abcde'); -- name: GetZeroblob :one SELECT zeroblob(16); ================================================ FILE: internal/endtoend/testdata/builtins/sqlite/schema.sql ================================================ CREATE TABLE test ( id integer NOT NULL PRIMARY KEY AUTOINCREMENT, int_val integer NOT NULL, text_val text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/builtins/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "queries/", "engine": "sqlite" } ] } ================================================ FILE: internal/endtoend/testdata/case_named_params/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/case_named_params/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Author struct { ID int64 Username sql.NullString Email sql.NullString Name string Bio sql.NullString } ================================================ FILE: internal/endtoend/testdata/case_named_params/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const listAuthors = `-- name: ListAuthors :one SELECT id, username, email, name, bio FROM authors WHERE email = CASE WHEN ? = '' then NULL else ? END OR username = CASE WHEN ? = '' then NULL else ? END LIMIT 1 ` type ListAuthorsParams struct { Email sql.NullString Username sql.NullString } func (q *Queries) ListAuthors(ctx context.Context, arg ListAuthorsParams) (Author, error) { row := q.db.QueryRowContext(ctx, listAuthors, arg.Email, arg.Email, arg.Username, arg.Username, ) var i Author err := row.Scan( &i.ID, &i.Username, &i.Email, &i.Name, &i.Bio, ) return i, err } ================================================ FILE: internal/endtoend/testdata/case_named_params/mysql/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/case_named_params/mysql/schema.sql ================================================ -- https://github.com/sqlc-dev/sqlc/issues/1195 CREATE TABLE authors ( id BIGINT PRIMARY KEY, username VARCHAR(10) NULL, email VARCHAR(10) NULL, name TEXT NOT NULL, bio TEXT, UNIQUE KEY idx_username (username), UNIQUE KEY ids_email (email) ); ================================================ FILE: internal/endtoend/testdata/case_named_params/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/case_named_params/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/case_named_params/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Author struct { ID int64 Username sql.NullString Email sql.NullString Name string Bio sql.NullString } ================================================ FILE: internal/endtoend/testdata/case_named_params/postgresql/go/query.sql.go ================================================ // 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::text = '' then NULL else $1::text END OR username = CASE WHEN $2::text = '' then NULL else $2::text END LIMIT 1 ` type ListAuthorsParams struct { Email string Username string } 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 } ================================================ FILE: internal/endtoend/testdata/case_named_params/postgresql/query.sql ================================================ -- name: ListAuthors :one SELECT * FROM authors WHERE email = CASE WHEN sqlc.arg(email)::text = '' then NULL else sqlc.arg(email)::text END OR username = CASE WHEN sqlc.arg(username)::text = '' then NULL else sqlc.arg(username)::text END LIMIT 1; ================================================ FILE: internal/endtoend/testdata/case_named_params/postgresql/schema.sql ================================================ -- https://github.com/sqlc-dev/sqlc/issues/1195 CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, username TEXT NULL, email TEXT NULL, name TEXT NOT NULL, bio TEXT ); ================================================ FILE: internal/endtoend/testdata/case_named_params/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/case_named_params/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/case_named_params/sqlite/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/case_named_params/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/case_named_params/sqlite/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/case_named_params/sqlite/schema.sql ================================================ CREATE TABLE authors ( id INTEGER PRIMARY KEY, username TEXT NULL, email TEXT NULL, name TEXT NOT NULL, bio TEXT ); ================================================ FILE: internal/endtoend/testdata/case_named_params/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/case_sensitive/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/case_sensitive/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Contact struct { Pid sql.NullString Customername sql.NullString } ================================================ FILE: internal/endtoend/testdata/case_sensitive/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const insertContact = `-- name: InsertContact :exec INSERT INTO contacts ( pid, CustomerName ) VALUES (?,?) ` type InsertContactParams struct { Pid sql.NullString Customername sql.NullString } func (q *Queries) InsertContact(ctx context.Context, arg InsertContactParams) error { _, err := q.db.ExecContext(ctx, insertContact, arg.Pid, arg.Customername) return err } ================================================ FILE: internal/endtoend/testdata/case_sensitive/sqlite/query.sql ================================================ -- name: InsertContact :exec INSERT INTO contacts ( pid, CustomerName ) VALUES (?,?) ; ================================================ FILE: internal/endtoend/testdata/case_sensitive/sqlite/schema.sql ================================================ CREATE TABLE contacts ( pid TEXT, CustomerName TEXT ); ================================================ FILE: internal/endtoend/testdata/case_sensitive/sqlite/sqlc.json ================================================ {"version": "1", "packages": [{"path": "go", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "name": "querytest"}]} ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const caseStatementBoolean = `-- name: CaseStatementBoolean :many SELECT CASE WHEN id = $1 THEN true ELSE false END is_one FROM foo ` func (q *Queries) CaseStatementBoolean(ctx context.Context, id string) ([]bool, error) { rows, err := q.db.Query(ctx, caseStatementBoolean, id) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var is_one bool if err := rows.Scan(&is_one); err != nil { return nil, err } items = append(items, is_one) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/pgx/v4/query.sql ================================================ -- name: CaseStatementBoolean :many SELECT CASE WHEN id = $1 THEN true ELSE false END is_one FROM foo; ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/pgx/v4/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const caseStatementBoolean = `-- name: CaseStatementBoolean :many SELECT CASE WHEN id = $1 THEN true ELSE false END is_one FROM foo ` func (q *Queries) CaseStatementBoolean(ctx context.Context, id string) ([]bool, error) { rows, err := q.db.Query(ctx, caseStatementBoolean, id) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var is_one bool if err := rows.Scan(&is_one); err != nil { return nil, err } items = append(items, is_one) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/pgx/v5/query.sql ================================================ -- name: CaseStatementBoolean :many SELECT CASE WHEN id = $1 THEN true ELSE false END is_one FROM foo; ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/pgx/v5/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const caseStatementBoolean = `-- name: CaseStatementBoolean :many SELECT CASE WHEN id = $1 THEN true ELSE false END is_one FROM foo ` func (q *Queries) CaseStatementBoolean(ctx context.Context, id string) ([]bool, error) { rows, err := q.db.QueryContext(ctx, caseStatementBoolean, id) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var is_one bool if err := rows.Scan(&is_one); err != nil { return nil, err } items = append(items, is_one) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/stdlib/query.sql ================================================ -- name: CaseStatementBoolean :many SELECT CASE WHEN id = $1 THEN true ELSE false END is_one FROM foo; ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/stdlib/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/case_stmt_bool/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/case_text/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/case_text/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/case_text/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const caseStatementText = `-- name: CaseStatementText :many SELECT CASE WHEN id = $1 THEN 'foo' ELSE 'bar' END is_one FROM foo ` func (q *Queries) CaseStatementText(ctx context.Context, id string) ([]string, error) { rows, err := q.db.Query(ctx, caseStatementText, id) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var is_one string if err := rows.Scan(&is_one); err != nil { return nil, err } items = append(items, is_one) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/case_text/pgx/v4/query.sql ================================================ -- name: CaseStatementText :many SELECT CASE WHEN id = $1 THEN 'foo' ELSE 'bar' END is_one FROM foo; ================================================ FILE: internal/endtoend/testdata/case_text/pgx/v4/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/case_text/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/case_text/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/case_text/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/case_text/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const caseStatementText = `-- name: CaseStatementText :many SELECT CASE WHEN id = $1 THEN 'foo' ELSE 'bar' END is_one FROM foo ` func (q *Queries) CaseStatementText(ctx context.Context, id string) ([]string, error) { rows, err := q.db.Query(ctx, caseStatementText, id) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var is_one string if err := rows.Scan(&is_one); err != nil { return nil, err } items = append(items, is_one) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/case_text/pgx/v5/query.sql ================================================ -- name: CaseStatementText :many SELECT CASE WHEN id = $1 THEN 'foo' ELSE 'bar' END is_one FROM foo; ================================================ FILE: internal/endtoend/testdata/case_text/pgx/v5/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/case_text/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/case_text/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/case_text/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/case_text/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const caseStatementText = `-- name: CaseStatementText :many SELECT CASE WHEN id = $1 THEN 'foo' ELSE 'bar' END is_one FROM foo ` func (q *Queries) CaseStatementText(ctx context.Context, id string) ([]string, error) { rows, err := q.db.QueryContext(ctx, caseStatementText, id) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var is_one string if err := rows.Scan(&is_one); err != nil { return nil, err } items = append(items, is_one) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/case_text/stdlib/query.sql ================================================ -- name: CaseStatementText :many SELECT CASE WHEN id = $1 THEN 'foo' ELSE 'bar' END is_one FROM foo; ================================================ FILE: internal/endtoend/testdata/case_text/stdlib/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/case_text/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/case_value_param/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/2847 ================================================ FILE: internal/endtoend/testdata/case_value_param/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/case_value_param/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Testing struct { ID int32 Value sql.NullString } ================================================ FILE: internal/endtoend/testdata/case_value_param/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const update = `-- name: Update :exec UPDATE testing SET value = CASE ? WHEN true THEN 'Hello' WHEN false THEN 'Goodbye' ELSE value END ` func (q *Queries) Update(ctx context.Context, value sql.NullString) error { _, err := q.db.ExecContext(ctx, update, value) return err } ================================================ FILE: internal/endtoend/testdata/case_value_param/mysql/query.sql ================================================ -- name: Update :exec UPDATE testing SET value = CASE ? WHEN true THEN 'Hello' WHEN false THEN 'Goodbye' ELSE value END; ================================================ FILE: internal/endtoend/testdata/case_value_param/mysql/schema.sql ================================================ CREATE TABLE testing ( id int PRIMARY KEY, value text ); ================================================ FILE: internal/endtoend/testdata/case_value_param/mysql/sqlc.yaml ================================================ version: "2" sql: - engine: "mysql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" ================================================ FILE: internal/endtoend/testdata/case_value_param/postgresql/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/case_value_param/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/case_value_param/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Testing struct { ID int32 Value pgtype.Text } ================================================ FILE: internal/endtoend/testdata/case_value_param/postgresql/go/query.sql.go ================================================ // 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 update = `-- name: Update :exec UPDATE testing SET value = CASE $1 WHEN true THEN 'Hello' WHEN false THEN 'Goodbye' ELSE value END ` func (q *Queries) Update(ctx context.Context, value pgtype.Text) error { _, err := q.db.Exec(ctx, update, value) return err } ================================================ FILE: internal/endtoend/testdata/case_value_param/postgresql/query.sql ================================================ -- name: Update :exec UPDATE testing SET value = CASE $1 WHEN true THEN 'Hello' WHEN false THEN 'Goodbye' ELSE value END; ================================================ FILE: internal/endtoend/testdata/case_value_param/postgresql/schema.sql ================================================ CREATE TABLE testing ( id int PRIMARY KEY, value text ); ================================================ FILE: internal/endtoend/testdata/case_value_param/postgresql/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/cast_coalesce/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cast_coalesce/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString } ================================================ FILE: internal/endtoend/testdata/cast_coalesce/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const castCoalesce = `-- name: CastCoalesce :many SELECT coalesce(bar, '')::text as login FROM foo ` func (q *Queries) CastCoalesce(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, castCoalesce) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var login string if err := rows.Scan(&login); err != nil { return nil, err } items = append(items, login) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cast_coalesce/pgx/v4/query.sql ================================================ -- name: CastCoalesce :many SELECT coalesce(bar, '')::text as login FROM foo; ================================================ FILE: internal/endtoend/testdata/cast_coalesce/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/cast_coalesce/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cast_coalesce/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cast_coalesce/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar pgtype.Text } ================================================ FILE: internal/endtoend/testdata/cast_coalesce/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const castCoalesce = `-- name: CastCoalesce :many SELECT coalesce(bar, '')::text as login FROM foo ` func (q *Queries) CastCoalesce(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, castCoalesce) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var login string if err := rows.Scan(&login); err != nil { return nil, err } items = append(items, login) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cast_coalesce/pgx/v5/query.sql ================================================ -- name: CastCoalesce :many SELECT coalesce(bar, '')::text as login FROM foo; ================================================ FILE: internal/endtoend/testdata/cast_coalesce/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/cast_coalesce/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cast_coalesce/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cast_coalesce/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString } ================================================ FILE: internal/endtoend/testdata/cast_coalesce/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const castCoalesce = `-- name: CastCoalesce :many SELECT coalesce(bar, '')::text as login FROM foo ` func (q *Queries) CastCoalesce(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, castCoalesce) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var login string if err := rows.Scan(&login); err != nil { return nil, err } items = append(items, login) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cast_coalesce/stdlib/query.sql ================================================ -- name: CastCoalesce :many SELECT coalesce(bar, '')::text as login FROM foo; ================================================ FILE: internal/endtoend/testdata/cast_coalesce/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/cast_coalesce/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cast_null/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cast_null/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString } ================================================ FILE: internal/endtoend/testdata/cast_null/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const listNullable = `-- name: ListNullable :many SELECT NULL::text as a, NULL::integer as b, NULL::bigint as c, NULL::time as d FROM foo ` type ListNullableRow struct { A sql.NullString B sql.NullInt32 C sql.NullInt64 D sql.NullTime } func (q *Queries) ListNullable(ctx context.Context) ([]ListNullableRow, error) { rows, err := q.db.Query(ctx, listNullable) if err != nil { return nil, err } defer rows.Close() var items []ListNullableRow for rows.Next() { var i ListNullableRow if err := rows.Scan( &i.A, &i.B, &i.C, &i.D, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cast_null/pgx/v4/query.sql ================================================ -- name: ListNullable :many SELECT NULL::text as a, NULL::integer as b, NULL::bigint as c, NULL::time as d FROM foo; ================================================ FILE: internal/endtoend/testdata/cast_null/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/cast_null/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cast_null/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cast_null/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar pgtype.Text } ================================================ FILE: internal/endtoend/testdata/cast_null/pgx/v5/go/query.sql.go ================================================ // 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 listNullable = `-- name: ListNullable :many SELECT NULL::text as a, NULL::integer as b, NULL::bigint as c, NULL::time as d FROM foo ` type ListNullableRow struct { A pgtype.Text B pgtype.Int4 C pgtype.Int8 D pgtype.Time } func (q *Queries) ListNullable(ctx context.Context) ([]ListNullableRow, error) { rows, err := q.db.Query(ctx, listNullable) if err != nil { return nil, err } defer rows.Close() var items []ListNullableRow for rows.Next() { var i ListNullableRow if err := rows.Scan( &i.A, &i.B, &i.C, &i.D, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cast_null/pgx/v5/query.sql ================================================ -- name: ListNullable :many SELECT NULL::text as a, NULL::integer as b, NULL::bigint as c, NULL::time as d FROM foo; ================================================ FILE: internal/endtoend/testdata/cast_null/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/cast_null/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cast_null/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cast_null/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString } ================================================ FILE: internal/endtoend/testdata/cast_null/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const listNullable = `-- name: ListNullable :many SELECT NULL::text as a, NULL::integer as b, NULL::bigint as c, NULL::time as d FROM foo ` type ListNullableRow struct { A sql.NullString B sql.NullInt32 C sql.NullInt64 D sql.NullTime } func (q *Queries) ListNullable(ctx context.Context) ([]ListNullableRow, error) { rows, err := q.db.QueryContext(ctx, listNullable) if err != nil { return nil, err } defer rows.Close() var items []ListNullableRow for rows.Next() { var i ListNullableRow if err := rows.Scan( &i.A, &i.B, &i.C, &i.D, ); 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 } ================================================ FILE: internal/endtoend/testdata/cast_null/stdlib/query.sql ================================================ -- name: ListNullable :many SELECT NULL::text as a, NULL::integer as b, NULL::bigint as c, NULL::time as d FROM foo; ================================================ FILE: internal/endtoend/testdata/cast_null/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/cast_null/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cast_param/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cast_param/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type MyTable struct { Invalid sql.NullBool Foo sql.NullString } ================================================ FILE: internal/endtoend/testdata/cast_param/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getData = `-- name: GetData :many select invalid, foo from my_table where (cast(?1 as boolean) or not invalid) ` func (q *Queries) GetData(ctx context.Context, allowInvalid bool) ([]MyTable, error) { rows, err := q.db.QueryContext(ctx, getData, allowInvalid) if err != nil { return nil, err } defer rows.Close() var items []MyTable for rows.Next() { var i MyTable if err := rows.Scan(&i.Invalid, &i.Foo); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cast_param/sqlite/query.sql ================================================ -- name: GetData :many select * from my_table where (cast(sqlc.arg(allow_invalid) as boolean) or not invalid); ================================================ FILE: internal/endtoend/testdata/cast_param/sqlite/schema.sql ================================================ create table my_table ( invalid boolean, foo varchar ); ================================================ FILE: internal/endtoend/testdata/cast_param/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "name": "querytest" } ] } ================================================ FILE: internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgtype" ) type TestTable struct { VCidNull pgtype.CID VOidNull pgtype.OID VTidNull pgtype.TID VXidNull pgtype.XID VCid pgtype.CID VOid pgtype.OID VTid pgtype.TID VXid pgtype.XID } ================================================ FILE: internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectTest = `-- name: SelectTest :many SELECT v_cid_null, v_oid_null, v_tid_null, v_xid_null, v_cid, v_oid, v_tid, v_xid from test_table ` func (q *Queries) SelectTest(ctx context.Context) ([]TestTable, error) { rows, err := q.db.Query(ctx, selectTest) if err != nil { return nil, err } defer rows.Close() var items []TestTable for rows.Next() { var i TestTable if err := rows.Scan( &i.VCidNull, &i.VOidNull, &i.VTidNull, &i.VXidNull, &i.VCid, &i.VOid, &i.VTid, &i.VXid, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/query.sql ================================================ -- name: SelectTest :many SELECT * from test_table; ================================================ FILE: internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/schema.sql ================================================ CREATE TABLE test_table ( v_cid_null cid, v_oid_null oid, v_tid_null tid, v_xid_null xid, v_cid cid not null, v_oid oid not null, v_tid tid not null, v_xid xid not null ); ================================================ FILE: internal/endtoend/testdata/cid_oid_tid_xid/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type TestTable struct { VCidNull pgtype.Uint32 VOidNull pgtype.Uint32 VTidNull pgtype.TID VXidNull pgtype.Uint32 VCid pgtype.Uint32 VOid pgtype.Uint32 VTid pgtype.TID VXid pgtype.Uint32 } ================================================ FILE: internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectTest = `-- name: SelectTest :many SELECT v_cid_null, v_oid_null, v_tid_null, v_xid_null, v_cid, v_oid, v_tid, v_xid from test_table ` func (q *Queries) SelectTest(ctx context.Context) ([]TestTable, error) { rows, err := q.db.Query(ctx, selectTest) if err != nil { return nil, err } defer rows.Close() var items []TestTable for rows.Next() { var i TestTable if err := rows.Scan( &i.VCidNull, &i.VOidNull, &i.VTidNull, &i.VXidNull, &i.VCid, &i.VOid, &i.VTid, &i.VXid, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/query.sql ================================================ -- name: SelectTest :many SELECT * from test_table; ================================================ FILE: internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/schema.sql ================================================ CREATE TABLE test_table ( v_cid_null cid, v_oid_null oid, v_tid_null tid, v_xid_null xid, v_cid cid not null, v_oid oid not null, v_tid tid not null, v_xid xid not null ); ================================================ FILE: internal/endtoend/testdata/cid_oid_tid_xid/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/citext/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/citext/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString Bat string } ================================================ FILE: internal/endtoend/testdata/citext/pgx/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getCitexts = `-- name: GetCitexts :many SELECT bar, bat FROM foo ` func (q *Queries) GetCitexts(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, getCitexts) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Bar, &i.Bat); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/citext/pgx/query.sql ================================================ -- name: GetCitexts :many SELECT bar, bat FROM foo; ================================================ FILE: internal/endtoend/testdata/citext/pgx/schema.sql ================================================ CREATE EXTENSION IF NOT EXISTS citext; CREATE TABLE foo ( bar citext, bat citext not null ); ================================================ FILE: internal/endtoend/testdata/citext/pgx/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/citext/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/citext/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString Bat string } ================================================ FILE: internal/endtoend/testdata/citext/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getCitexts = `-- name: GetCitexts :many SELECT bar, bat FROM foo ` func (q *Queries) GetCitexts(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, getCitexts) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Bar, &i.Bat); 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 } ================================================ FILE: internal/endtoend/testdata/citext/stdlib/query.sql ================================================ -- name: GetCitexts :many SELECT bar, bat FROM foo; ================================================ FILE: internal/endtoend/testdata/citext/stdlib/schema.sql ================================================ CREATE EXTENSION IF NOT EXISTS citext; CREATE TABLE foo ( bar citext, bat citext not null ); ================================================ FILE: internal/endtoend/testdata/citext/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/coalesce/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/coalesce/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString Bat string } ================================================ FILE: internal/endtoend/testdata/coalesce/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const coalesce = `-- name: Coalesce :many SELECT coalesce(bar, '') as login FROM foo ` func (q *Queries) Coalesce(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, coalesce) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var login string if err := rows.Scan(&login); err != nil { return nil, err } items = append(items, login) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const coalesceColumns = `-- name: CoalesceColumns :many SELECT bar, bat, coalesce(bar, bat) FROM foo ` type CoalesceColumnsRow struct { Bar sql.NullString Bat string Bar_2 string } func (q *Queries) CoalesceColumns(ctx context.Context) ([]CoalesceColumnsRow, error) { rows, err := q.db.QueryContext(ctx, coalesceColumns) if err != nil { return nil, err } defer rows.Close() var items []CoalesceColumnsRow for rows.Next() { var i CoalesceColumnsRow if err := rows.Scan(&i.Bar, &i.Bat, &i.Bar_2); 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 } ================================================ FILE: internal/endtoend/testdata/coalesce/mysql/query.sql ================================================ -- name: Coalesce :many SELECT coalesce(bar, '') as login FROM foo; -- name: CoalesceColumns :many SELECT bar, bat, coalesce(bar, bat) FROM foo; ================================================ FILE: internal/endtoend/testdata/coalesce/mysql/schema.sql ================================================ CREATE TABLE foo (bar text, bat text not null); ================================================ FILE: internal/endtoend/testdata/coalesce/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString Bat string Baz sql.NullInt64 Qux int64 } ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const coalesceNumeric = `-- name: CoalesceNumeric :many SELECT coalesce(baz, 0) as login FROM foo ` func (q *Queries) CoalesceNumeric(ctx context.Context) ([]int64, error) { rows, err := q.db.Query(ctx, coalesceNumeric) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var login int64 if err := rows.Scan(&login); err != nil { return nil, err } items = append(items, login) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const coalesceNumericColumns = `-- name: CoalesceNumericColumns :many SELECT baz, qux, coalesce(baz, qux) FROM foo ` type CoalesceNumericColumnsRow struct { Baz sql.NullInt64 Qux int64 Baz_2 int64 } func (q *Queries) CoalesceNumericColumns(ctx context.Context) ([]CoalesceNumericColumnsRow, error) { rows, err := q.db.Query(ctx, coalesceNumericColumns) if err != nil { return nil, err } defer rows.Close() var items []CoalesceNumericColumnsRow for rows.Next() { var i CoalesceNumericColumnsRow if err := rows.Scan(&i.Baz, &i.Qux, &i.Baz_2); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const coalesceNumericNull = `-- name: CoalesceNumericNull :many SELECT baz, coalesce(baz) FROM foo ` type CoalesceNumericNullRow struct { Baz sql.NullInt64 Baz_2 sql.NullInt64 } func (q *Queries) CoalesceNumericNull(ctx context.Context) ([]CoalesceNumericNullRow, error) { rows, err := q.db.Query(ctx, coalesceNumericNull) if err != nil { return nil, err } defer rows.Close() var items []CoalesceNumericNullRow for rows.Next() { var i CoalesceNumericNullRow if err := rows.Scan(&i.Baz, &i.Baz_2); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const coalesceString = `-- name: CoalesceString :many SELECT coalesce(bar, '') as login FROM foo ` func (q *Queries) CoalesceString(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, coalesceString) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var login string if err := rows.Scan(&login); err != nil { return nil, err } items = append(items, login) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const coalesceStringColumns = `-- name: CoalesceStringColumns :many SELECT bar, bat, coalesce(bar, bat) FROM foo ` type CoalesceStringColumnsRow struct { Bar sql.NullString Bat string Bar_2 string } func (q *Queries) CoalesceStringColumns(ctx context.Context) ([]CoalesceStringColumnsRow, error) { rows, err := q.db.Query(ctx, coalesceStringColumns) if err != nil { return nil, err } defer rows.Close() var items []CoalesceStringColumnsRow for rows.Next() { var i CoalesceStringColumnsRow if err := rows.Scan(&i.Bar, &i.Bat, &i.Bar_2); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const coalesceStringNull = `-- name: CoalesceStringNull :many SELECT bar, coalesce(bar) FROM foo ` type CoalesceStringNullRow struct { Bar sql.NullString Bar_2 sql.NullString } func (q *Queries) CoalesceStringNull(ctx context.Context) ([]CoalesceStringNullRow, error) { rows, err := q.db.Query(ctx, coalesceStringNull) if err != nil { return nil, err } defer rows.Close() var items []CoalesceStringNullRow for rows.Next() { var i CoalesceStringNullRow if err := rows.Scan(&i.Bar, &i.Bar_2); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/pgx/v4/query.sql ================================================ -- name: CoalesceString :many SELECT coalesce(bar, '') as login FROM foo; -- name: CoalesceNumeric :many SELECT coalesce(baz, 0) as login FROM foo; -- name: CoalesceStringColumns :many SELECT bar, bat, coalesce(bar, bat) FROM foo; -- name: CoalesceNumericColumns :many SELECT baz, qux, coalesce(baz, qux) FROM foo; -- name: CoalesceStringNull :many SELECT bar, coalesce(bar) FROM foo; -- name: CoalesceNumericNull :many SELECT baz, coalesce(baz) FROM foo; ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo ( bar text, bat text not null, baz bigint, qux bigint not null ); ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar pgtype.Text Bat string Baz pgtype.Int8 Qux int64 } ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 coalesceNumeric = `-- name: CoalesceNumeric :many SELECT coalesce(baz, 0) as login FROM foo ` func (q *Queries) CoalesceNumeric(ctx context.Context) ([]int64, error) { rows, err := q.db.Query(ctx, coalesceNumeric) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var login int64 if err := rows.Scan(&login); err != nil { return nil, err } items = append(items, login) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const coalesceNumericColumns = `-- name: CoalesceNumericColumns :many SELECT baz, qux, coalesce(baz, qux) FROM foo ` type CoalesceNumericColumnsRow struct { Baz pgtype.Int8 Qux int64 Baz_2 int64 } func (q *Queries) CoalesceNumericColumns(ctx context.Context) ([]CoalesceNumericColumnsRow, error) { rows, err := q.db.Query(ctx, coalesceNumericColumns) if err != nil { return nil, err } defer rows.Close() var items []CoalesceNumericColumnsRow for rows.Next() { var i CoalesceNumericColumnsRow if err := rows.Scan(&i.Baz, &i.Qux, &i.Baz_2); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const coalesceNumericNull = `-- name: CoalesceNumericNull :many SELECT baz, coalesce(baz) FROM foo ` type CoalesceNumericNullRow struct { Baz pgtype.Int8 Baz_2 pgtype.Int8 } func (q *Queries) CoalesceNumericNull(ctx context.Context) ([]CoalesceNumericNullRow, error) { rows, err := q.db.Query(ctx, coalesceNumericNull) if err != nil { return nil, err } defer rows.Close() var items []CoalesceNumericNullRow for rows.Next() { var i CoalesceNumericNullRow if err := rows.Scan(&i.Baz, &i.Baz_2); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const coalesceString = `-- name: CoalesceString :many SELECT coalesce(bar, '') as login FROM foo ` func (q *Queries) CoalesceString(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, coalesceString) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var login string if err := rows.Scan(&login); err != nil { return nil, err } items = append(items, login) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const coalesceStringColumns = `-- name: CoalesceStringColumns :many SELECT bar, bat, coalesce(bar, bat) FROM foo ` type CoalesceStringColumnsRow struct { Bar pgtype.Text Bat string Bar_2 string } func (q *Queries) CoalesceStringColumns(ctx context.Context) ([]CoalesceStringColumnsRow, error) { rows, err := q.db.Query(ctx, coalesceStringColumns) if err != nil { return nil, err } defer rows.Close() var items []CoalesceStringColumnsRow for rows.Next() { var i CoalesceStringColumnsRow if err := rows.Scan(&i.Bar, &i.Bat, &i.Bar_2); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const coalesceStringNull = `-- name: CoalesceStringNull :many SELECT bar, coalesce(bar) FROM foo ` type CoalesceStringNullRow struct { Bar pgtype.Text Bar_2 pgtype.Text } func (q *Queries) CoalesceStringNull(ctx context.Context) ([]CoalesceStringNullRow, error) { rows, err := q.db.Query(ctx, coalesceStringNull) if err != nil { return nil, err } defer rows.Close() var items []CoalesceStringNullRow for rows.Next() { var i CoalesceStringNullRow if err := rows.Scan(&i.Bar, &i.Bar_2); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/pgx/v5/query.sql ================================================ -- name: CoalesceString :many SELECT coalesce(bar, '') as login FROM foo; -- name: CoalesceNumeric :many SELECT coalesce(baz, 0) as login FROM foo; -- name: CoalesceStringColumns :many SELECT bar, bat, coalesce(bar, bat) FROM foo; -- name: CoalesceNumericColumns :many SELECT baz, qux, coalesce(baz, qux) FROM foo; -- name: CoalesceStringNull :many SELECT bar, coalesce(bar) FROM foo; -- name: CoalesceNumericNull :many SELECT baz, coalesce(baz) FROM foo; ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo ( bar text, bat text not null, baz bigint, qux bigint not null ); ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString Bat string Baz sql.NullInt64 Qux int64 } ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const coalesceNumeric = `-- name: CoalesceNumeric :many SELECT coalesce(baz, 0) as login FROM foo ` func (q *Queries) CoalesceNumeric(ctx context.Context) ([]int64, error) { rows, err := q.db.QueryContext(ctx, coalesceNumeric) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var login int64 if err := rows.Scan(&login); err != nil { return nil, err } items = append(items, login) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const coalesceNumericColumns = `-- name: CoalesceNumericColumns :many SELECT baz, qux, coalesce(baz, qux) FROM foo ` type CoalesceNumericColumnsRow struct { Baz sql.NullInt64 Qux int64 Baz_2 int64 } func (q *Queries) CoalesceNumericColumns(ctx context.Context) ([]CoalesceNumericColumnsRow, error) { rows, err := q.db.QueryContext(ctx, coalesceNumericColumns) if err != nil { return nil, err } defer rows.Close() var items []CoalesceNumericColumnsRow for rows.Next() { var i CoalesceNumericColumnsRow if err := rows.Scan(&i.Baz, &i.Qux, &i.Baz_2); 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 coalesceNumericNull = `-- name: CoalesceNumericNull :many SELECT baz, coalesce(baz) FROM foo ` type CoalesceNumericNullRow struct { Baz sql.NullInt64 Baz_2 sql.NullInt64 } func (q *Queries) CoalesceNumericNull(ctx context.Context) ([]CoalesceNumericNullRow, error) { rows, err := q.db.QueryContext(ctx, coalesceNumericNull) if err != nil { return nil, err } defer rows.Close() var items []CoalesceNumericNullRow for rows.Next() { var i CoalesceNumericNullRow if err := rows.Scan(&i.Baz, &i.Baz_2); 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 coalesceString = `-- name: CoalesceString :many SELECT coalesce(bar, '') as login FROM foo ` func (q *Queries) CoalesceString(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, coalesceString) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var login string if err := rows.Scan(&login); err != nil { return nil, err } items = append(items, login) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const coalesceStringColumns = `-- name: CoalesceStringColumns :many SELECT bar, bat, coalesce(bar, bat) FROM foo ` type CoalesceStringColumnsRow struct { Bar sql.NullString Bat string Bar_2 string } func (q *Queries) CoalesceStringColumns(ctx context.Context) ([]CoalesceStringColumnsRow, error) { rows, err := q.db.QueryContext(ctx, coalesceStringColumns) if err != nil { return nil, err } defer rows.Close() var items []CoalesceStringColumnsRow for rows.Next() { var i CoalesceStringColumnsRow if err := rows.Scan(&i.Bar, &i.Bat, &i.Bar_2); 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 coalesceStringNull = `-- name: CoalesceStringNull :many SELECT bar, coalesce(bar) FROM foo ` type CoalesceStringNullRow struct { Bar sql.NullString Bar_2 sql.NullString } func (q *Queries) CoalesceStringNull(ctx context.Context) ([]CoalesceStringNullRow, error) { rows, err := q.db.QueryContext(ctx, coalesceStringNull) if err != nil { return nil, err } defer rows.Close() var items []CoalesceStringNullRow for rows.Next() { var i CoalesceStringNullRow if err := rows.Scan(&i.Bar, &i.Bar_2); 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 } ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/stdlib/query.sql ================================================ -- name: CoalesceString :many SELECT coalesce(bar, '') as login FROM foo; -- name: CoalesceNumeric :many SELECT coalesce(baz, 0) as login FROM foo; -- name: CoalesceStringColumns :many SELECT bar, bat, coalesce(bar, bat) FROM foo; -- name: CoalesceNumericColumns :many SELECT baz, qux, coalesce(baz, qux) FROM foo; -- name: CoalesceStringNull :many SELECT bar, coalesce(bar) FROM foo; -- name: CoalesceNumericNull :many SELECT baz, coalesce(baz) FROM foo; ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo ( bar text, bat text not null, baz bigint, qux bigint not null ); ================================================ FILE: internal/endtoend/testdata/coalesce/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/coalesce/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/coalesce/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString Bat string } ================================================ FILE: internal/endtoend/testdata/coalesce/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const coalesce = `-- name: Coalesce :many SELECT coalesce(bar, '') as login FROM foo ` func (q *Queries) Coalesce(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, coalesce) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var login string if err := rows.Scan(&login); err != nil { return nil, err } items = append(items, login) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const coalesceColumns = `-- name: CoalesceColumns :many SELECT bar, bat, coalesce(bar, bat) FROM foo ` type CoalesceColumnsRow struct { Bar sql.NullString Bat string Bar_2 string } func (q *Queries) CoalesceColumns(ctx context.Context) ([]CoalesceColumnsRow, error) { rows, err := q.db.QueryContext(ctx, coalesceColumns) if err != nil { return nil, err } defer rows.Close() var items []CoalesceColumnsRow for rows.Next() { var i CoalesceColumnsRow if err := rows.Scan(&i.Bar, &i.Bat, &i.Bar_2); 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 } ================================================ FILE: internal/endtoend/testdata/coalesce/sqlite/query.sql ================================================ -- name: Coalesce :many SELECT coalesce(bar, '') as login FROM foo; -- name: CoalesceColumns :many SELECT bar, bat, coalesce(bar, bat) FROM foo; ================================================ FILE: internal/endtoend/testdata/coalesce/sqlite/schema.sql ================================================ CREATE TABLE foo (bar text, bat text not null); ================================================ FILE: internal/endtoend/testdata/coalesce/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/coalesce_as/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/coalesce_as/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString Baz sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/coalesce_as/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const sumBaz = `-- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo GROUP BY 1 ` type SumBazRow struct { Bar sql.NullString Quantity interface{} } func (q *Queries) SumBaz(ctx context.Context) ([]SumBazRow, error) { rows, err := q.db.QueryContext(ctx, sumBaz) if err != nil { return nil, err } defer rows.Close() var items []SumBazRow for rows.Next() { var i SumBazRow if err := rows.Scan(&i.Bar, &i.Quantity); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/coalesce_as/mysql/query.sql ================================================ -- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo GROUP BY 1; ================================================ FILE: internal/endtoend/testdata/coalesce_as/mysql/schema.sql ================================================ CREATE TABLE foo ( bar text, baz integer ); ================================================ FILE: internal/endtoend/testdata/coalesce_as/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar pgtype.Text Baz pgtype.Int8 } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/go/query.sql.go ================================================ // 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 sumBaz = `-- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo GROUP BY 1 ` type SumBazRow struct { Bar pgtype.Text Quantity pgtype.Numeric } func (q *Queries) SumBaz(ctx context.Context) ([]SumBazRow, error) { rows, err := q.db.Query(ctx, sumBaz) if err != nil { return nil, err } defer rows.Close() var items []SumBazRow for rows.Next() { var i SumBazRow if err := rows.Scan(&i.Bar, &i.Quantity); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/query.sql ================================================ -- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo GROUP BY 1; ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/schema.sql ================================================ CREATE TABLE foo ( bar text, baz bigint ); ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pganalyze/sqlc.json ================================================ { "version": "1", "cloud": { "project": "01HAQMMECEYQYKFJN8MP16QC41" }, "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "database": { "managed": true }, "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString Baz sql.NullInt64 } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const sumBaz = `-- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo GROUP BY 1 ` type SumBazRow struct { Bar sql.NullString Quantity interface{} } func (q *Queries) SumBaz(ctx context.Context) ([]SumBazRow, error) { rows, err := q.db.Query(ctx, sumBaz) if err != nil { return nil, err } defer rows.Close() var items []SumBazRow for rows.Next() { var i SumBazRow if err := rows.Scan(&i.Bar, &i.Quantity); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/query.sql ================================================ -- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo GROUP BY 1; ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo ( bar text, baz bigint ); ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar pgtype.Text Baz pgtype.Int8 } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 sumBaz = `-- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo GROUP BY 1 ` type SumBazRow struct { Bar pgtype.Text Quantity interface{} } func (q *Queries) SumBaz(ctx context.Context) ([]SumBazRow, error) { rows, err := q.db.Query(ctx, sumBaz) if err != nil { return nil, err } defer rows.Close() var items []SumBazRow for rows.Next() { var i SumBazRow if err := rows.Scan(&i.Bar, &i.Quantity); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/query.sql ================================================ -- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo GROUP BY 1; ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo ( bar text, baz bigint ); ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/stdlib/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString Baz sql.NullInt64 } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const sumBaz = `-- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo GROUP BY 1 ` type SumBazRow struct { Bar sql.NullString Quantity interface{} } func (q *Queries) SumBaz(ctx context.Context) ([]SumBazRow, error) { rows, err := q.db.QueryContext(ctx, sumBaz) if err != nil { return nil, err } defer rows.Close() var items []SumBazRow for rows.Next() { var i SumBazRow if err := rows.Scan(&i.Bar, &i.Quantity); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/stdlib/query.sql ================================================ -- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo GROUP BY 1; ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo ( bar text, baz bigint ); ================================================ FILE: internal/endtoend/testdata/coalesce_as/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/coalesce_as/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/coalesce_as/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString Baz sql.NullInt64 } ================================================ FILE: internal/endtoend/testdata/coalesce_as/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const sumBaz = `-- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo GROUP BY 1 ` type SumBazRow struct { Bar sql.NullString Quantity interface{} } func (q *Queries) SumBaz(ctx context.Context) ([]SumBazRow, error) { rows, err := q.db.QueryContext(ctx, sumBaz) if err != nil { return nil, err } defer rows.Close() var items []SumBazRow for rows.Next() { var i SumBazRow if err := rows.Scan(&i.Bar, &i.Quantity); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/coalesce_as/sqlite/query.sql ================================================ -- name: SumBaz :many SELECT bar, coalesce(sum(baz), 0) as quantity FROM foo GROUP BY 1; ================================================ FILE: internal/endtoend/testdata/coalesce_as/sqlite/schema.sql ================================================ CREATE TABLE foo ( bar text, baz integer ); ================================================ FILE: internal/endtoend/testdata/coalesce_as/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/coalesce_join/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/coalesce_join/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int64 } type Foo struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/coalesce_join/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getBar = `-- name: GetBar :many SELECT foo.id, COALESCE(bar.id, 0) AS bar_id FROM foo LEFT JOIN bar ON foo.id = bar.id ` type GetBarRow struct { ID int64 BarID int64 } func (q *Queries) GetBar(ctx context.Context) ([]GetBarRow, error) { rows, err := q.db.QueryContext(ctx, getBar) if err != nil { return nil, err } defer rows.Close() var items []GetBarRow for rows.Next() { var i GetBarRow if err := rows.Scan(&i.ID, &i.BarID); 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 } ================================================ FILE: internal/endtoend/testdata/coalesce_join/postgresql/query.sql ================================================ -- name: GetBar :many SELECT foo.*, COALESCE(bar.id, 0) AS bar_id FROM foo LEFT JOIN bar ON foo.id = bar.id; ================================================ FILE: internal/endtoend/testdata/coalesce_join/postgresql/schema.sql ================================================ CREATE TABLE foo(id bigserial primary key); CREATE TABLE bar(id bigserial primary key); ================================================ FILE: internal/endtoend/testdata/coalesce_join/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/coalesce_params/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/2748 https://github.com/sqlc-dev/sqlc/issues/2786 ================================================ FILE: internal/endtoend/testdata/coalesce_params/mysql/exec.json ================================================ { "contexts": ["base"], "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/coalesce_params/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/coalesce_params/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "database/sql/driver" "fmt" "time" ) type CalendarMaincalendar string const ( CalendarMaincalendarTrue CalendarMaincalendar = "true" CalendarMaincalendarFalse CalendarMaincalendar = "false" ) func (e *CalendarMaincalendar) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = CalendarMaincalendar(s) case string: *e = CalendarMaincalendar(s) default: return fmt.Errorf("unsupported scan type for CalendarMaincalendar: %T", src) } return nil } type NullCalendarMaincalendar struct { CalendarMaincalendar CalendarMaincalendar Valid bool // Valid is true if CalendarMaincalendar is not NULL } // Scan implements the Scanner interface. func (ns *NullCalendarMaincalendar) Scan(value interface{}) error { if value == nil { ns.CalendarMaincalendar, ns.Valid = "", false return nil } ns.Valid = true return ns.CalendarMaincalendar.Scan(value) } // Value implements the driver Valuer interface. func (ns NullCalendarMaincalendar) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.CalendarMaincalendar), nil } type Author struct { ID int64 Address string Name string Bio string } type Calendar struct { ID uint64 Relation uint64 Calendarname []byte Title []byte Description []byte Timezone string Uniquekey string Idkey string Maincalendar CalendarMaincalendar Createdate time.Time Modifydate time.Time } type Event struct { ID uint64 Relation uint64 Calendarreference uint64 Uniquekey string Eventname []byte Description []byte Location string Timezone string Idkey sql.NullString } ================================================ FILE: internal/endtoend/testdata/coalesce_params/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const addAuthor = `-- name: AddAuthor :execlastid INSERT INTO authors ( address, name, bio ) VALUES ( ?, COALESCE(?, ""), COALESCE(?, "") ) ` type AddAuthorParams struct { Address string CalName interface{} CalDescription interface{} } func (q *Queries) AddAuthor(ctx context.Context, arg AddAuthorParams) (int64, error) { result, err := q.db.ExecContext(ctx, addAuthor, arg.Address, arg.CalName, arg.CalDescription) if err != nil { return 0, err } return result.LastInsertId() } const addEvent = `-- name: AddEvent :execlastid INSERT INTO ` + "`" + `Event` + "`" + ` ( Timezone ) VALUES ( (CASE WHEN ? = "calendar" THEN (SELECT cal.Timezone FROM Calendar cal WHERE cal.IdKey = ?) ELSE ? END) ) ` type AddEventParams struct { Timezone interface{} CalendarIdKey string } func (q *Queries) AddEvent(ctx context.Context, arg AddEventParams) (int64, error) { result, err := q.db.ExecContext(ctx, addEvent, arg.Timezone, arg.CalendarIdKey, arg.Timezone) if err != nil { return 0, err } return result.LastInsertId() } ================================================ FILE: internal/endtoend/testdata/coalesce_params/mysql/query.sql ================================================ -- name: AddEvent :execlastid INSERT INTO `Event` ( Timezone ) VALUES ( (CASE WHEN sqlc.arg("Timezone") = "calendar" THEN (SELECT cal.Timezone FROM Calendar cal WHERE cal.IdKey = sqlc.arg("calendarIdKey")) ELSE sqlc.arg("Timezone") END) ); -- name: AddAuthor :execlastid INSERT INTO authors ( address, name, bio ) VALUES ( ?, COALESCE(sqlc.narg("calName"), ""), COALESCE(sqlc.narg("calDescription"), "") ); ================================================ FILE: internal/endtoend/testdata/coalesce_params/mysql/schema.sql ================================================ CREATE TABLE `Calendar` ( `Id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `Relation` bigint(20) unsigned NOT NULL, `CalendarName` longblob NOT NULL, `Title` longblob NOT NULL, `Description` longblob NOT NULL, `Timezone` varchar(50) NOT NULL, `UniqueKey` varchar(50) NOT NULL, `IdKey` varchar(50) NOT NULL, `MainCalendar` enum('true','false') NOT NULL DEFAULT 'false', `CreateDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `ModifyDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`Id`), KEY `Relation` (`Relation`), KEY `UniqueKey` (`UniqueKey`), KEY `IdKey` (`IdKey`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE `Event` ( `Id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `Relation` bigint(20) unsigned NOT NULL, `CalendarReference` bigint(20) unsigned NOT NULL, `UniqueKey` varchar(50) NOT NULL, `EventName` longblob NOT NULL, `Description` longblob NOT NULL, `Location` varchar(500) NOT NULL, `Timezone` varchar(50) NOT NULL, `IdKey` varchar(48) DEFAULT NULL, PRIMARY KEY (`Id`), KEY `Relation` (`Relation`), KEY `CalendarReference` (`CalendarReference`), KEY `UniqueKey` (`UniqueKey`), KEY `IdKey` (`IdKey`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE authors ( id BIGINT AUTO_INCREMENT NOT NULL, address VARCHAR(200) NOT NULL, name VARCHAR(20) NOT NULL, bio LONGTEXT NOT NULL ); ================================================ FILE: internal/endtoend/testdata/coalesce_params/mysql/sqlc.yaml ================================================ version: "2" sql: - engine: "mysql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" ================================================ FILE: internal/endtoend/testdata/codegen_json/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/codegen_json/gen/codegen.json ================================================ { "settings": { "version": "2", "engine": "postgresql", "schema": [ "postgresql/schema.sql" ], "queries": [ "postgresql/query.sql" ], "codegen": { "out": "", "plugin": "", "options": "", "env": [], "process": null, "wasm": null } }, "catalog": { "comment": "", "default_schema": "public", "name": "", "schemas": [ { "comment": "", "name": "public", "tables": [ { "rel": { "catalog": "", "schema": "", "name": "authors" }, "columns": [ { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "name", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "bio", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" } ], "enums": [], "composite_types": [] }, { "comment": "", "name": "pg_temp", "tables": [], "enums": [], "composite_types": [] }, { "comment": "", "name": "pg_catalog", "tables": [ { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggfnoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggkind", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggnumdirectargs", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggtransfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggfinalfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggcombinefn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggserialfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggdeserialfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmtransfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggminvtransfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmfinalfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggfinalextra", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmfinalextra", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggfinalmodify", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmfinalmodify", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggsortop", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggtranstype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggtransspace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmtranstype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmtransspace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "agginitval", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggminitval", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amhandler", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amopfamily", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amoplefttype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amoprighttype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amopstrategy", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amoppurpose", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amopopr", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amopmethod", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amopsortfamily", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amprocfamily", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amproclefttype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amprocrighttype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amprocnum", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amproc", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "adrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "adnum", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "adbin", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "atttypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attstattarget", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attlen", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attnum", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attndims", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attcacheoff", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "atttypmod", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attbyval", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attalign", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attstorage", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attcompression", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attnotnull", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "atthasdef", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "atthasmissing", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attidentity", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attgenerated", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attisdropped", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attislocal", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attinhcount", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attcollation", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attfdwoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attmissingval", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "roleid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "member", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantor", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "admin_option", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolsuper", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolinherit", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcreaterole", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcreatedb", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcanlogin", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolreplication", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolbypassrls", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolconnlimit", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolpassword", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolvaliduntil", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "installed", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "superuser", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trusted", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relocatable", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "requires", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comment", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extensions" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extensions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extensions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "installed_version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extensions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comment", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extensions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ident", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parent", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "level", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_nblocks", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "free_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "free_chunks", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "used_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "castsource", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "casttarget", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "castfunc", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "castcontext", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "castmethod", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reltype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reloftype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relam", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relfilenode", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reltablespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relpages", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reltuples", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relallvisible", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reltoastrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relhasindex", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relisshared", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relpersistence", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relkind", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relnatts", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relchecks", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relhasrules", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relhastriggers", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relhassubclass", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relrowsecurity", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relforcerowsecurity", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relispopulated", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relreplident", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relispartition", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relrewrite", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relfrozenxid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relminmxid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reloptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relpartbound", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collprovider", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collisdeterministic", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collencoding", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collcollate", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collctype", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "colliculocale", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collversion", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_config" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setting", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "connamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "contype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "condeferrable", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "condeferred", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "convalidated", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "contypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conindid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conparentid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confupdtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confdeltype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confmatchtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conislocal", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "coninhcount", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "connoinherit", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conkey", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confkey", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conpfeqop", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conppeqop", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conffeqop", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confdelsetcols", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conexclop", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conbin", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "connamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conforencoding", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "contoencoding", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conproc", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "condefault", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statement", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_holdable", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_binary", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_scrollable", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "creation_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datdba", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "encoding", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datlocprovider", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datistemplate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datallowconn", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datconnlimit", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datfrozenxid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datminmxid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dattablespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datcollate", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datctype", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "daticulocale", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datcollversion", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setdatabase", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setrole", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "defaclrole", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "defaclnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "defaclobjtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "defaclacl", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "refclassid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "refobjid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "refobjsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "deptype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "description", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "enumtypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "enumsortorder", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "enumlabel", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evtname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evtevent", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evtowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evtfoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evtenabled", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evttags", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extrelocatable", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extversion", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extcondition", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "columns": [ { "name": "sourcefile", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sourceline", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqno", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setting", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "applied", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "error", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwhandler", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwvalidator", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvfdw", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvtype", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvversion", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ftrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ftserver", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ftoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_group" }, "columns": [ { "name": "groname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_group" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grosysid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_group" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grolist", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_group" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "columns": [ { "name": "line_number", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "database", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_name", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "address", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "netmask", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "auth_method", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "options", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "error", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "columns": [ { "name": "line_number", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "map_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sys_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pg_username", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "error", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indnatts", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indnkeyatts", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisunique", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indnullsnotdistinct", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisprimary", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisexclusion", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indimmediate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisclustered", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisvalid", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indcheckxmin", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisready", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indislive", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisreplident", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indkey", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indcollation", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oidvector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indclass", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oidvector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indoption", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexprs", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indpred", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablespace", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexdef", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inhrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inhparent", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inhseqno", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inhdetachpending", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "initprivs", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanispl", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanpltrusted", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanplcallfoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "laninline", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanvalidator", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "loid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pageno", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bytea" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lomowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lomacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "columns": [ { "name": "locktype", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "database", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relation", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "page", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tuple", "not_null": false, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "virtualxid", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "transactionid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": false, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "virtualtransaction", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "mode", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "granted", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fastpath", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "waitstart", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "matviewname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "matviewowner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablespace", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "hasindexes", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ispopulated", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "definition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "nspname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "nspowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "nspacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcmethod", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcfamily", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcintype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcdefault", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opckeytype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprkind", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprcanmerge", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprcanhash", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprleft", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprright", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprresult", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprcom", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprnegate", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprcode", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprrest", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprjoin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opfmethod", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opfname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opfnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opfowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parname", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "paracl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partstrat", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partnatts", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partdefid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partattrs", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partclass", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oidvector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partcollation", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oidvector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partexprs", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "policyname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "permissive", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "roles", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmd", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "qual", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "with_check", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polcmd", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polpermissive", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polroles", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polqual", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polwithcheck", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statement", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prepare_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parameter_types", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_regtype" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "from_sql", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "generic_plans", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "custom_plans", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "columns": [ { "name": "transaction", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "gid", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prepared", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "owner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "database", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pronamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prolang", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "procost", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prorows", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "provariadic", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prosupport", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prokind", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prosecdef", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proleakproof", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proisstrict", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proretset", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "provolatile", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proparallel", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pronargs", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pronargdefaults", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prorettype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proargtypes", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oidvector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proallargtypes", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proargmodes", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proargnames", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proargdefaults", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "protrftypes", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prosrc", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "probin", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prosqlbody", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "puballtables", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubinsert", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubupdate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubdelete", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubtruncate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubviaroot", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pnpubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pnnspid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prpubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prqual", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prattrs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "columns": [ { "name": "pubname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attnames", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rowfilter", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngtypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngsubtype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngmultitypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngcollation", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngsubopc", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngcanonical", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngsubdiff", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "roident", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "roname", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin_status" }, "columns": [ { "name": "local_id", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin_status" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "external_id", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin_status" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "remote_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin_status" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "local_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin_status" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "columns": [ { "name": "slot_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "plugin", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "slot_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datoid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "database", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "temporary", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "active", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "active_pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "catalog_xmin", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "restart_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confirmed_flush_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_status", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "safe_wal_size", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "two_phase", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rulename", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ev_class", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ev_type", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ev_enabled", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_instead", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ev_qual", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ev_action", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "columns": [ { "name": "rolname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolsuper", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolinherit", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcreaterole", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcreatedb", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcanlogin", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolreplication", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolconnlimit", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolpassword", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolvaliduntil", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolbypassrls", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rules" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rulename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "definition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "provider", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "label", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "columns": [ { "name": "objoid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objtype", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objnamespace", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objname", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "provider", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "label", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqtypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqstart", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqincrement", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqmax", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqmin", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqcache", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqcycle", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequencename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequenceowner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regtype" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "start_value", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "min_value", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "max_value", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "increment_by", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cycle", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cache_size", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_value", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setting", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "unit", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "category", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "short_desc", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extra_desc", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "context", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "vartype", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "source", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "min_val", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "max_val", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "enumvals", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "boot_val", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reset_val", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sourcefile", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sourceline", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pending_restart", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "columns": [ { "name": "usename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesysid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usecreatedb", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesuper", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "userepl", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usebypassrls", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "passwd", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "valuntil", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "useconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dbid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "refclassid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "refobjid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "deptype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "description", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shmem_allocations" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shmem_allocations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "off", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shmem_allocations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "size", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shmem_allocations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "allocated_size", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shmem_allocations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "provider", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "label", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "columns": [ { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "leader_pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesysid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "application_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_addr", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "inet" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_hostname", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_port", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_start", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xact_start", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "query_start", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "state_change", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wait_event_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wait_event", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "state", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_xid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_xmin", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "query_id", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "query", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_live_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_dead_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_mod_since_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_ins_since_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autovacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autoanalyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "vacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autovacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "analyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autoanalyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "columns": [ { "name": "archived_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_archived_wal", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_archived_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "failed_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_failed_wal", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_failed_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "columns": [ { "name": "checkpoints_timed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "checkpoints_req", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "checkpoint_write_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "checkpoint_sync_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "buffers_checkpoint", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "buffers_clean", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maxwritten_clean", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "buffers_backend", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "buffers_backend_fsync", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "buffers_alloc", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "columns": [ { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numbackends", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xact_commit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xact_rollback", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tup_returned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tup_fetched", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tup_inserted", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tup_updated", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tup_deleted", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conflicts", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "temp_files", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "temp_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "deadlocks", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "checksum_failures", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "checksum_last_failure", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blk_read_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blk_write_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "session_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "active_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idle_in_transaction_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sessions", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sessions_abandoned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sessions_fatal", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sessions_killed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "columns": [ { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confl_tablespace", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confl_lock", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confl_snapshot", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confl_bufferpin", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confl_deadlock", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_gssapi" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_gssapi" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "gss_authenticated", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_gssapi" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "principal", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_gssapi" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "encrypted", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_gssapi" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "phase", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sample_blks_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sample_blks_scanned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ext_stats_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ext_stats_computed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "child_tables_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "child_tables_done", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "current_child_table_relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "phase", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backup_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backup_streamed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablespaces_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablespaces_streamed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "command", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "phase", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cluster_index_relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_tuples_scanned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_tuples_written", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_scanned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "index_rebuild_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "command", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "bytes_processed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "bytes_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tuples_processed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tuples_excluded", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "index_relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "command", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "phase", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lockers_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lockers_done", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "current_locker_pid", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blocks_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blocks_done", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tuples_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tuples_done", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partitions_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partitions_done", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "phase", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_scanned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_vacuumed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "index_vacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "max_dead_tuples", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "num_dead_tuples", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "columns": [ { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prefetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "skip_init", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "skip_new", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "skip_fpw", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "skip_rep", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_distance", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "block_distance", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "io_depth", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesysid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "application_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_addr", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "inet" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_hostname", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_port", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_start", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_xmin", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "state", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sent_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "write_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "flush_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "replay_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "write_lag", "not_null": false, "is_array": false, "comment": "", "length": 16, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "interval" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "flush_lag", "not_null": false, "is_array": false, "comment": "", "length": 16, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "interval" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "replay_lag", "not_null": false, "is_array": false, "comment": "", "length": 16, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "interval" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sync_priority", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sync_state", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reply_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "columns": [ { "name": "slot_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spill_txns", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spill_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spill_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stream_txns", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stream_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stream_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_txns", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_zeroed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_written", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_exists", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "flushes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "truncates", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ssl", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cipher", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "bits", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_dn", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_serial", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "numeric" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "issuer_dn", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "columns": [ { "name": "subid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "received_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_msg_send_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_msg_receipt_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "latest_end_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "latest_end_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "columns": [ { "name": "subid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "apply_error_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sync_error_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_live_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_dead_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_mod_since_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_ins_since_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autovacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autoanalyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "vacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autovacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "analyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autoanalyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "columns": [ { "name": "funcid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "funcname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "calls", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "self_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_live_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_dead_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_mod_since_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_ins_since_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autovacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autoanalyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "vacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autovacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "analyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autoanalyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "columns": [ { "name": "wal_records", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_fpi", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_bytes", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "numeric" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_buffers_full", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_write", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_sync", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_write_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_sync_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "status", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "receive_start_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "receive_start_tli", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "written_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "flushed_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "received_tli", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_msg_send_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_msg_receipt_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "latest_end_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "latest_end_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "slot_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sender_host", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sender_port", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conninfo", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "columns": [ { "name": "funcid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "funcname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "calls", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "self_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "starelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staattnum", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stainherit", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanullfrac", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stawidth", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stadistinct", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stakind1", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stakind2", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stakind3", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stakind4", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stakind5", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staop1", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staop2", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staop3", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staop4", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staop5", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stacoll1", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stacoll2", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stacoll3", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stacoll4", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stacoll5", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanumbers1", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanumbers2", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanumbers3", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanumbers4", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanumbers5", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stavalues1", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stavalues2", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stavalues3", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stavalues4", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stavalues5", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxstattarget", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxkeys", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxkind", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxexprs", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxdinherit", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxdndistinct", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_ndistinct" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxddependencies", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_dependencies" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxdmcv", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_mcv_list" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxdexpr", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_pg_statistic" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inherited", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "null_frac", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "avg_width", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_distinct", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_vals", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "histogram_bounds", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "correlation", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_elems", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_elem_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "elem_count_histogram", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_owner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attnames", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "exprs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "kinds", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inherited", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_distinct", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_ndistinct" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dependencies", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_dependencies" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_vals", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_val_nulls", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_base_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_owner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "expr", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inherited", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "null_frac", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "avg_width", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_distinct", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_vals", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "histogram_bounds", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "correlation", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_elems", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_elem_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "elem_count_histogram", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subdbid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subskiplsn", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subenabled", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subbinary", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "substream", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subtwophasestate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subdisableonerr", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subconninfo", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subslotname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subsynccommit", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subpublications", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srsubstate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srsublsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tableowner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablespace", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "hasindexes", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "hasrules", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "hastriggers", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rowsecurity", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spcname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spcowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spcacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spcoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_abbrevs" }, "columns": [ { "name": "abbrev", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_abbrevs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "utc_offset", "not_null": false, "is_array": false, "comment": "", "length": 16, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_abbrevs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "interval" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_dst", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_abbrevs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_names" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_names" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "abbrev", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_names" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "utc_offset", "not_null": false, "is_array": false, "comment": "", "length": 16, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_names" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "interval" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_dst", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_names" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trftype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trflang", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trffromsql", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trftosql", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgparentid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgfoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgtype", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgenabled", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgisinternal", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgconstrrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgconstrindid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgconstraint", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgdeferrable", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tginitdeferred", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgnargs", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgattr", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgargs", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bytea" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgqual", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgoldtable", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgnewtable", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cfgname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cfgnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cfgowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cfgparser", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "mapcfg", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maptokentype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "mapseqno", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "mapdict", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dictname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dictnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dictowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dicttemplate", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dictinitoption", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prsname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prsnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prsstart", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prstoken", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prsend", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prsheadline", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prslextype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tmplname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tmplnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tmplinit", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tmpllexize", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typlen", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typbyval", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typcategory", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typispreferred", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typisdefined", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typdelim", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typsubscript", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typelem", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typarray", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typinput", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typoutput", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typreceive", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typsend", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typmodin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typmodout", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typanalyze", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typalign", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typstorage", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typnotnull", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typbasetype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typtypmod", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typndims", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typcollation", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typdefaultbin", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typdefault", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "columns": [ { "name": "usename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesysid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usecreatedb", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesuper", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "userepl", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usebypassrls", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "passwd", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "valuntil", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "useconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umuser", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umserver", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "columns": [ { "name": "umid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umuser", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_views" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "viewname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "viewowner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "definition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" } ], "enums": [], "composite_types": [] }, { "comment": "", "name": "information_schema", "tables": [ { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "columns": [ { "name": "oid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwowner", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_language", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "columns": [ { "name": "oid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_table_columns" }, "columns": [ { "name": "nspname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_table_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_table_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_table_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attfdwoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_table_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "columns": [ { "name": "foreign_table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ftoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "columns": [ { "name": "oid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umuser", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvowner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "administrable_role_authorizations" }, "columns": [ { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "administrable_role_authorizations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "role_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "administrable_role_authorizations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "administrable_role_authorizations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "applicable_roles" }, "columns": [ { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "applicable_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "role_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "applicable_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "applicable_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "columns": [ { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attribute_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordinal_position", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attribute_default", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_nullable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attribute_udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attribute_udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attribute_udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_derived_reference_attribute", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "columns": [ { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_repertoire", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "form_of_use", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_collate_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_collate_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_collate_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraints" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "check_clause", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "columns": [ { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collations" }, "columns": [ { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pad_attribute", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dependent_column", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "columns": [ { "name": "domain_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "columns": [ { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordinal_position", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_default", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_nullable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_self_referencing", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_identity", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_generation", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_start", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_increment", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_maximum", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_minimum", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_cycle", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_generated", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "generation_expression", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_updatable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "columns": [ { "name": "object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_deferrable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "initially_deferred", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "columns": [ { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "columns": [ { "name": "domain_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_default", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "columns": [ { "name": "object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collection_type_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_default", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "enabled_roles" }, "columns": [ { "name": "role_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "enabled_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrapper_options" }, "columns": [ { "name": "foreign_data_wrapper_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrapper_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrapper_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrapper_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrapper_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "columns": [ { "name": "foreign_data_wrapper_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "library_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_language", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_server_options" }, "columns": [ { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_server_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_server_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_server_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_server_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "columns": [ { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "columns": [ { "name": "foreign_table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "columns": [ { "name": "foreign_table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "information_schema_catalog_name" }, "columns": [ { "name": "catalog_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "information_schema_catalog_name" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordinal_position", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "position_in_unique_constraint", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordinal_position", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parameter_mode", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_result", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "as_locator", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parameter_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parameter_default", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "unique_constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "unique_constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "unique_constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "match_option", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "update_rule", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "delete_rule", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "with_hierarchy", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequence_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequence_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequence_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "module_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "module_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "module_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "type_udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "type_udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "type_udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_body", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_definition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "external_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "external_language", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parameter_style", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_deterministic", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sql_data_access", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_null_call", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sql_path", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schema_level_routine", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "max_dynamic_result_sets", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_user_defined_cast", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_implicitly_invocable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "security_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "to_sql_specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "to_sql_specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "to_sql_specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "as_locator", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "created", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "time_stamp" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_altered", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "time_stamp" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "new_savepoint_level", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_udt_dependent", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_from_data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_as_locator", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_char_max_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_char_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_char_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_char_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_char_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_type_udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_type_udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_type_udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "columns": [ { "name": "catalog_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schema_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schema_owner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sql_path", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "columns": [ { "name": "sequence_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequence_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequence_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "start_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "minimum_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "increment", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cycle_option", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "feature_id", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "feature_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sub_feature_id", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sub_feature_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_supported", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_verified_by", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comments", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "implementation_info_id", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "implementation_info_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "integer_value", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comments", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "feature_id", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "feature_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_supported", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_verified_by", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comments", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sizing_id", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sizing_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "supported_value", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comments", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_deferrable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "initially_deferred", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "enforced", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "nulls_distinct", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "with_hierarchy", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "self_referencing_column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reference_generation", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_insertable_into", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_typed", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "commit_action", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "columns": [ { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "group_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "transform_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "columns": [ { "name": "trigger_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trigger_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trigger_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_table", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_column", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "columns": [ { "name": "trigger_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trigger_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trigger_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_manipulation", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_table", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_order", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_condition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_statement", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_orientation", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_timing", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_reference_old_table", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_reference_new_table", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_reference_old_row", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_reference_new_row", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "created", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "time_stamp" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "columns": [ { "name": "user_defined_type_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_category", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_instantiable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_final", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordering_form", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordering_category", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordering_routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordering_routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordering_routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reference_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "source_dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ref_dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "columns": [ { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mappings" }, "columns": [ { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "columns": [ { "name": "view_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "view_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "view_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "columns": [ { "name": "view_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "view_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "view_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "view_definition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "check_option", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_updatable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_insertable_into", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_trigger_updatable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_trigger_deletable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_trigger_insertable_into", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" } ], "enums": [], "composite_types": [] } ] }, "queries": [ { "text": "SELECT id, name, bio FROM authors\nWHERE id = $1 LIMIT 1", "name": "GetAuthor", "cmd": ":one", "columns": [ { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "id", "unsigned": false, "array_dims": 0 }, { "name": "name", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "name", "unsigned": false, "array_dims": 0 }, { "name": "bio", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "bio", "unsigned": false, "array_dims": 0 } ], "params": [ { "number": 1, "column": { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "id", "unsigned": false, "array_dims": 0 } } ], "comments": [], "filename": "query.sql", "insert_into_table": null }, { "text": "SELECT id, name, bio FROM authors\nORDER BY name", "name": "ListAuthors", "cmd": ":many", "columns": [ { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "id", "unsigned": false, "array_dims": 0 }, { "name": "name", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "name", "unsigned": false, "array_dims": 0 }, { "name": "bio", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "bio", "unsigned": false, "array_dims": 0 } ], "params": [], "comments": [], "filename": "query.sql", "insert_into_table": null }, { "text": "INSERT INTO authors (\n name, bio\n) VALUES (\n $1, $2\n)\nRETURNING id, name, bio", "name": "CreateAuthor", "cmd": ":one", "columns": [ { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "id", "unsigned": false, "array_dims": 0 }, { "name": "name", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "name", "unsigned": false, "array_dims": 0 }, { "name": "bio", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "bio", "unsigned": false, "array_dims": 0 } ], "params": [ { "number": 1, "column": { "name": "name", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "public", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "name", "unsigned": false, "array_dims": 0 } }, { "number": 2, "column": { "name": "bio", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "public", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "bio", "unsigned": false, "array_dims": 0 } } ], "comments": [], "filename": "query.sql", "insert_into_table": { "catalog": "", "schema": "", "name": "authors" } }, { "text": "DELETE FROM authors\nWHERE id = $1", "name": "DeleteAuthor", "cmd": ":exec", "columns": [], "params": [ { "number": 1, "column": { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "id", "unsigned": false, "array_dims": 0 } } ], "comments": [], "filename": "query.sql", "insert_into_table": null } ], "sqlc_version": "v1.30.0", "plugin_options": "eyJvdXQiOiJnZW4iLCJpbmRlbnQiOiIgICIsImZpbGVuYW1lIjoiY29kZWdlbi5qc29uIn0=", "global_options": "" } ================================================ FILE: internal/endtoend/testdata/codegen_json/postgresql/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/codegen_json/postgresql/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/codegen_json/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "postgresql/schema.sql", "queries": "postgresql/query.sql", "engine": "postgresql", "gen": { "json": { "out": "gen", "indent": " ", "filename": "codegen.json" } } } ] } ================================================ FILE: internal/endtoend/testdata/codegen_struct_field_names/stdlib/README.md ================================================ This tests that Go struct field names are proper Go identifiers. ================================================ FILE: internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 NobodyWouldBelieveThis sql.NullInt32 ParentID sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/codegen_struct_field_names/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const test = `-- name: test :one SELECT id, "!!!nobody,_,-would-believe---this-...?!", "parent id" from bar limit 1 ` func (q *Queries) test(ctx context.Context) (Bar, error) { row := q.db.QueryRowContext(ctx, test) var i Bar err := row.Scan(&i.ID, &i.NobodyWouldBelieveThis, &i.ParentID) return i, err } ================================================ FILE: internal/endtoend/testdata/codegen_struct_field_names/stdlib/query.sql ================================================ -- name: test :one SELECT * from bar limit 1; ================================================ FILE: internal/endtoend/testdata/codegen_struct_field_names/stdlib/schema.sql ================================================ CREATE TABLE bar ( id INT NOT NULL, "!!!nobody,_,-would-believe---this-...?!" INT, "parent id" INT); ================================================ FILE: internal/endtoend/testdata/codegen_struct_field_names/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/column_alias/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1739 ================================================ FILE: internal/endtoend/testdata/column_alias/stdlib/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/column_alias/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/column_alias/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "time" ) type User struct { ID int32 Fname string Lname string Email string EncPasswd string CreatedAt time.Time } ================================================ FILE: internal/endtoend/testdata/column_alias/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "time" ) const getUsers = `-- name: GetUsers :many SELECT users.id, users.fname, users.lname, users.email, users.created_at, rank_email, rank_fname, rank_lname, similarity FROM users, to_tsvector(users.email || users.fname || users.lname) document, to_tsquery($1::TEXT) query, NULLIF(ts_rank(to_tsvector(users.email), query), 0) rank_email, NULLIF(ts_rank(to_tsvector(users.fname), query), 0) rank_fname, NULLIF(ts_rank(to_tsvector(users.lname), query), 0) rank_lname, SIMILARITY($1::TEXT, users.email || users.fname || users.lname) similarity WHERE query @@ document OR similarity > 0 ORDER BY rank_email, rank_lname, rank_fname, similarity DESC NULLS LAST ` type GetUsersRow struct { ID int32 Fname string Lname string Email string CreatedAt time.Time RankEmail sql.NullFloat64 RankFname sql.NullFloat64 RankLname sql.NullFloat64 Similarity sql.NullFloat64 } func (q *Queries) GetUsers(ctx context.Context, searchTerm string) ([]GetUsersRow, error) { rows, err := q.db.QueryContext(ctx, getUsers, searchTerm) if err != nil { return nil, err } defer rows.Close() var items []GetUsersRow for rows.Next() { var i GetUsersRow if err := rows.Scan( &i.ID, &i.Fname, &i.Lname, &i.Email, &i.CreatedAt, &i.RankEmail, &i.RankFname, &i.RankLname, &i.Similarity, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/column_alias/stdlib/query.sql ================================================ -- name: GetUsers :many SELECT users.id, users.fname, users.lname, users.email, users.created_at, rank_email, rank_fname, rank_lname, similarity FROM users, to_tsvector(users.email || users.fname || users.lname) document, to_tsquery(@search_term::TEXT) query, NULLIF(ts_rank(to_tsvector(users.email), query), 0) rank_email, NULLIF(ts_rank(to_tsvector(users.fname), query), 0) rank_fname, NULLIF(ts_rank(to_tsvector(users.lname), query), 0) rank_lname, SIMILARITY(@search_term::TEXT, users.email || users.fname || users.lname) similarity WHERE query @@ document OR similarity > 0 ORDER BY rank_email, rank_lname, rank_fname, similarity DESC NULLS LAST; ================================================ FILE: internal/endtoend/testdata/column_alias/stdlib/schema.sql ================================================ CREATE EXTENSION pg_trgm; CREATE EXTENSION pgcrypto; CREATE TABLE users( id INT GENERATED ALWAYS AS IDENTITY NOT NULL, fname VARCHAR(100) NOT NULL, lname VARCHAR(100) NOT NULL, email VARCHAR(100) NOT NULL UNIQUE, enc_passwd TEXT NOT NULL, created_at TIMESTAMP WITH TIME ZONE NOT NULL default (NOW() AT TIME ZONE 'utc'), PRIMARY KEY(id) ); ================================================ FILE: internal/endtoend/testdata/column_alias/stdlib/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "database/sql" ================================================ FILE: internal/endtoend/testdata/column_as/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/column_as/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/column_as/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const withAs = `-- name: WithAs :one SELECT 1 AS x, 2 AS y ` type WithAsRow struct { X int32 Y int32 } func (q *Queries) WithAs(ctx context.Context) (WithAsRow, error) { row := q.db.QueryRowContext(ctx, withAs) var i WithAsRow err := row.Scan(&i.X, &i.Y) return i, err } const withoutAs = `-- name: WithoutAs :one SELECT 1 x, 2 y ` type WithoutAsRow struct { X int32 Y int32 } func (q *Queries) WithoutAs(ctx context.Context) (WithoutAsRow, error) { row := q.db.QueryRowContext(ctx, withoutAs) var i WithoutAsRow err := row.Scan(&i.X, &i.Y) return i, err } ================================================ FILE: internal/endtoend/testdata/column_as/mysql/query.sql ================================================ -- name: WithAs :one SELECT 1 AS x, 2 AS y; -- name: WithoutAs :one SELECT 1 x, 2 y; ================================================ FILE: internal/endtoend/testdata/column_as/mysql/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/column_as/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const withAs = `-- name: WithAs :one SELECT 1 AS x, 2 AS y ` type WithAsRow struct { X int32 Y int32 } func (q *Queries) WithAs(ctx context.Context) (WithAsRow, error) { row := q.db.QueryRow(ctx, withAs) var i WithAsRow err := row.Scan(&i.X, &i.Y) return i, err } const withoutAs = `-- name: WithoutAs :one SELECT 1 x, 2 y ` type WithoutAsRow struct { X int32 Y int32 } func (q *Queries) WithoutAs(ctx context.Context) (WithoutAsRow, error) { row := q.db.QueryRow(ctx, withoutAs) var i WithoutAsRow err := row.Scan(&i.X, &i.Y) return i, err } ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/pgx/v4/query.sql ================================================ -- name: WithAs :one SELECT 1 AS x, 2 AS y; -- name: WithoutAs :one SELECT 1 x, 2 y; ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/pgx/v4/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "sql_package": "pgx/v4", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const withAs = `-- name: WithAs :one SELECT 1 AS x, 2 AS y ` type WithAsRow struct { X int32 Y int32 } func (q *Queries) WithAs(ctx context.Context) (WithAsRow, error) { row := q.db.QueryRow(ctx, withAs) var i WithAsRow err := row.Scan(&i.X, &i.Y) return i, err } const withoutAs = `-- name: WithoutAs :one SELECT 1 x, 2 y ` type WithoutAsRow struct { X int32 Y int32 } func (q *Queries) WithoutAs(ctx context.Context) (WithoutAsRow, error) { row := q.db.QueryRow(ctx, withoutAs) var i WithoutAsRow err := row.Scan(&i.X, &i.Y) return i, err } ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/pgx/v5/query.sql ================================================ -- name: WithAs :one SELECT 1 AS x, 2 AS y; -- name: WithoutAs :one SELECT 1 x, 2 y; ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/pgx/v5/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "sql_package": "pgx/v5", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const withAs = `-- name: WithAs :one SELECT 1 AS x, 2 AS y ` type WithAsRow struct { X int32 Y int32 } func (q *Queries) WithAs(ctx context.Context) (WithAsRow, error) { row := q.db.QueryRowContext(ctx, withAs) var i WithAsRow err := row.Scan(&i.X, &i.Y) return i, err } const withoutAs = `-- name: WithoutAs :one SELECT 1 x, 2 y ` type WithoutAsRow struct { X int32 Y int32 } func (q *Queries) WithoutAs(ctx context.Context) (WithoutAsRow, error) { row := q.db.QueryRowContext(ctx, withoutAs) var i WithoutAsRow err := row.Scan(&i.X, &i.Y) return i, err } ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/stdlib/query.sql ================================================ -- name: WithAs :one SELECT 1 AS x, 2 AS y; -- name: WithoutAs :one SELECT 1 x, 2 y; ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/stdlib/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/column_as/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/column_as/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/column_as/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/column_as/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const withAs = `-- name: WithAs :one SELECT 1 AS x, 2 AS y ` type WithAsRow struct { X int64 Y int64 } func (q *Queries) WithAs(ctx context.Context) (WithAsRow, error) { row := q.db.QueryRowContext(ctx, withAs) var i WithAsRow err := row.Scan(&i.X, &i.Y) return i, err } const withoutAs = `-- name: WithoutAs :one SELECT 1 x, 2 y ` type WithoutAsRow struct { X int64 Y int64 } func (q *Queries) WithoutAs(ctx context.Context) (WithoutAsRow, error) { row := q.db.QueryRowContext(ctx, withoutAs) var i WithoutAsRow err := row.Scan(&i.X, &i.Y) return i, err } ================================================ FILE: internal/endtoend/testdata/column_as/sqlite/query.sql ================================================ -- name: WithAs :one SELECT 1 AS x, 2 AS y; -- name: WithoutAs :one SELECT 1 x, 2 y; ================================================ FILE: internal/endtoend/testdata/column_as/sqlite/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/column_as/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString } ================================================ FILE: internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "github.com/jackc/pgconn" ) const execFoo = `-- name: ExecFoo :exec INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :exec func (q *Queries) ExecFoo(ctx context.Context) error { _, err := q.db.Exec(ctx, execFoo) return err } const execResultFoo = `-- name: ExecResultFoo :execresult INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execresult func (q *Queries) ExecResultFoo(ctx context.Context) (pgconn.CommandTag, error) { return q.db.Exec(ctx, execResultFoo) } const execRowFoo = `-- name: ExecRowFoo :execrows INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execrows func (q *Queries) ExecRowFoo(ctx context.Context) (int64, error) { result, err := q.db.Exec(ctx, execRowFoo) if err != nil { return 0, err } return result.RowsAffected(), nil } const manyFoo = `-- name: ManyFoo :many SELECT bar FROM foo ` // This function returns a list of Foos func (q *Queries) ManyFoo(ctx context.Context) ([]sql.NullString, error) { rows, err := q.db.Query(ctx, manyFoo) 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.Err(); err != nil { return nil, err } return items, nil } const oneFoo = `-- name: OneFoo :one SELECT bar FROM foo ` // This function returns one Foo func (q *Queries) OneFoo(ctx context.Context) (sql.NullString, error) { row := q.db.QueryRow(ctx, oneFoo) var bar sql.NullString err := row.Scan(&bar) return bar, err } ================================================ FILE: internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/query.sql ================================================ -- name: ManyFoo :many -- This function returns a list of Foos SELECT * FROM foo; -- name: OneFoo :one -- This function returns one Foo SELECT * FROM foo; -- name: ExecFoo :exec -- This function creates a Foo via :exec INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecRowFoo :execrows -- This function creates a Foo via :execrows INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecResultFoo :execresult -- This function creates a Foo via :execresult INSERT INTO foo (bar) VALUES ('bar'); ================================================ FILE: internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo ( bar text ); ================================================ FILE: internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "sql_package": "pgx/v4" } ] } ================================================ FILE: internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar pgtype.Text } ================================================ FILE: internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/jackc/pgx/v5/pgconn" "github.com/jackc/pgx/v5/pgtype" ) const execFoo = `-- name: ExecFoo :exec INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :exec func (q *Queries) ExecFoo(ctx context.Context) error { _, err := q.db.Exec(ctx, execFoo) return err } const execResultFoo = `-- name: ExecResultFoo :execresult INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execresult func (q *Queries) ExecResultFoo(ctx context.Context) (pgconn.CommandTag, error) { return q.db.Exec(ctx, execResultFoo) } const execRowFoo = `-- name: ExecRowFoo :execrows INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execrows func (q *Queries) ExecRowFoo(ctx context.Context) (int64, error) { result, err := q.db.Exec(ctx, execRowFoo) if err != nil { return 0, err } return result.RowsAffected(), nil } const manyFoo = `-- name: ManyFoo :many SELECT bar FROM foo ` // This function returns a list of Foos func (q *Queries) ManyFoo(ctx context.Context) ([]pgtype.Text, error) { rows, err := q.db.Query(ctx, manyFoo) if err != nil { return nil, err } defer rows.Close() var items []pgtype.Text for rows.Next() { var bar pgtype.Text if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const oneFoo = `-- name: OneFoo :one SELECT bar FROM foo ` // This function returns one Foo func (q *Queries) OneFoo(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, oneFoo) var bar pgtype.Text err := row.Scan(&bar) return bar, err } ================================================ FILE: internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/query.sql ================================================ -- name: ManyFoo :many -- This function returns a list of Foos SELECT * FROM foo; -- name: OneFoo :one -- This function returns one Foo SELECT * FROM foo; -- name: ExecFoo :exec -- This function creates a Foo via :exec INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecRowFoo :execrows -- This function creates a Foo via :execrows INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecResultFoo :execresult -- This function creates a Foo via :execresult INSERT INTO foo (bar) VALUES ('bar'); ================================================ FILE: internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo ( bar text ); ================================================ FILE: internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "sql_package": "pgx/v5" } ] } ================================================ FILE: internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/db.go ================================================ // 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() *Queries { return &Queries{} } type Queries struct { } ================================================ FILE: internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString } ================================================ FILE: internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "github.com/jackc/pgconn" ) const execFoo = `-- name: ExecFoo :exec INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :exec func (q *Queries) ExecFoo(ctx context.Context, db DBTX) error { _, err := db.Exec(ctx, execFoo) return err } const execResultFoo = `-- name: ExecResultFoo :execresult INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execresult func (q *Queries) ExecResultFoo(ctx context.Context, db DBTX) (pgconn.CommandTag, error) { return db.Exec(ctx, execResultFoo) } const execRowFoo = `-- name: ExecRowFoo :execrows INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execrows func (q *Queries) ExecRowFoo(ctx context.Context, db DBTX) (int64, error) { result, err := db.Exec(ctx, execRowFoo) if err != nil { return 0, err } return result.RowsAffected(), nil } const manyFoo = `-- name: ManyFoo :many SELECT bar FROM foo ` // This function returns a list of Foos func (q *Queries) ManyFoo(ctx context.Context, db DBTX) ([]sql.NullString, error) { rows, err := db.Query(ctx, manyFoo) 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.Err(); err != nil { return nil, err } return items, nil } const oneFoo = `-- name: OneFoo :one SELECT bar FROM foo ` // This function returns one Foo func (q *Queries) OneFoo(ctx context.Context, db DBTX) (sql.NullString, error) { row := db.QueryRow(ctx, oneFoo) var bar sql.NullString err := row.Scan(&bar) return bar, err } ================================================ FILE: internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/query.sql ================================================ -- name: ManyFoo :many -- This function returns a list of Foos SELECT * FROM foo; -- name: OneFoo :one -- This function returns one Foo SELECT * FROM foo; -- name: ExecFoo :exec -- This function creates a Foo via :exec INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecRowFoo :execrows -- This function creates a Foo via :execrows INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecResultFoo :execresult -- This function creates a Foo via :execresult INSERT INTO foo (bar) VALUES ('bar'); ================================================ FILE: internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo ( bar text ); ================================================ FILE: internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "sql_package": "pgx/v4", "emit_methods_with_db_argument": true } ] } ================================================ FILE: internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/db.go ================================================ // 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() *Queries { return &Queries{} } type Queries struct { } ================================================ FILE: internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar pgtype.Text } ================================================ FILE: internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/jackc/pgx/v5/pgconn" "github.com/jackc/pgx/v5/pgtype" ) const execFoo = `-- name: ExecFoo :exec INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :exec func (q *Queries) ExecFoo(ctx context.Context, db DBTX) error { _, err := db.Exec(ctx, execFoo) return err } const execResultFoo = `-- name: ExecResultFoo :execresult INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execresult func (q *Queries) ExecResultFoo(ctx context.Context, db DBTX) (pgconn.CommandTag, error) { return db.Exec(ctx, execResultFoo) } const execRowFoo = `-- name: ExecRowFoo :execrows INSERT INTO foo (bar) VALUES ('bar') ` // This function creates a Foo via :execrows func (q *Queries) ExecRowFoo(ctx context.Context, db DBTX) (int64, error) { result, err := db.Exec(ctx, execRowFoo) if err != nil { return 0, err } return result.RowsAffected(), nil } const manyFoo = `-- name: ManyFoo :many SELECT bar FROM foo ` // This function returns a list of Foos func (q *Queries) ManyFoo(ctx context.Context, db DBTX) ([]pgtype.Text, error) { rows, err := db.Query(ctx, manyFoo) if err != nil { return nil, err } defer rows.Close() var items []pgtype.Text for rows.Next() { var bar pgtype.Text if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const oneFoo = `-- name: OneFoo :one SELECT bar FROM foo ` // This function returns one Foo func (q *Queries) OneFoo(ctx context.Context, db DBTX) (pgtype.Text, error) { row := db.QueryRow(ctx, oneFoo) var bar pgtype.Text err := row.Scan(&bar) return bar, err } ================================================ FILE: internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/query.sql ================================================ -- name: ManyFoo :many -- This function returns a list of Foos SELECT * FROM foo; -- name: OneFoo :one -- This function returns one Foo SELECT * FROM foo; -- name: ExecFoo :exec -- This function creates a Foo via :exec INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecRowFoo :execrows -- This function creates a Foo via :execrows INSERT INTO foo (bar) VALUES ('bar'); -- name: ExecResultFoo :execresult -- This function creates a Foo via :execresult INSERT INTO foo (bar) VALUES ('bar'); ================================================ FILE: internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo ( bar text ); ================================================ FILE: internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "sql_package": "pgx/v5", "emit_methods_with_db_argument": true } ] } ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) // this is the mood type type FooMood string const ( FooMoodSad FooMood = "sad" FooMoodOk FooMood = "ok" FooMoodHappy FooMood = "happy" ) func (e *FooMood) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = FooMood(s) case string: *e = FooMood(s) default: return fmt.Errorf("unsupported scan type for FooMood: %T", src) } return nil } type NullFooMood struct { FooMood FooMood Valid bool // Valid is true if FooMood is not NULL } // Scan implements the Scanner interface. func (ns *NullFooMood) Scan(value interface{}) error { if value == nil { ns.FooMood, ns.Valid = "", false return nil } ns.Valid = true return ns.FooMood.Scan(value) } // Value implements the driver Valuer interface. func (ns NullFooMood) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.FooMood), nil } // this is the bar table type FooBar struct { // this is the baz column Baz string } // this is the bat view type FooBat struct { Baz string } ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/pgx/v4/go/query.sql.go ================================================ // 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 baz FROM foo.bar ` func (q *Queries) ListBar(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var baz string if err := rows.Scan(&baz); err != nil { return nil, err } items = append(items, baz) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listBat = `-- name: ListBat :many SELECT baz FROM foo.bat ` func (q *Queries) ListBat(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, listBat) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var baz string if err := rows.Scan(&baz); err != nil { return nil, err } items = append(items, baz) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/pgx/v4/query.sql ================================================ -- name: ListBar :many SELECT * FROM foo.bar; -- name: ListBat :many SELECT * FROM foo.bat; ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/pgx/v4/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar ( baz text NOT NULL ); CREATE VIEW foo.bat AS SELECT * FROM foo.bar; CREATE TYPE foo.mood AS ENUM ('sad', 'ok', 'happy'); COMMENT ON SCHEMA foo IS 'this is the foo schema'; COMMENT ON TYPE foo.mood IS 'this is the mood type'; COMMENT ON TABLE foo.bar IS 'this is the bar table'; COMMENT ON COLUMN foo.bar.baz IS 'this is the baz column'; COMMENT ON VIEW foo.bat IS 'this is the bat view '; ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) // this is the mood type type FooMood string const ( FooMoodSad FooMood = "sad" FooMoodOk FooMood = "ok" FooMoodHappy FooMood = "happy" ) func (e *FooMood) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = FooMood(s) case string: *e = FooMood(s) default: return fmt.Errorf("unsupported scan type for FooMood: %T", src) } return nil } type NullFooMood struct { FooMood FooMood Valid bool // Valid is true if FooMood is not NULL } // Scan implements the Scanner interface. func (ns *NullFooMood) Scan(value interface{}) error { if value == nil { ns.FooMood, ns.Valid = "", false return nil } ns.Valid = true return ns.FooMood.Scan(value) } // Value implements the driver Valuer interface. func (ns NullFooMood) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.FooMood), nil } // this is the bar table type FooBar struct { // this is the baz column Baz string } // this is the bat view type FooBat struct { Baz string } ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 baz FROM foo.bar ` func (q *Queries) ListBar(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var baz string if err := rows.Scan(&baz); err != nil { return nil, err } items = append(items, baz) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listBat = `-- name: ListBat :many SELECT baz FROM foo.bat ` func (q *Queries) ListBat(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, listBat) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var baz string if err := rows.Scan(&baz); err != nil { return nil, err } items = append(items, baz) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/pgx/v5/query.sql ================================================ -- name: ListBar :many SELECT * FROM foo.bar; -- name: ListBat :many SELECT * FROM foo.bat; ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/pgx/v5/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar ( baz text NOT NULL ); CREATE VIEW foo.bat AS SELECT * FROM foo.bar; CREATE TYPE foo.mood AS ENUM ('sad', 'ok', 'happy'); COMMENT ON SCHEMA foo IS 'this is the foo schema'; COMMENT ON TYPE foo.mood IS 'this is the mood type'; COMMENT ON TABLE foo.bar IS 'this is the bar table'; COMMENT ON COLUMN foo.bar.baz IS 'this is the baz column'; COMMENT ON VIEW foo.bat IS 'this is the bat view '; ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) // this is the mood type type FooMood string const ( FooMoodSad FooMood = "sad" FooMoodOk FooMood = "ok" FooMoodHappy FooMood = "happy" ) func (e *FooMood) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = FooMood(s) case string: *e = FooMood(s) default: return fmt.Errorf("unsupported scan type for FooMood: %T", src) } return nil } type NullFooMood struct { FooMood FooMood Valid bool // Valid is true if FooMood is not NULL } // Scan implements the Scanner interface. func (ns *NullFooMood) Scan(value interface{}) error { if value == nil { ns.FooMood, ns.Valid = "", false return nil } ns.Valid = true return ns.FooMood.Scan(value) } // Value implements the driver Valuer interface. func (ns NullFooMood) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.FooMood), nil } // this is the bar table type FooBar struct { // this is the baz column Baz string } // this is the bat view type FooBat struct { Baz string } ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/stdlib/go/query.sql.go ================================================ // 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 baz FROM foo.bar ` func (q *Queries) ListBar(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var baz string if err := rows.Scan(&baz); err != nil { return nil, err } items = append(items, baz) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listBat = `-- name: ListBat :many SELECT baz FROM foo.bat ` func (q *Queries) ListBat(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listBat) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var baz string if err := rows.Scan(&baz); err != nil { return nil, err } items = append(items, baz) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/stdlib/query.sql ================================================ -- name: ListBar :many SELECT * FROM foo.bar; -- name: ListBat :many SELECT * FROM foo.bat; ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/stdlib/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar ( baz text NOT NULL ); CREATE VIEW foo.bat AS SELECT * FROM foo.bar; CREATE TYPE foo.mood AS ENUM ('sad', 'ok', 'happy'); COMMENT ON SCHEMA foo IS 'this is the foo schema'; COMMENT ON TYPE foo.mood IS 'this is the mood type'; COMMENT ON TABLE foo.bar IS 'this is the bar table'; COMMENT ON COLUMN foo.bar.baz IS 'this is the baz column'; COMMENT ON VIEW foo.bat IS 'this is the bat view '; ================================================ FILE: internal/endtoend/testdata/comment_on/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/comment_syntax/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/comment_syntax/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString } ================================================ FILE: internal/endtoend/testdata/comment_syntax/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const doubleDash = `-- name: DoubleDash :one SELECT bar FROM foo LIMIT 1 ` func (q *Queries) DoubleDash(ctx context.Context) (sql.NullString, error) { row := q.db.QueryRowContext(ctx, doubleDash) var bar sql.NullString err := row.Scan(&bar) return bar, err } const hash = `-- name: Hash :one SELECT bar FROM foo LIMIT 1 ` func (q *Queries) Hash(ctx context.Context) (sql.NullString, error) { row := q.db.QueryRowContext(ctx, hash) var bar sql.NullString err := row.Scan(&bar) return bar, err } const slashStar = `-- name: SlashStar :one SELECT bar FROM foo LIMIT 1 ` func (q *Queries) SlashStar(ctx context.Context) (sql.NullString, error) { row := q.db.QueryRowContext(ctx, slashStar) var bar sql.NullString err := row.Scan(&bar) return bar, err } ================================================ FILE: internal/endtoend/testdata/comment_syntax/mysql/query.sql ================================================ -- name: DoubleDash :one SELECT * FROM foo LIMIT 1; /* name: SlashStar :one */ SELECT * FROM foo LIMIT 1; # name: Hash :one SELECT * FROM foo LIMIT 1; ================================================ FILE: internal/endtoend/testdata/comment_syntax/mysql/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/comment_syntax/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString } ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const doubleDash = `-- name: DoubleDash :one SELECT bar FROM foo LIMIT 1 ` func (q *Queries) DoubleDash(ctx context.Context) (sql.NullString, error) { row := q.db.QueryRow(ctx, doubleDash) var bar sql.NullString err := row.Scan(&bar) return bar, err } const slashStar = `-- name: SlashStar :one SELECT bar FROM foo LIMIT 1 ` func (q *Queries) SlashStar(ctx context.Context) (sql.NullString, error) { row := q.db.QueryRow(ctx, slashStar) var bar sql.NullString err := row.Scan(&bar) return bar, err } ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/query.sql ================================================ -- name: DoubleDash :one SELECT * FROM foo LIMIT 1; /* name: SlashStar :one */ SELECT * FROM foo LIMIT 1; ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "postgresql", "sql_package": "pgx/v4", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar pgtype.Text } ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 doubleDash = `-- name: DoubleDash :one SELECT bar FROM foo LIMIT 1 ` func (q *Queries) DoubleDash(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, doubleDash) var bar pgtype.Text err := row.Scan(&bar) return bar, err } const slashStar = `-- name: SlashStar :one SELECT bar FROM foo LIMIT 1 ` func (q *Queries) SlashStar(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, slashStar) var bar pgtype.Text err := row.Scan(&bar) return bar, err } ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/query.sql ================================================ -- name: DoubleDash :one SELECT * FROM foo LIMIT 1; /* name: SlashStar :one */ SELECT * FROM foo LIMIT 1; ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "postgresql", "sql_package": "pgx/v5", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString } ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const doubleDash = `-- name: DoubleDash :one SELECT bar FROM foo LIMIT 1 ` func (q *Queries) DoubleDash(ctx context.Context) (sql.NullString, error) { row := q.db.QueryRowContext(ctx, doubleDash) var bar sql.NullString err := row.Scan(&bar) return bar, err } const slashStar = `-- name: SlashStar :one SELECT bar FROM foo LIMIT 1 ` func (q *Queries) SlashStar(ctx context.Context) (sql.NullString, error) { row := q.db.QueryRowContext(ctx, slashStar) var bar sql.NullString err := row.Scan(&bar) return bar, err } ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/stdlib/query.sql ================================================ -- name: DoubleDash :one SELECT * FROM foo LIMIT 1; /* name: SlashStar :one */ SELECT * FROM foo LIMIT 1; ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/comment_syntax/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/comment_syntax/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/comment_syntax/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString } ================================================ FILE: internal/endtoend/testdata/comment_syntax/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const doubleDash = `-- name: DoubleDash :one SELECT bar FROM foo LIMIT 1 ` func (q *Queries) DoubleDash(ctx context.Context) (sql.NullString, error) { row := q.db.QueryRowContext(ctx, doubleDash) var bar sql.NullString err := row.Scan(&bar) return bar, err } const slashStar = `-- name: SlashStar :one SELECT bar FROM foo LIMIT 1 ` func (q *Queries) SlashStar(ctx context.Context) (sql.NullString, error) { row := q.db.QueryRowContext(ctx, slashStar) var bar sql.NullString err := row.Scan(&bar) return bar, err } ================================================ FILE: internal/endtoend/testdata/comment_syntax/sqlite/query.sql ================================================ -- name: DoubleDash :one SELECT * FROM foo LIMIT 1; /* name: SlashStar :one */ SELECT * FROM foo LIMIT 1; ================================================ FILE: internal/endtoend/testdata/comment_syntax/sqlite/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/comment_syntax/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/comparisons/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/comparisons/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID uint64 } ================================================ FILE: internal/endtoend/testdata/comparisons/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const alsoNotEqual = `-- name: AlsoNotEqual :many SELECT count(*) <> 0 FROM bar ` func (q *Queries) AlsoNotEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, alsoNotEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const equal = `-- name: Equal :many SELECT count(*) = 0 FROM bar ` func (q *Queries) Equal(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, equal) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const greaterThan = `-- name: GreaterThan :many SELECT count(*) > 0 FROM bar ` func (q *Queries) GreaterThan(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, greaterThan) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const greaterThanOrEqual = `-- name: GreaterThanOrEqual :many SELECT count(*) >= 0 FROM bar ` func (q *Queries) GreaterThanOrEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, greaterThanOrEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const isNotNull = `-- name: IsNotNull :many SELECT id IS NOT NULL FROM bar ` func (q *Queries) IsNotNull(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, isNotNull) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const isNull = `-- name: IsNull :many SELECT id IS NULL FROM bar ` func (q *Queries) IsNull(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, isNull) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const lessThan = `-- name: LessThan :many SELECT count(*) < 0 FROM bar ` func (q *Queries) LessThan(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, lessThan) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const lessThanOrEqual = `-- name: LessThanOrEqual :many SELECT count(*) <= 0 FROM bar ` func (q *Queries) LessThanOrEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, lessThanOrEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const notEqual = `-- name: NotEqual :many SELECT count(*) != 0 FROM bar ` func (q *Queries) NotEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, notEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/comparisons/mysql/query.sql ================================================ -- name: GreaterThan :many SELECT count(*) > 0 FROM bar; -- name: LessThan :many SELECT count(*) < 0 FROM bar; -- name: GreaterThanOrEqual :many SELECT count(*) >= 0 FROM bar; -- name: LessThanOrEqual :many SELECT count(*) <= 0 FROM bar; -- name: NotEqual :many SELECT count(*) != 0 FROM bar; -- name: AlsoNotEqual :many SELECT count(*) <> 0 FROM bar; -- name: Equal :many SELECT count(*) = 0 FROM bar; -- name: IsNull :many SELECT id IS NULL FROM bar; -- name: IsNotNull :many SELECT id IS NOT NULL FROM bar; ================================================ FILE: internal/endtoend/testdata/comparisons/mysql/schema.sql ================================================ -- Comparison Functions and Operators -- https://www.postgresql.org/docs/current/functions-comparison.html CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/comparisons/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "mysql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const alsoNotEqual = `-- name: AlsoNotEqual :many SELECT count(*) <> 0 FROM bar ` func (q *Queries) AlsoNotEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.Query(ctx, alsoNotEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const equal = `-- name: Equal :many SELECT count(*) = 0 FROM bar ` func (q *Queries) Equal(ctx context.Context) ([]bool, error) { rows, err := q.db.Query(ctx, equal) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const greaterThan = `-- name: GreaterThan :many SELECT count(*) > 0 FROM bar ` func (q *Queries) GreaterThan(ctx context.Context) ([]bool, error) { rows, err := q.db.Query(ctx, greaterThan) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const greaterThanOrEqual = `-- name: GreaterThanOrEqual :many SELECT count(*) >= 0 FROM bar ` func (q *Queries) GreaterThanOrEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.Query(ctx, greaterThanOrEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const lessThan = `-- name: LessThan :many SELECT count(*) < 0 FROM bar ` func (q *Queries) LessThan(ctx context.Context) ([]bool, error) { rows, err := q.db.Query(ctx, lessThan) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const lessThanOrEqual = `-- name: LessThanOrEqual :many SELECT count(*) <= 0 FROM bar ` func (q *Queries) LessThanOrEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.Query(ctx, lessThanOrEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const notEqual = `-- name: NotEqual :many SELECT count(*) != 0 FROM bar ` func (q *Queries) NotEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.Query(ctx, notEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/pgx/v4/query.sql ================================================ -- name: GreaterThan :many SELECT count(*) > 0 FROM bar; -- name: LessThan :many SELECT count(*) < 0 FROM bar; -- name: GreaterThanOrEqual :many SELECT count(*) >= 0 FROM bar; -- name: LessThanOrEqual :many SELECT count(*) <= 0 FROM bar; -- name: NotEqual :many SELECT count(*) != 0 FROM bar; -- name: AlsoNotEqual :many SELECT count(*) <> 0 FROM bar; -- name: Equal :many SELECT count(*) = 0 FROM bar; ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/pgx/v4/schema.sql ================================================ -- Comparison Functions and Operators -- https://www.postgresql.org/docs/current/functions-comparison.html CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "postgresql", "sql_package": "pgx/v4", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const alsoNotEqual = `-- name: AlsoNotEqual :many SELECT count(*) <> 0 FROM bar ` func (q *Queries) AlsoNotEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.Query(ctx, alsoNotEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const equal = `-- name: Equal :many SELECT count(*) = 0 FROM bar ` func (q *Queries) Equal(ctx context.Context) ([]bool, error) { rows, err := q.db.Query(ctx, equal) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const greaterThan = `-- name: GreaterThan :many SELECT count(*) > 0 FROM bar ` func (q *Queries) GreaterThan(ctx context.Context) ([]bool, error) { rows, err := q.db.Query(ctx, greaterThan) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const greaterThanOrEqual = `-- name: GreaterThanOrEqual :many SELECT count(*) >= 0 FROM bar ` func (q *Queries) GreaterThanOrEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.Query(ctx, greaterThanOrEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const lessThan = `-- name: LessThan :many SELECT count(*) < 0 FROM bar ` func (q *Queries) LessThan(ctx context.Context) ([]bool, error) { rows, err := q.db.Query(ctx, lessThan) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const lessThanOrEqual = `-- name: LessThanOrEqual :many SELECT count(*) <= 0 FROM bar ` func (q *Queries) LessThanOrEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.Query(ctx, lessThanOrEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const notEqual = `-- name: NotEqual :many SELECT count(*) != 0 FROM bar ` func (q *Queries) NotEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.Query(ctx, notEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/pgx/v5/query.sql ================================================ -- name: GreaterThan :many SELECT count(*) > 0 FROM bar; -- name: LessThan :many SELECT count(*) < 0 FROM bar; -- name: GreaterThanOrEqual :many SELECT count(*) >= 0 FROM bar; -- name: LessThanOrEqual :many SELECT count(*) <= 0 FROM bar; -- name: NotEqual :many SELECT count(*) != 0 FROM bar; -- name: AlsoNotEqual :many SELECT count(*) <> 0 FROM bar; -- name: Equal :many SELECT count(*) = 0 FROM bar; ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/pgx/v5/schema.sql ================================================ -- Comparison Functions and Operators -- https://www.postgresql.org/docs/current/functions-comparison.html CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "postgresql", "sql_package": "pgx/v5", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const alsoNotEqual = `-- name: AlsoNotEqual :many SELECT count(*) <> 0 FROM bar ` func (q *Queries) AlsoNotEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, alsoNotEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const equal = `-- name: Equal :many SELECT count(*) = 0 FROM bar ` func (q *Queries) Equal(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, equal) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const greaterThan = `-- name: GreaterThan :many SELECT count(*) > 0 FROM bar ` func (q *Queries) GreaterThan(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, greaterThan) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const greaterThanOrEqual = `-- name: GreaterThanOrEqual :many SELECT count(*) >= 0 FROM bar ` func (q *Queries) GreaterThanOrEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, greaterThanOrEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const lessThan = `-- name: LessThan :many SELECT count(*) < 0 FROM bar ` func (q *Queries) LessThan(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, lessThan) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const lessThanOrEqual = `-- name: LessThanOrEqual :many SELECT count(*) <= 0 FROM bar ` func (q *Queries) LessThanOrEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, lessThanOrEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const notEqual = `-- name: NotEqual :many SELECT count(*) != 0 FROM bar ` func (q *Queries) NotEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, notEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/stdlib/query.sql ================================================ -- name: GreaterThan :many SELECT count(*) > 0 FROM bar; -- name: LessThan :many SELECT count(*) < 0 FROM bar; -- name: GreaterThanOrEqual :many SELECT count(*) >= 0 FROM bar; -- name: LessThanOrEqual :many SELECT count(*) <= 0 FROM bar; -- name: NotEqual :many SELECT count(*) != 0 FROM bar; -- name: AlsoNotEqual :many SELECT count(*) <> 0 FROM bar; -- name: Equal :many SELECT count(*) = 0 FROM bar; ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/stdlib/schema.sql ================================================ -- Comparison Functions and Operators -- https://www.postgresql.org/docs/current/functions-comparison.html CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/comparisons/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/comparisons/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/comparisons/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/comparisons/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const alsoNotEqual = `-- name: AlsoNotEqual :many SELECT count(*) <> 0 FROM bar ` func (q *Queries) AlsoNotEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, alsoNotEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const equal = `-- name: Equal :many SELECT count(*) = 0 FROM bar ` func (q *Queries) Equal(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, equal) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const greaterThan = `-- name: GreaterThan :many SELECT count(*) > 0 FROM bar ` func (q *Queries) GreaterThan(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, greaterThan) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const greaterThanOrEqual = `-- name: GreaterThanOrEqual :many SELECT count(*) >= 0 FROM bar ` func (q *Queries) GreaterThanOrEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, greaterThanOrEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const lessThan = `-- name: LessThan :many SELECT count(*) < 0 FROM bar ` func (q *Queries) LessThan(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, lessThan) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const lessThanOrEqual = `-- name: LessThanOrEqual :many SELECT count(*) <= 0 FROM bar ` func (q *Queries) LessThanOrEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, lessThanOrEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const notEqual = `-- name: NotEqual :many SELECT count(*) != 0 FROM bar ` func (q *Queries) NotEqual(ctx context.Context) ([]bool, error) { rows, err := q.db.QueryContext(ctx, notEqual) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var column_1 bool if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/comparisons/sqlite/query.sql ================================================ -- name: GreaterThan :many SELECT count(*) > 0 FROM bar; -- name: LessThan :many SELECT count(*) < 0 FROM bar; -- name: GreaterThanOrEqual :many SELECT count(*) >= 0 FROM bar; -- name: LessThanOrEqual :many SELECT count(*) <= 0 FROM bar; -- name: NotEqual :many SELECT count(*) != 0 FROM bar; -- name: AlsoNotEqual :many SELECT count(*) <> 0 FROM bar; -- name: Equal :many SELECT count(*) = 0 FROM bar; ================================================ FILE: internal/endtoend/testdata/comparisons/sqlite/schema.sql ================================================ -- Comparison Functions and Operators -- https://www.postgresql.org/docs/current/functions-comparison.html CREATE TABLE bar (id integer not null primary key autoincrement); ================================================ FILE: internal/endtoend/testdata/comparisons/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/composite_type/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/composite_type/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type FooPath struct { PointOne sql.NullString PointTwo sql.NullString } ================================================ FILE: internal/endtoend/testdata/composite_type/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listPaths = `-- name: ListPaths :many SELECT point_one, point_two FROM foo.paths ` func (q *Queries) ListPaths(ctx context.Context) ([]FooPath, error) { rows, err := q.db.Query(ctx, listPaths) if err != nil { return nil, err } defer rows.Close() var items []FooPath for rows.Next() { var i FooPath if err := rows.Scan(&i.PointOne, &i.PointTwo); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/composite_type/pgx/v4/query.sql ================================================ -- name: ListPaths :many SELECT * FROM foo.paths; ================================================ FILE: internal/endtoend/testdata/composite_type/pgx/v4/schema.sql ================================================ CREATE SCHEMA foo; CREATE TYPE point_type AS ( x integer, y integer ); CREATE TYPE foo.point_type AS ( x integer, y integer ); CREATE TABLE foo.paths ( point_one point_type, point_two foo.point_type ); ================================================ FILE: internal/endtoend/testdata/composite_type/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/composite_type/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/composite_type/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type FooPath struct { PointOne sql.NullString PointTwo sql.NullString } ================================================ FILE: internal/endtoend/testdata/composite_type/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listPaths = `-- name: ListPaths :many SELECT point_one, point_two FROM foo.paths ` func (q *Queries) ListPaths(ctx context.Context) ([]FooPath, error) { rows, err := q.db.Query(ctx, listPaths) if err != nil { return nil, err } defer rows.Close() var items []FooPath for rows.Next() { var i FooPath if err := rows.Scan(&i.PointOne, &i.PointTwo); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/composite_type/pgx/v5/query.sql ================================================ -- name: ListPaths :many SELECT * FROM foo.paths; ================================================ FILE: internal/endtoend/testdata/composite_type/pgx/v5/schema.sql ================================================ CREATE SCHEMA foo; CREATE TYPE point_type AS ( x integer, y integer ); CREATE TYPE foo.point_type AS ( x integer, y integer ); CREATE TABLE foo.paths ( point_one point_type, point_two foo.point_type ); ================================================ FILE: internal/endtoend/testdata/composite_type/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/composite_type/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/composite_type/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type FooPath struct { PointOne sql.NullString PointTwo sql.NullString } ================================================ FILE: internal/endtoend/testdata/composite_type/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listPaths = `-- name: ListPaths :many SELECT point_one, point_two FROM foo.paths ` func (q *Queries) ListPaths(ctx context.Context) ([]FooPath, error) { rows, err := q.db.QueryContext(ctx, listPaths) if err != nil { return nil, err } defer rows.Close() var items []FooPath for rows.Next() { var i FooPath if err := rows.Scan(&i.PointOne, &i.PointTwo); 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 } ================================================ FILE: internal/endtoend/testdata/composite_type/stdlib/query.sql ================================================ -- name: ListPaths :many SELECT * FROM foo.paths; ================================================ FILE: internal/endtoend/testdata/composite_type/stdlib/schema.sql ================================================ CREATE SCHEMA foo; CREATE TYPE point_type AS ( x integer, y integer ); CREATE TYPE foo.point_type AS ( x integer, y integer ); CREATE TABLE foo.paths ( point_one point_type, point_two foo.point_type ); ================================================ FILE: internal/endtoend/testdata/composite_type/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/conflicted_arg_name/postgresql/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/conflicted_arg_name/postgresql/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "time" "github.com/google/uuid" ) type Foo struct { Time time.Time Time2 time.Time Uuid uuid.UUID Uuid2 uuid.UUID } ================================================ FILE: internal/endtoend/testdata/conflicted_arg_name/postgresql/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" "time" "github.com/google/uuid" ) const time2ByTime = `-- name: Time2ByTime :one SELECT time2 FROM foo WHERE time=$1 ` func (q *Queries) Time2ByTime(ctx context.Context, argTime time.Time) (time.Time, error) { row := q.db.QueryRowContext(ctx, time2ByTime, argTime) var time2 time.Time err := row.Scan(&time2) return time2, err } const uuid2ByUuid = `-- name: Uuid2ByUuid :one SELECT uuid2 FROM foo WHERE uuid=$1 ` func (q *Queries) Uuid2ByUuid(ctx context.Context, argUuid uuid.UUID) (uuid.UUID, error) { row := q.db.QueryRowContext(ctx, uuid2ByUuid, argUuid) var uuid2 uuid.UUID err := row.Scan(&uuid2) return uuid2, err } ================================================ FILE: internal/endtoend/testdata/conflicted_arg_name/postgresql/query.sql ================================================ -- name: Time2ByTime :one SELECT time2 FROM foo WHERE time=$1; -- name: Uuid2ByUuid :one SELECT uuid2 FROM foo WHERE uuid=$1; ================================================ FILE: internal/endtoend/testdata/conflicted_arg_name/postgresql/schema.sql ================================================ CREATE TABLE foo ( time date NOT NULL, time2 date NOT NULL, uuid uuid NOT NULL, uuid2 uuid NOT NULL ); ================================================ FILE: internal/endtoend/testdata/conflicted_arg_name/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "db", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/copyfrom/mysql/go/copyfrom.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: copyfrom.go package querytest import ( "context" "database/sql" "fmt" "io" "sync/atomic" "github.com/go-sql-driver/mysql" "github.com/hexon/mysqltsv" ) var readerHandlerSequenceForInsertSingleValue uint32 = 1 func convertRowsForInsertSingleValue(w *io.PipeWriter, a []sql.NullString) { e := mysqltsv.NewEncoder(w, 1, nil) for _, row := range a { e.AppendValue(row) } 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, a []sql.NullString) (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, a) // 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() } var readerHandlerSequenceForInsertValues uint32 = 1 func convertRowsForInsertValues(w *io.PipeWriter, arg []InsertValuesParams) { e := mysqltsv.NewEncoder(w, 4, nil) for _, row := range arg { e.AppendValue(row.A) e.AppendValue(row.B) e.AppendValue(row.C) e.AppendValue(row.D) } w.CloseWithError(e.Close()) } // InsertValues 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) InsertValues(ctx context.Context, arg []InsertValuesParams) (int64, error) { pr, pw := io.Pipe() defer pr.Close() rh := fmt.Sprintf("InsertValues_%d", atomic.AddUint32(&readerHandlerSequenceForInsertValues, 1)) mysql.RegisterReaderHandler(rh, func() io.Reader { return pr }) defer mysql.DeregisterReaderHandler(rh) go convertRowsForInsertValues(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, c, d)", "Reader::"+rh, mysqltsv.Escaping)) if err != nil { return 0, err } return result.RowsAffected() } ================================================ FILE: internal/endtoend/testdata/copyfrom/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/copyfrom/mysql/go/models.go ================================================ // 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.NullInt32 C sql.NullTime D sql.NullTime } ================================================ FILE: internal/endtoend/testdata/copyfrom/mysql/go/query.sql.go ================================================ // 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 (?) ` const insertValues = `-- name: InsertValues :copyfrom INSERT INTO foo (a, b, c, d) VALUES (?, ?, ?, ?) ` type InsertValuesParams struct { A sql.NullString B sql.NullInt32 C sql.NullTime D sql.NullTime } ================================================ FILE: internal/endtoend/testdata/copyfrom/mysql/query.sql ================================================ -- name: InsertValues :copyfrom INSERT INTO foo (a, b, c, d) VALUES (?, ?, ?, ?); -- name: InsertSingleValue :copyfrom INSERT INTO foo (a) VALUES (?); ================================================ FILE: internal/endtoend/testdata/copyfrom/mysql/schema.sql ================================================ CREATE TABLE foo (a text, b integer, c DATETIME, d DATE); ================================================ FILE: internal/endtoend/testdata/copyfrom/mysql/sqlc.json ================================================ { "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" } ] } ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/copyfrom.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: copyfrom.go package querytest import ( "context" "database/sql" ) // iteratorForInsertSingleValue implements pgx.CopyFromSource. type iteratorForInsertSingleValue struct { rows []sql.NullString skippedFirstNextCall bool } func (r *iteratorForInsertSingleValue) Next() bool { if len(r.rows) == 0 { return false } if !r.skippedFirstNextCall { r.skippedFirstNextCall = true return true } r.rows = r.rows[1:] return len(r.rows) > 0 } func (r iteratorForInsertSingleValue) Values() ([]interface{}, error) { return []interface{}{ r.rows[0], }, nil } func (r iteratorForInsertSingleValue) Err() error { return nil } // InsertSingleValue inserts a single value using copy. func (q *Queries) InsertSingleValue(ctx context.Context, a []sql.NullString) (int64, error) { return q.db.CopyFrom(ctx, []string{"myschema", "foo"}, []string{"a"}, &iteratorForInsertSingleValue{rows: a}) } // iteratorForInsertValues implements pgx.CopyFromSource. type iteratorForInsertValues struct { rows []InsertValuesParams skippedFirstNextCall bool } func (r *iteratorForInsertValues) Next() bool { if len(r.rows) == 0 { return false } if !r.skippedFirstNextCall { r.skippedFirstNextCall = true return true } r.rows = r.rows[1:] return len(r.rows) > 0 } func (r iteratorForInsertValues) Values() ([]interface{}, error) { return []interface{}{ r.rows[0].A, r.rows[0].B, }, nil } func (r iteratorForInsertValues) Err() error { return nil } // InsertValues inserts multiple values using copy. func (q *Queries) InsertValues(ctx context.Context, arg []InsertValuesParams) (int64, error) { return q.db.CopyFrom(ctx, []string{"myschema", "foo"}, []string{"a", "b"}, &iteratorForInsertValues{rows: arg}) } ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/db.go ================================================ // 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 CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) } func New(db DBTX) *Queries { return &Queries{db: db} } type Queries struct { db DBTX } func (q *Queries) WithTx(tx pgx.Tx) *Queries { return &Queries{ db: tx, } } ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type MyschemaFoo struct { A sql.NullString B sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" "database/sql" ) type Querier interface { // InsertSingleValue inserts a single value using copy. InsertSingleValue(ctx context.Context, a []sql.NullString) (int64, error) // InsertValues inserts multiple values using copy. InsertValues(ctx context.Context, arg []InsertValuesParams) (int64, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "database/sql" ) type InsertValuesParams struct { A sql.NullString B sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/query.sql ================================================ -- name: InsertValues :copyfrom -- InsertValues inserts multiple values using copy. INSERT INTO myschema.foo (a, b) VALUES ($1, $2); -- name: InsertSingleValue :copyfrom -- InsertSingleValue inserts a single value using copy. INSERT INTO myschema.foo (a) VALUES ($1); ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/schema.sql ================================================ CREATE SCHEMA myschema; CREATE TABLE myschema.foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/copyfrom.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: copyfrom.go package querytest import ( "context" "github.com/jackc/pgx/v5/pgtype" ) // iteratorForInsertSingleValue implements pgx.CopyFromSource. type iteratorForInsertSingleValue struct { rows []pgtype.Text skippedFirstNextCall bool } func (r *iteratorForInsertSingleValue) Next() bool { if len(r.rows) == 0 { return false } if !r.skippedFirstNextCall { r.skippedFirstNextCall = true return true } r.rows = r.rows[1:] return len(r.rows) > 0 } func (r iteratorForInsertSingleValue) Values() ([]interface{}, error) { return []interface{}{ r.rows[0], }, nil } func (r iteratorForInsertSingleValue) Err() error { return nil } // InsertSingleValue inserts a single value using copy. func (q *Queries) InsertSingleValue(ctx context.Context, a []pgtype.Text) (int64, error) { return q.db.CopyFrom(ctx, []string{"myschema", "foo"}, []string{"a"}, &iteratorForInsertSingleValue{rows: a}) } // iteratorForInsertValues implements pgx.CopyFromSource. type iteratorForInsertValues struct { rows []InsertValuesParams skippedFirstNextCall bool } func (r *iteratorForInsertValues) Next() bool { if len(r.rows) == 0 { return false } if !r.skippedFirstNextCall { r.skippedFirstNextCall = true return true } r.rows = r.rows[1:] return len(r.rows) > 0 } func (r iteratorForInsertValues) Values() ([]interface{}, error) { return []interface{}{ r.rows[0].A, r.rows[0].B, }, nil } func (r iteratorForInsertValues) Err() error { return nil } // InsertValues inserts multiple values using copy. func (q *Queries) InsertValues(ctx context.Context, arg []InsertValuesParams) (int64, error) { return q.db.CopyFrom(ctx, []string{"myschema", "foo"}, []string{"a", "b"}, &iteratorForInsertValues{rows: arg}) } ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/db.go ================================================ // 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 CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) } func New(db DBTX) *Queries { return &Queries{db: db} } type Queries struct { db DBTX } func (q *Queries) WithTx(tx pgx.Tx) *Queries { return &Queries{ db: tx, } } ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type MyschemaFoo struct { A pgtype.Text B pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" "github.com/jackc/pgx/v5/pgtype" ) type Querier interface { // InsertSingleValue inserts a single value using copy. InsertSingleValue(ctx context.Context, a []pgtype.Text) (int64, error) // InsertValues inserts multiple values using copy. InsertValues(ctx context.Context, arg []InsertValuesParams) (int64, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type InsertValuesParams struct { A pgtype.Text B pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/query.sql ================================================ -- name: InsertValues :copyfrom -- InsertValues inserts multiple values using copy. INSERT INTO myschema.foo (a, b) VALUES ($1, $2); -- name: InsertSingleValue :copyfrom -- InsertSingleValue inserts a single value using copy. INSERT INTO myschema.foo (a) VALUES ($1); ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/schema.sql ================================================ CREATE SCHEMA myschema; CREATE TABLE myschema.foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/copyfrom/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/copyfrom.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: copyfrom.go package querytest import ( "context" ) // iteratorForInsertValues implements pgx.CopyFromSource. type iteratorForInsertValues struct { rows []InsertValuesParams skippedFirstNextCall bool } func (r *iteratorForInsertValues) Next() bool { if len(r.rows) == 0 { return false } if !r.skippedFirstNextCall { r.skippedFirstNextCall = true return true } r.rows = r.rows[1:] return len(r.rows) > 0 } func (r iteratorForInsertValues) Values() ([]interface{}, error) { return []interface{}{ r.rows[0].A, r.rows[0].B, }, nil } func (r iteratorForInsertValues) Err() error { return nil } func (q *Queries) InsertValues(ctx context.Context, arg []InsertValuesParams) (int64, error) { return q.db.CopyFrom(ctx, []string{"myschema", "foo"}, []string{"a", "b"}, &iteratorForInsertValues{rows: arg}) } ================================================ FILE: internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/db.go ================================================ // 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 CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) } func New(db DBTX) *Queries { return &Queries{db: db} } type Queries struct { db DBTX } func (q *Queries) WithTx(tx pgx.Tx) *Queries { return &Queries{ db: tx, } } ================================================ FILE: internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type MyschemaFoo struct { A sql.NullString B sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "github.com/jackc/pgconn" ) const deleteValues = `-- name: DeleteValues :execresult DELETE FROM myschema.foo ` func (q *Queries) DeleteValues(ctx context.Context) (pgconn.CommandTag, error) { return q.db.Exec(ctx, deleteValues) } const insertSingleValue = `-- name: InsertSingleValue :exec INSERT INTO myschema.foo (a) VALUES ($1) ` func (q *Queries) InsertSingleValue(ctx context.Context, a sql.NullString) error { _, err := q.db.Exec(ctx, insertSingleValue, a) return err } type InsertValuesParams struct { A sql.NullString B sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/query.sql ================================================ -- name: InsertValues :copyfrom INSERT INTO myschema.foo (a, b) VALUES ($1, $2); -- name: InsertSingleValue :exec INSERT INTO myschema.foo (a) VALUES ($1); -- name: DeleteValues :execresult DELETE FROM myschema.foo; ================================================ FILE: internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/schema.sql ================================================ CREATE SCHEMA myschema; CREATE TABLE myschema.foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/copyfrom.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: copyfrom.go package querytest import ( "context" ) // iteratorForInsertValues implements pgx.CopyFromSource. type iteratorForInsertValues struct { rows []InsertValuesParams skippedFirstNextCall bool } func (r *iteratorForInsertValues) Next() bool { if len(r.rows) == 0 { return false } if !r.skippedFirstNextCall { r.skippedFirstNextCall = true return true } r.rows = r.rows[1:] return len(r.rows) > 0 } func (r iteratorForInsertValues) Values() ([]interface{}, error) { return []interface{}{ r.rows[0].A, r.rows[0].B, }, nil } func (r iteratorForInsertValues) Err() error { return nil } func (q *Queries) InsertValues(ctx context.Context, arg []InsertValuesParams) (int64, error) { return q.db.CopyFrom(ctx, []string{"myschema", "foo"}, []string{"a", "b"}, &iteratorForInsertValues{rows: arg}) } ================================================ FILE: internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/db.go ================================================ // 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 CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) } func New(db DBTX) *Queries { return &Queries{db: db} } type Queries struct { db DBTX } func (q *Queries) WithTx(tx pgx.Tx) *Queries { return &Queries{ db: tx, } } ================================================ FILE: internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type MyschemaFoo struct { A pgtype.Text B pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/jackc/pgx/v5/pgconn" "github.com/jackc/pgx/v5/pgtype" ) const deleteValues = `-- name: DeleteValues :execresult DELETE FROM myschema.foo ` func (q *Queries) DeleteValues(ctx context.Context) (pgconn.CommandTag, error) { return q.db.Exec(ctx, deleteValues) } const insertSingleValue = `-- name: InsertSingleValue :exec INSERT INTO myschema.foo (a) VALUES ($1) ` func (q *Queries) InsertSingleValue(ctx context.Context, a pgtype.Text) error { _, err := q.db.Exec(ctx, insertSingleValue, a) return err } type InsertValuesParams struct { A pgtype.Text B pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/query.sql ================================================ -- name: InsertValues :copyfrom INSERT INTO myschema.foo (a, b) VALUES ($1, $2); -- name: InsertSingleValue :exec INSERT INTO myschema.foo (a) VALUES ($1); -- name: DeleteValues :execresult DELETE FROM myschema.foo; ================================================ FILE: internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/schema.sql ================================================ CREATE SCHEMA myschema; CREATE TABLE myschema.foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/copyfrom_imports/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/go/copyfrom.go ================================================ // 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() } ================================================ FILE: internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/query.sql ================================================ -- name: InsertMultipleValues :copyfrom INSERT INTO foo (a, b) VALUES (?, ?); ================================================ FILE: internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/schema.sql ================================================ CREATE TABLE foo (a text, b text); ================================================ FILE: internal/endtoend/testdata/copyfrom_multicolumn_parameter_limit/mysql/sqlc.json ================================================ { "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 } ] } ================================================ FILE: internal/endtoend/testdata/copyfrom_named_params/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/2833 ================================================ FILE: internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/copyfrom.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: copyfrom.go package querytest import ( "context" ) // iteratorForStageUserData implements pgx.CopyFromSource. type iteratorForStageUserData struct { rows []StageUserDataParams skippedFirstNextCall bool } func (r *iteratorForStageUserData) Next() bool { if len(r.rows) == 0 { return false } if !r.skippedFirstNextCall { r.skippedFirstNextCall = true return true } r.rows = r.rows[1:] return len(r.rows) > 0 } func (r iteratorForStageUserData) Values() ([]interface{}, error) { return []interface{}{ r.rows[0].IDParam, r.rows[0].UserParam, }, nil } func (r iteratorForStageUserData) Err() error { return nil } func (q *Queries) StageUserData(ctx context.Context, arg []StageUserDataParams) (int64, error) { return q.db.CopyFrom(ctx, []string{"user_data"}, []string{"id", "user"}, &iteratorForStageUserData{rows: arg}) } ================================================ FILE: internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/db.go ================================================ // 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 CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) } func New(db DBTX) *Queries { return &Queries{db: db} } type Queries struct { db DBTX } func (q *Queries) WithTx(tx pgx.Tx) *Queries { return &Queries{ db: tx, } } ================================================ FILE: internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type UserDatum struct { ID string User string } ================================================ FILE: internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest type StageUserDataParams struct { IDParam string UserParam string } ================================================ FILE: internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/query.sql ================================================ -- name: StageUserData :copyfrom insert into "user_data" ("id", "user") values ( sqlc.arg('id_param'), sqlc.arg('user_param') ); ================================================ FILE: internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/schema.sql ================================================ create table "user_data" ( "id" varchar not null, "user" varchar not null, primary key ("id") ); ================================================ FILE: internal/endtoend/testdata/copyfrom_named_params/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/copyfrom.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: copyfrom.go package querytest import ( "context" ) // iteratorForCreateAuthors implements pgx.CopyFromSource. type iteratorForCreateAuthors struct { rows []int32 skippedFirstNextCall bool } func (r *iteratorForCreateAuthors) Next() bool { if len(r.rows) == 0 { return false } if !r.skippedFirstNextCall { r.skippedFirstNextCall = true return true } r.rows = r.rows[1:] return len(r.rows) > 0 } func (r iteratorForCreateAuthors) Values() ([]interface{}, error) { return []interface{}{ r.rows[0], }, nil } func (r iteratorForCreateAuthors) Err() error { return nil } func (q *Queries) CreateAuthors(ctx context.Context, authorID []int32) (int64, error) { return q.db.CopyFrom(ctx, []string{"authors"}, []string{"author_id"}, &iteratorForCreateAuthors{rows: authorID}) } ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/db.go ================================================ // 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 CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) } func New(db DBTX) *Queries { return &Queries{db: db} } type Queries struct { db DBTX } func (q *Queries) WithTx(tx pgx.Tx) *Queries { return &Queries{ db: tx, } } ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Author struct { AuthorID int32 } ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { CreateAuthors(ctx context.Context, authorID []int32) (int64, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/query.sql ================================================ -- name: CreateAuthors :copyfrom INSERT INTO authors (author_id) VALUES ($1); ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE authors ( author_id SERIAL PRIMARY KEY ); ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/copyfrom.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: copyfrom.go package querytest import ( "context" ) // iteratorForCreateAuthors implements pgx.CopyFromSource. type iteratorForCreateAuthors struct { rows []int32 skippedFirstNextCall bool } func (r *iteratorForCreateAuthors) Next() bool { if len(r.rows) == 0 { return false } if !r.skippedFirstNextCall { r.skippedFirstNextCall = true return true } r.rows = r.rows[1:] return len(r.rows) > 0 } func (r iteratorForCreateAuthors) Values() ([]interface{}, error) { return []interface{}{ r.rows[0], }, nil } func (r iteratorForCreateAuthors) Err() error { return nil } func (q *Queries) CreateAuthors(ctx context.Context, authorID []int32) (int64, error) { return q.db.CopyFrom(ctx, []string{"authors"}, []string{"author_id"}, &iteratorForCreateAuthors{rows: authorID}) } ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/db.go ================================================ // 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 CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) } func New(db DBTX) *Queries { return &Queries{db: db} } type Queries struct { db DBTX } func (q *Queries) WithTx(tx pgx.Tx) *Queries { return &Queries{ db: tx, } } ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Author struct { AuthorID int32 } ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { CreateAuthors(ctx context.Context, authorID []int32) (int64, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/query.sql ================================================ -- name: CreateAuthors :copyfrom INSERT INTO authors (author_id) VALUES ($1); ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE authors ( author_id SERIAL PRIMARY KEY ); ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/3443 ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/go/copyfrom.go ================================================ // 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() } ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { A sql.NullString } ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/query.sql ================================================ -- name: InsertSingleValue :copyfrom INSERT INTO foo (a) VALUES (?); ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/schema.sql ================================================ CREATE TABLE foo (a text); ================================================ FILE: internal/endtoend/testdata/copyfrom_singlecolumn_struct_only/mysql/sqlc.json ================================================ { "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 } ] } ================================================ FILE: internal/endtoend/testdata/count_star/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/count_star/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID uint64 } ================================================ FILE: internal/endtoend/testdata/count_star/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const countStarLower = `-- name: CountStarLower :one SELECT count(*) FROM bar ` func (q *Queries) CountStarLower(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, countStarLower) var count int64 err := row.Scan(&count) return count, err } const countStarUpper = `-- name: CountStarUpper :one SELECT COUNT(*) FROM bar ` func (q *Queries) CountStarUpper(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, countStarUpper) var count int64 err := row.Scan(&count) return count, err } ================================================ FILE: internal/endtoend/testdata/count_star/mysql/query.sql ================================================ -- name: CountStarLower :one SELECT count(*) FROM bar; -- name: CountStarUpper :one SELECT COUNT(*) FROM bar; ================================================ FILE: internal/endtoend/testdata/count_star/mysql/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/count_star/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "mysql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const countStarLower = `-- name: CountStarLower :one SELECT count(*) FROM bar ` func (q *Queries) CountStarLower(ctx context.Context) (int64, error) { row := q.db.QueryRow(ctx, countStarLower) var count int64 err := row.Scan(&count) return count, err } const countStarUpper = `-- name: CountStarUpper :one SELECT COUNT(*) FROM bar ` func (q *Queries) CountStarUpper(ctx context.Context) (int64, error) { row := q.db.QueryRow(ctx, countStarUpper) var count int64 err := row.Scan(&count) return count, err } ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/pgx/v4/query.sql ================================================ -- name: CountStarLower :one SELECT count(*) FROM bar; -- name: CountStarUpper :one SELECT COUNT(*) FROM bar; ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "postgresql", "sql_package": "pgx/v4", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const countStarLower = `-- name: CountStarLower :one SELECT count(*) FROM bar ` func (q *Queries) CountStarLower(ctx context.Context) (int64, error) { row := q.db.QueryRow(ctx, countStarLower) var count int64 err := row.Scan(&count) return count, err } const countStarUpper = `-- name: CountStarUpper :one SELECT COUNT(*) FROM bar ` func (q *Queries) CountStarUpper(ctx context.Context) (int64, error) { row := q.db.QueryRow(ctx, countStarUpper) var count int64 err := row.Scan(&count) return count, err } ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/pgx/v5/query.sql ================================================ -- name: CountStarLower :one SELECT count(*) FROM bar; -- name: CountStarUpper :one SELECT COUNT(*) FROM bar; ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "postgresql", "sql_package": "pgx/v5", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const countStarLower = `-- name: CountStarLower :one SELECT count(*) FROM bar ` func (q *Queries) CountStarLower(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, countStarLower) var count int64 err := row.Scan(&count) return count, err } const countStarUpper = `-- name: CountStarUpper :one SELECT COUNT(*) FROM bar ` func (q *Queries) CountStarUpper(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, countStarUpper) var count int64 err := row.Scan(&count) return count, err } ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/stdlib/query.sql ================================================ -- name: CountStarLower :one SELECT count(*) FROM bar; -- name: CountStarUpper :one SELECT COUNT(*) FROM bar; ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/stdlib/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/count_star/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/count_star/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/count_star/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/count_star/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const countStarLower = `-- name: CountStarLower :one SELECT count(*) FROM bar ` func (q *Queries) CountStarLower(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, countStarLower) var count int64 err := row.Scan(&count) return count, err } const countStarUpper = `-- name: CountStarUpper :one SELECT COUNT(*) FROM bar ` func (q *Queries) CountStarUpper(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, countStarUpper) var count int64 err := row.Scan(&count) return count, err } ================================================ FILE: internal/endtoend/testdata/count_star/sqlite/query.sql ================================================ -- name: CountStarLower :one SELECT count(*) FROM bar; -- name: CountStarUpper :one SELECT COUNT(*) FROM bar; ================================================ FILE: internal/endtoend/testdata/count_star/sqlite/schema.sql ================================================ CREATE TABLE bar (id BIGINT not null); ================================================ FILE: internal/endtoend/testdata/count_star/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/create_materialized_view/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/create_materialized_view/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Val string } type MatFirstView struct { Val string } ================================================ FILE: internal/endtoend/testdata/create_materialized_view/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getFirst = `-- name: GetFirst :many SELECT val FROM mat_first_view ` func (q *Queries) GetFirst(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, getFirst) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var val string if err := rows.Scan(&val); err != nil { return nil, err } items = append(items, val) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/create_materialized_view/postgresql/query.sql ================================================ -- name: GetFirst :many SELECT * FROM mat_first_view; ================================================ FILE: internal/endtoend/testdata/create_materialized_view/postgresql/schema.sql ================================================ CREATE TABLE foo (val text not null); CREATE MATERIALIZED VIEW mat_first_view AS SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/create_materialized_view/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/create_table_as/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/create_table_as/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Val string } type SecondTable struct { Val string } ================================================ FILE: internal/endtoend/testdata/create_table_as/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getFirst = `-- name: GetFirst :many SELECT val FROM second_table ` func (q *Queries) GetFirst(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, getFirst) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var val string if err := rows.Scan(&val); err != nil { return nil, err } items = append(items, val) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/create_table_as/postgresql/query.sql ================================================ -- name: GetFirst :many SELECT * FROM second_table; ================================================ FILE: internal/endtoend/testdata/create_table_as/postgresql/schema.sql ================================================ CREATE TABLE foo (val text not null); CREATE TABLE second_table AS SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/create_table_as/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/create_table_like/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/create_table_like/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type SuperUser struct { ID int32 FirstName string LastName sql.NullString DateOfBirth sql.NullTime } type User struct { ID int32 LastName sql.NullString Age int32 } ================================================ FILE: internal/endtoend/testdata/create_table_like/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, date_of_birth FROM super_users ` func (q *Queries) GetAll(ctx context.Context) ([]SuperUser, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []SuperUser for rows.Next() { var i SuperUser if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.DateOfBirth, ); 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 } ================================================ FILE: internal/endtoend/testdata/create_table_like/mysql/query.sql ================================================ /* name: GetAll :many */ SELECT * FROM super_users; ================================================ FILE: internal/endtoend/testdata/create_table_like/mysql/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name varchar(255) NOT NULL ); ALTER TABLE users ADD COLUMN last_name varchar(255); CREATE TABLE super_users LIKE users; ALTER TABLE users ADD COLUMN age integer NOT NULL; ALTER TABLE users DROP COLUMN first_name; ALTER TABLE super_users ADD COLUMN date_of_birth DATETIME(6); ================================================ FILE: internal/endtoend/testdata/create_table_like/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "mysql" } ] } ================================================ FILE: internal/endtoend/testdata/create_table_like/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/create_table_like/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type SuperUser struct { ID int32 FirstName string LastName sql.NullString DateOfBirth sql.NullTime } type User struct { ID int32 LastName sql.NullString Age int32 } ================================================ FILE: internal/endtoend/testdata/create_table_like/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, date_of_birth FROM super_users ` func (q *Queries) GetAll(ctx context.Context) ([]SuperUser, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []SuperUser for rows.Next() { var i SuperUser if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.DateOfBirth, ); 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 } ================================================ FILE: internal/endtoend/testdata/create_table_like/postgresql/query.sql ================================================ /* name: GetAll :many */ SELECT * FROM super_users; ================================================ FILE: internal/endtoend/testdata/create_table_like/postgresql/schema.sql ================================================ CREATE TABLE users ( id serial NOT NULL PRIMARY KEY, first_name varchar(255) NOT NULL ); ALTER TABLE users ADD COLUMN last_name varchar(255); CREATE TABLE super_users ( LIKE users ); ALTER TABLE users ADD COLUMN age integer NOT NULL; ALTER TABLE users DROP COLUMN first_name; ALTER TABLE super_users ADD COLUMN date_of_birth TIMESTAMP; ================================================ FILE: internal/endtoend/testdata/create_table_like/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql" } ] } ================================================ FILE: internal/endtoend/testdata/create_view/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/create_view/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type FirstView struct { Val string } type Foo struct { Val string Val2 sql.NullInt32 } type SecondView struct { Val string Val2 sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/create_view/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getFirst = `-- name: GetFirst :many SELECT val FROM first_view ` func (q *Queries) GetFirst(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, getFirst) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var val string if err := rows.Scan(&val); err != nil { return nil, err } items = append(items, val) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getSecond = `-- name: GetSecond :many SELECT val, val2 FROM second_view WHERE val2 = $1 ` func (q *Queries) GetSecond(ctx context.Context) ([]SecondView, error) { rows, err := q.db.QueryContext(ctx, getSecond) if err != nil { return nil, err } defer rows.Close() var items []SecondView for rows.Next() { var i SecondView if err := rows.Scan(&i.Val, &i.Val2); 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 } ================================================ FILE: internal/endtoend/testdata/create_view/mysql/query.sql ================================================ -- name: GetFirst :many SELECT * FROM first_view; -- name: GetSecond :many SELECT * FROM second_view WHERE val2 = $1; ================================================ FILE: internal/endtoend/testdata/create_view/mysql/schema.sql ================================================ CREATE TABLE foo (val text not null); CREATE VIEW first_view AS SELECT * FROM foo; CREATE VIEW second_view AS SELECT * FROM foo; CREATE VIEW third_view AS SELECT * FROM foo; ALTER TABLE foo ADD COLUMN val2 integer; CREATE OR REPLACE VIEW second_view AS SELECT * FROM foo; DROP VIEW third_view; ================================================ FILE: internal/endtoend/testdata/create_view/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/create_view/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/create_view/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type FirstView struct { Val string } type Foo struct { Val string Val2 sql.NullInt32 } type SecondView struct { Val string Val2 sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/create_view/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getFirst = `-- name: GetFirst :many SELECT val FROM first_view ` func (q *Queries) GetFirst(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, getFirst) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var val string if err := rows.Scan(&val); err != nil { return nil, err } items = append(items, val) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getSecond = `-- name: GetSecond :many SELECT val, val2 FROM second_view WHERE val2 = $1 ` func (q *Queries) GetSecond(ctx context.Context, val2 sql.NullInt32) ([]SecondView, error) { rows, err := q.db.QueryContext(ctx, getSecond, val2) if err != nil { return nil, err } defer rows.Close() var items []SecondView for rows.Next() { var i SecondView if err := rows.Scan(&i.Val, &i.Val2); 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 } ================================================ FILE: internal/endtoend/testdata/create_view/postgresql/query.sql ================================================ -- name: GetFirst :many SELECT * FROM first_view; -- name: GetSecond :many SELECT * FROM second_view WHERE val2 = $1; ================================================ FILE: internal/endtoend/testdata/create_view/postgresql/schema.sql ================================================ CREATE TABLE foo (val text not null); CREATE VIEW first_view AS SELECT * FROM foo; CREATE VIEW second_view AS SELECT * FROM foo; CREATE VIEW third_view AS SELECT * FROM foo; ALTER TABLE foo ADD COLUMN val2 integer; CREATE OR REPLACE VIEW second_view AS SELECT * FROM foo; DROP VIEW third_view; ================================================ FILE: internal/endtoend/testdata/create_view/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/create_view/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/create_view/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type FirstView struct { Val string } type Foo struct { Val string Val2 sql.NullInt64 } type SecondView struct { Val string Val2 sql.NullInt64 } ================================================ FILE: internal/endtoend/testdata/create_view/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getFirst = `-- name: GetFirst :many SELECT val FROM first_view ` func (q *Queries) GetFirst(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, getFirst) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var val string if err := rows.Scan(&val); err != nil { return nil, err } items = append(items, val) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getSecond = `-- name: GetSecond :many SELECT val, val2 FROM second_view WHERE val2 = ? ` func (q *Queries) GetSecond(ctx context.Context, val2 sql.NullInt64) ([]SecondView, error) { rows, err := q.db.QueryContext(ctx, getSecond, val2) if err != nil { return nil, err } defer rows.Close() var items []SecondView for rows.Next() { var i SecondView if err := rows.Scan(&i.Val, &i.Val2); 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 } ================================================ FILE: internal/endtoend/testdata/create_view/sqlite/query.sql ================================================ -- name: GetFirst :many SELECT * FROM first_view; -- name: GetSecond :many SELECT * FROM second_view WHERE val2 = ?; ================================================ FILE: internal/endtoend/testdata/create_view/sqlite/schema.sql ================================================ CREATE TABLE foo (val text not null); CREATE VIEW first_view AS SELECT * FROM foo; CREATE VIEW second_view AS SELECT * FROM foo; CREATE VIEW third_view AS SELECT * FROM foo; ALTER TABLE foo ADD COLUMN val2 integer; DROP VIEW second_view; CREATE VIEW second_view AS SELECT * FROM foo; DROP VIEW third_view; ================================================ FILE: internal/endtoend/testdata/create_view/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_count/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_count/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Ready bool } ================================================ FILE: internal/endtoend/testdata/cte_count/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const cTECount = `-- name: CTECount :many WITH all_count AS ( SELECT count(*) FROM bar ), ready_count AS ( SELECT count(*) FROM bar WHERE ready = true ) SELECT all_count.count, ready_count.count FROM all_count, ready_count ` type CTECountRow struct { Count int64 Count_2 int64 } func (q *Queries) CTECount(ctx context.Context) ([]CTECountRow, error) { rows, err := q.db.QueryContext(ctx, cTECount) if err != nil { return nil, err } defer rows.Close() var items []CTECountRow for rows.Next() { var i CTECountRow if err := rows.Scan(&i.Count, &i.Count_2); 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 } ================================================ FILE: internal/endtoend/testdata/cte_count/mysql/query.sql ================================================ -- name: CTECount :many WITH all_count AS ( SELECT count(*) FROM bar ), ready_count AS ( SELECT count(*) FROM bar WHERE ready = true ) SELECT all_count.count, ready_count.count FROM all_count, ready_count; ================================================ FILE: internal/endtoend/testdata/cte_count/mysql/schema.sql ================================================ CREATE TABLE bar (ready bool not null); ================================================ FILE: internal/endtoend/testdata/cte_count/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_count/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_count/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Ready bool } ================================================ FILE: internal/endtoend/testdata/cte_count/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const cTECount = `-- name: CTECount :many WITH all_count AS ( SELECT count(*) FROM bar ), ready_count AS ( SELECT count(*) FROM bar WHERE ready = true ) SELECT all_count.count, ready_count.count FROM all_count, ready_count ` type CTECountRow struct { Count int64 Count_2 int64 } func (q *Queries) CTECount(ctx context.Context) ([]CTECountRow, error) { rows, err := q.db.Query(ctx, cTECount) if err != nil { return nil, err } defer rows.Close() var items []CTECountRow for rows.Next() { var i CTECountRow if err := rows.Scan(&i.Count, &i.Count_2); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cte_count/pgx/v4/query.sql ================================================ -- name: CTECount :many WITH all_count AS ( SELECT count(*) FROM bar ), ready_count AS ( SELECT count(*) FROM bar WHERE ready = true ) SELECT all_count.count, ready_count.count FROM all_count, ready_count; ================================================ FILE: internal/endtoend/testdata/cte_count/pgx/v4/schema.sql ================================================ CREATE TABLE bar (ready bool not null); ================================================ FILE: internal/endtoend/testdata/cte_count/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_count/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_count/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Ready bool } ================================================ FILE: internal/endtoend/testdata/cte_count/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const cTECount = `-- name: CTECount :many WITH all_count AS ( SELECT count(*) FROM bar ), ready_count AS ( SELECT count(*) FROM bar WHERE ready = true ) SELECT all_count.count, ready_count.count FROM all_count, ready_count ` type CTECountRow struct { Count int64 Count_2 int64 } func (q *Queries) CTECount(ctx context.Context) ([]CTECountRow, error) { rows, err := q.db.Query(ctx, cTECount) if err != nil { return nil, err } defer rows.Close() var items []CTECountRow for rows.Next() { var i CTECountRow if err := rows.Scan(&i.Count, &i.Count_2); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cte_count/pgx/v5/query.sql ================================================ -- name: CTECount :many WITH all_count AS ( SELECT count(*) FROM bar ), ready_count AS ( SELECT count(*) FROM bar WHERE ready = true ) SELECT all_count.count, ready_count.count FROM all_count, ready_count; ================================================ FILE: internal/endtoend/testdata/cte_count/pgx/v5/schema.sql ================================================ CREATE TABLE bar (ready bool not null); ================================================ FILE: internal/endtoend/testdata/cte_count/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_count/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_count/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Ready bool } ================================================ FILE: internal/endtoend/testdata/cte_count/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const cTECount = `-- name: CTECount :many WITH all_count AS ( SELECT count(*) FROM bar ), ready_count AS ( SELECT count(*) FROM bar WHERE ready = true ) SELECT all_count.count, ready_count.count FROM all_count, ready_count ` type CTECountRow struct { Count int64 Count_2 int64 } func (q *Queries) CTECount(ctx context.Context) ([]CTECountRow, error) { rows, err := q.db.QueryContext(ctx, cTECount) if err != nil { return nil, err } defer rows.Close() var items []CTECountRow for rows.Next() { var i CTECountRow if err := rows.Scan(&i.Count, &i.Count_2); 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 } ================================================ FILE: internal/endtoend/testdata/cte_count/stdlib/query.sql ================================================ -- name: CTECount :many WITH all_count AS ( SELECT count(*) FROM bar ), ready_count AS ( SELECT count(*) FROM bar WHERE ready = true ) SELECT all_count.count, ready_count.count FROM all_count, ready_count; ================================================ FILE: internal/endtoend/testdata/cte_count/stdlib/schema.sql ================================================ CREATE TABLE bar (ready bool not null); ================================================ FILE: internal/endtoend/testdata/cte_count/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_filter/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_filter/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Ready bool } ================================================ FILE: internal/endtoend/testdata/cte_filter/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const cTEFilter = `-- name: CTEFilter :many WITH filter_count AS ( SELECT count(*) FROM bar WHERE ready = ? ) SELECT filter_count.count FROM filter_count ` func (q *Queries) CTEFilter(ctx context.Context, ready bool) ([]int64, error) { rows, err := q.db.QueryContext(ctx, cTEFilter, ready) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var count int64 if err := rows.Scan(&count); err != nil { return nil, err } items = append(items, count) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cte_filter/mysql/query.sql ================================================ -- name: CTEFilter :many WITH filter_count AS ( SELECT count(*) FROM bar WHERE ready = ? ) SELECT filter_count.count FROM filter_count; ================================================ FILE: internal/endtoend/testdata/cte_filter/mysql/schema.sql ================================================ CREATE TABLE bar (ready bool not null); ================================================ FILE: internal/endtoend/testdata/cte_filter/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_filter/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_filter/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Ready bool } ================================================ FILE: internal/endtoend/testdata/cte_filter/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const cTEFilter = `-- name: CTEFilter :many WITH filter_count AS ( SELECT count(*) FROM bar WHERE ready = $1 ) SELECT filter_count.count FROM filter_count ` func (q *Queries) CTEFilter(ctx context.Context, ready bool) ([]int64, error) { rows, err := q.db.Query(ctx, cTEFilter, ready) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var count int64 if err := rows.Scan(&count); err != nil { return nil, err } items = append(items, count) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cte_filter/pgx/v4/query.sql ================================================ -- name: CTEFilter :many WITH filter_count AS ( SELECT count(*) FROM bar WHERE ready = $1 ) SELECT filter_count.count FROM filter_count; ================================================ FILE: internal/endtoend/testdata/cte_filter/pgx/v4/schema.sql ================================================ CREATE TABLE bar (ready bool not null); ================================================ FILE: internal/endtoend/testdata/cte_filter/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_filter/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_filter/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Ready bool } ================================================ FILE: internal/endtoend/testdata/cte_filter/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const cTEFilter = `-- name: CTEFilter :many WITH filter_count AS ( SELECT count(*) FROM bar WHERE ready = $1 ) SELECT filter_count.count FROM filter_count ` func (q *Queries) CTEFilter(ctx context.Context, ready bool) ([]int64, error) { rows, err := q.db.Query(ctx, cTEFilter, ready) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var count int64 if err := rows.Scan(&count); err != nil { return nil, err } items = append(items, count) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cte_filter/pgx/v5/query.sql ================================================ -- name: CTEFilter :many WITH filter_count AS ( SELECT count(*) FROM bar WHERE ready = $1 ) SELECT filter_count.count FROM filter_count; ================================================ FILE: internal/endtoend/testdata/cte_filter/pgx/v5/schema.sql ================================================ CREATE TABLE bar (ready bool not null); ================================================ FILE: internal/endtoend/testdata/cte_filter/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_filter/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_filter/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Ready bool } ================================================ FILE: internal/endtoend/testdata/cte_filter/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const cTEFilter = `-- name: CTEFilter :many WITH filter_count AS ( SELECT count(*) FROM bar WHERE ready = $1 ) SELECT filter_count.count FROM filter_count ` func (q *Queries) CTEFilter(ctx context.Context, ready bool) ([]int64, error) { rows, err := q.db.QueryContext(ctx, cTEFilter, ready) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var count int64 if err := rows.Scan(&count); err != nil { return nil, err } items = append(items, count) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cte_filter/stdlib/query.sql ================================================ -- name: CTEFilter :many WITH filter_count AS ( SELECT count(*) FROM bar WHERE ready = $1 ) SELECT filter_count.count FROM filter_count; ================================================ FILE: internal/endtoend/testdata/cte_filter/stdlib/schema.sql ================================================ CREATE TABLE bar (ready bool not null); ================================================ FILE: internal/endtoend/testdata/cte_filter/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 Ready bool } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteReadyWithCTE = `-- name: DeleteReadyWithCTE :exec WITH ready_ids AS ( SELECT id FROM bar WHERE ready ) DELETE FROM bar WHERE id IN (SELECT id FROM ready_ids) ` func (q *Queries) DeleteReadyWithCTE(ctx context.Context) error { _, err := q.db.ExecContext(ctx, deleteReadyWithCTE) return err } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/mysql/query.sql ================================================ -- name: DeleteReadyWithCTE :exec WITH ready_ids AS ( SELECT id FROM bar WHERE ready ) DELETE FROM bar WHERE id IN (SELECT * FROM ready_ids); ================================================ FILE: internal/endtoend/testdata/cte_in_delete/mysql/schema.sql ================================================ CREATE TABLE bar (id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, ready bool not null); ================================================ FILE: internal/endtoend/testdata/cte_in_delete/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 Ready bool } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteReadyWithCTE = `-- name: DeleteReadyWithCTE :many WITH ready_ids AS ( SELECT id FROM bar WHERE ready ) DELETE FROM bar WHERE id IN (SELECT id FROM ready_ids) RETURNING id ` func (q *Queries) DeleteReadyWithCTE(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(ctx, deleteReadyWithCTE) 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.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/pgx/v4/query.sql ================================================ -- name: DeleteReadyWithCTE :many WITH ready_ids AS ( SELECT id FROM bar WHERE ready ) DELETE FROM bar WHERE id IN (SELECT * FROM ready_ids) RETURNING id; ================================================ FILE: internal/endtoend/testdata/cte_in_delete/pgx/v4/schema.sql ================================================ CREATE TABLE bar (id serial primary key not null, ready bool not null); ================================================ FILE: internal/endtoend/testdata/cte_in_delete/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 Ready bool } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteReadyWithCTE = `-- name: DeleteReadyWithCTE :many WITH ready_ids AS ( SELECT id FROM bar WHERE ready ) DELETE FROM bar WHERE id IN (SELECT id FROM ready_ids) RETURNING id ` func (q *Queries) DeleteReadyWithCTE(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(ctx, deleteReadyWithCTE) 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.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/pgx/v5/query.sql ================================================ -- name: DeleteReadyWithCTE :many WITH ready_ids AS ( SELECT id FROM bar WHERE ready ) DELETE FROM bar WHERE id IN (SELECT * FROM ready_ids) RETURNING id; ================================================ FILE: internal/endtoend/testdata/cte_in_delete/pgx/v5/schema.sql ================================================ CREATE TABLE bar (id serial primary key not null, ready bool not null); ================================================ FILE: internal/endtoend/testdata/cte_in_delete/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 Ready bool } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteReadyWithCTE = `-- name: DeleteReadyWithCTE :many WITH ready_ids AS ( SELECT id FROM bar WHERE ready ) DELETE FROM bar WHERE id IN (SELECT id FROM ready_ids) RETURNING id ` func (q *Queries) DeleteReadyWithCTE(ctx context.Context) ([]int32, error) { rows, err := q.db.QueryContext(ctx, deleteReadyWithCTE) 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 } ================================================ FILE: internal/endtoend/testdata/cte_in_delete/stdlib/query.sql ================================================ -- name: DeleteReadyWithCTE :many WITH ready_ids AS ( SELECT id FROM bar WHERE ready ) DELETE FROM bar WHERE id IN (SELECT * FROM ready_ids) RETURNING id; ================================================ FILE: internal/endtoend/testdata/cte_in_delete/stdlib/schema.sql ================================================ CREATE TABLE bar (id serial primary key not null, ready bool not null); ================================================ FILE: internal/endtoend/testdata/cte_in_delete/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_join_self/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/2132 ================================================ FILE: internal/endtoend/testdata/cte_join_self/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/cte_join_self/postgresql/pgx/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listItems = `-- name: ListItems :one WITH items1 AS (SELECT 'id'::TEXT AS id, 'name'::TEXT AS name), items2 AS (SELECT 'id'::TEXT AS id, 'name'::TEXT AS name) SELECT i1.id AS id1, i2.id AS id2 FROM items1 i1 JOIN items1 i2 ON 1 = 1 ` type ListItemsRow struct { Id1 string Id2 string } func (q *Queries) ListItems(ctx context.Context) (ListItemsRow, error) { row := q.db.QueryRow(ctx, listItems) var i ListItemsRow err := row.Scan(&i.Id1, &i.Id2) return i, err } ================================================ FILE: internal/endtoend/testdata/cte_join_self/postgresql/pgx/query.sql ================================================ -- name: ListItems :one WITH items1 AS (SELECT 'id'::TEXT AS id, 'name'::TEXT AS name), items2 AS (SELECT 'id'::TEXT AS id, 'name'::TEXT AS name) SELECT i1.id AS id1, i2.id AS id2 FROM items1 i1 JOIN items1 i2 ON 1 = 1; ================================================ FILE: internal/endtoend/testdata/cte_join_self/postgresql/pgx/schema.sql ================================================ -- TODO ================================================ FILE: internal/endtoend/testdata/cte_join_self/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/cte_left_join/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1236 ================================================ FILE: internal/endtoend/testdata/cte_left_join/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/models.go ================================================ // 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 Fake struct { ID int64 Name string Bio pgtype.Text } ================================================ FILE: internal/endtoend/testdata/cte_left_join/postgresql/pgx/go/query.sql.go ================================================ // 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 badQuery = `-- name: BadQuery :exec WITH q AS ( SELECT authors.name, authors.bio FROM authors LEFT JOIN fake ON authors.name = fake.name ) SELECT name, bio FROM q AS c1 WHERE c1.name = $1 ` func (q *Queries) BadQuery(ctx context.Context, dollar_1 pgtype.Text) error { _, err := q.db.Exec(ctx, badQuery, dollar_1) return err } ================================================ FILE: internal/endtoend/testdata/cte_left_join/postgresql/pgx/query.sql ================================================ -- name: BadQuery :exec WITH q AS ( SELECT authors.name, authors.bio FROM authors LEFT JOIN fake ON authors.name = fake.name ) SELECT * FROM q AS c1 WHERE c1.name = $1; ================================================ FILE: internal/endtoend/testdata/cte_left_join/postgresql/pgx/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); CREATE TABLE fake ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/cte_left_join/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/cte_multiple_alias/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1237 ================================================ FILE: internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/models.go ================================================ // 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 Fake struct { ID int64 Name string Bio pgtype.Text } ================================================ FILE: internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/go/query.sql.go ================================================ // 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 badQuery = `-- name: BadQuery :one WITH q AS ( SELECT authors.name, authors.bio FROM authors LEFT JOIN fake ON authors.name = fake.name ) SELECT c1.name, c1.bio, c2.name, c2.bio FROM q AS c1, q as c2 ` type BadQueryRow struct { Name string Bio pgtype.Text Name_2 string Bio_2 pgtype.Text } func (q *Queries) BadQuery(ctx context.Context) (BadQueryRow, error) { row := q.db.QueryRow(ctx, badQuery) var i BadQueryRow err := row.Scan( &i.Name, &i.Bio, &i.Name_2, &i.Bio_2, ) return i, err } ================================================ FILE: internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/query.sql ================================================ -- name: BadQuery :one WITH q AS ( SELECT authors.name, authors.bio FROM authors LEFT JOIN fake ON authors.name = fake.name ) SELECT * FROM q AS c1, q as c2; ================================================ FILE: internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); CREATE TABLE fake ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/cte_multiple_alias/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/cte_nested_with/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/2226 ================================================ FILE: internal/endtoend/testdata/cte_nested_with/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/cte_nested_with/postgresql/pgx/go/query.sql.go ================================================ // 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 getAuthor = `-- name: GetAuthor :one WITH person AS( WITH summary AS( WITH mb AS( select id, name, bio from authors ) SELECT bio FROM mb ) SELECT count(*) as total FROM summary ) select total from person ` func (q *Queries) GetAuthor(ctx context.Context) (pgtype.Int8, error) { row := q.db.QueryRow(ctx, getAuthor) var total pgtype.Int8 err := row.Scan(&total) return total, err } ================================================ FILE: internal/endtoend/testdata/cte_nested_with/postgresql/pgx/query.sql ================================================ -- name: GetAuthor :one WITH person AS( WITH summary AS( WITH mb AS( select id, name, bio from authors ) SELECT bio FROM mb ) SELECT count(*) as total FROM summary ) select total from person; ================================================ FILE: internal/endtoend/testdata/cte_nested_with/postgresql/pgx/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/cte_nested_with/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/cte_recursive/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_recursive/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 ParentID sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/cte_recursive/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const cTERecursive = `-- name: CTERecursive :many WITH RECURSIVE cte AS ( SELECT b.id, b.parent_id FROM bar AS b WHERE b.id = ? UNION ALL SELECT b.id, b.parent_id FROM bar AS b, cte AS c WHERE b.parent_id = c.id ) SELECT id, parent_id FROM cte ` type CTERecursiveRow struct { ID int32 ParentID sql.NullInt32 } func (q *Queries) CTERecursive(ctx context.Context, id int32) ([]CTERecursiveRow, error) { rows, err := q.db.QueryContext(ctx, cTERecursive, id) if err != nil { return nil, err } defer rows.Close() var items []CTERecursiveRow for rows.Next() { var i CTERecursiveRow if err := rows.Scan(&i.ID, &i.ParentID); 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 } ================================================ FILE: internal/endtoend/testdata/cte_recursive/mysql/query.sql ================================================ -- name: CTERecursive :many WITH RECURSIVE cte AS ( SELECT b.* FROM bar AS b WHERE b.id = ? UNION ALL SELECT b.* FROM bar AS b, cte AS c WHERE b.parent_id = c.id ) SELECT * FROM cte; ================================================ FILE: internal/endtoend/testdata/cte_recursive/mysql/schema.sql ================================================ CREATE TABLE bar (id INT NOT NULL, parent_id INT); ================================================ FILE: internal/endtoend/testdata/cte_recursive/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_recursive/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_recursive/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 ParentID sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/cte_recursive/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const cTERecursive = `-- name: CTERecursive :many WITH RECURSIVE cte AS ( SELECT b.id, b.parent_id FROM bar AS b WHERE b.id = $1 UNION ALL SELECT b.id, b.parent_id FROM bar AS b, cte AS c WHERE b.parent_id = c.id ) SELECT id, parent_id FROM cte ` type CTERecursiveRow struct { ID int32 ParentID sql.NullInt32 } func (q *Queries) CTERecursive(ctx context.Context, id int32) ([]CTERecursiveRow, error) { rows, err := q.db.Query(ctx, cTERecursive, id) if err != nil { return nil, err } defer rows.Close() var items []CTERecursiveRow for rows.Next() { var i CTERecursiveRow if err := rows.Scan(&i.ID, &i.ParentID); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cte_recursive/pgx/v4/query.sql ================================================ -- name: CTERecursive :many WITH RECURSIVE cte AS ( SELECT b.* FROM bar AS b WHERE b.id = $1 UNION ALL SELECT b.* FROM bar AS b, cte AS c WHERE b.parent_id = c.id ) SELECT * FROM cte; ================================================ FILE: internal/endtoend/testdata/cte_recursive/pgx/v4/schema.sql ================================================ CREATE TABLE bar (id INT NOT NULL, parent_id INT); ================================================ FILE: internal/endtoend/testdata/cte_recursive/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_recursive/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_recursive/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Bar struct { ID int32 ParentID pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/cte_recursive/pgx/v5/go/query.sql.go ================================================ // 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 cTERecursive = `-- name: CTERecursive :many WITH RECURSIVE cte AS ( SELECT b.id, b.parent_id FROM bar AS b WHERE b.id = $1 UNION ALL SELECT b.id, b.parent_id FROM bar AS b, cte AS c WHERE b.parent_id = c.id ) SELECT id, parent_id FROM cte ` type CTERecursiveRow struct { ID int32 ParentID pgtype.Int4 } func (q *Queries) CTERecursive(ctx context.Context, id int32) ([]CTERecursiveRow, error) { rows, err := q.db.Query(ctx, cTERecursive, id) if err != nil { return nil, err } defer rows.Close() var items []CTERecursiveRow for rows.Next() { var i CTERecursiveRow if err := rows.Scan(&i.ID, &i.ParentID); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cte_recursive/pgx/v5/query.sql ================================================ -- name: CTERecursive :many WITH RECURSIVE cte AS ( SELECT b.* FROM bar AS b WHERE b.id = $1 UNION ALL SELECT b.* FROM bar AS b, cte AS c WHERE b.parent_id = c.id ) SELECT * FROM cte; ================================================ FILE: internal/endtoend/testdata/cte_recursive/pgx/v5/schema.sql ================================================ CREATE TABLE bar (id INT NOT NULL, parent_id INT); ================================================ FILE: internal/endtoend/testdata/cte_recursive/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_recursive/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_recursive/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 ParentID sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/cte_recursive/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const cTERecursive = `-- name: CTERecursive :many WITH RECURSIVE cte AS ( SELECT b.id, b.parent_id FROM bar AS b WHERE b.id = $1 UNION ALL SELECT b.id, b.parent_id FROM bar AS b, cte AS c WHERE b.parent_id = c.id ) SELECT id, parent_id FROM cte ` type CTERecursiveRow struct { ID int32 ParentID sql.NullInt32 } func (q *Queries) CTERecursive(ctx context.Context, id int32) ([]CTERecursiveRow, error) { rows, err := q.db.QueryContext(ctx, cTERecursive, id) if err != nil { return nil, err } defer rows.Close() var items []CTERecursiveRow for rows.Next() { var i CTERecursiveRow if err := rows.Scan(&i.ID, &i.ParentID); 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 } ================================================ FILE: internal/endtoend/testdata/cte_recursive/stdlib/query.sql ================================================ -- name: CTERecursive :many WITH RECURSIVE cte AS ( SELECT b.* FROM bar AS b WHERE b.id = $1 UNION ALL SELECT b.* FROM bar AS b, cte AS c WHERE b.parent_id = c.id ) SELECT * FROM cte; ================================================ FILE: internal/endtoend/testdata/cte_recursive/stdlib/schema.sql ================================================ CREATE TABLE bar (id INT NOT NULL, parent_id INT); ================================================ FILE: internal/endtoend/testdata/cte_recursive/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/cte_recursive_employees/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1219 https://github.com/sqlc-dev/sqlc/issues/1912 ================================================ FILE: internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Employee struct { ID int64 Name string Manager pgtype.Text } ================================================ FILE: internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/go/query.sql.go ================================================ // 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 getSubordinates = `-- name: GetSubordinates :many WITH RECURSIVE subordinates(name, manager) AS ( SELECT NULL, $1::TEXT UNION SELECT s.manager, e.name FROM subordinates AS s LEFT OUTER JOIN employees AS e ON e.manager = s.manager WHERE s.manager IS NOT NULL ) SELECT s.name FROM subordinates AS s WHERE s.name != $1 ` func (q *Queries) GetSubordinates(ctx context.Context, name pgtype.Text) ([]pgtype.Text, error) { rows, err := q.db.Query(ctx, getSubordinates, name) if err != nil { return nil, err } defer rows.Close() var items []pgtype.Text for rows.Next() { var name pgtype.Text if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/query.sql ================================================ -- name: GetSubordinates :many WITH RECURSIVE subordinates(name, manager) AS ( SELECT NULL, sqlc.arg(name)::TEXT UNION SELECT s.manager, e.name FROM subordinates AS s LEFT OUTER JOIN employees AS e ON e.manager = s.manager WHERE s.manager IS NOT NULL ) SELECT s.name FROM subordinates AS s WHERE s.name != sqlc.arg(name); ================================================ FILE: internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/schema.sql ================================================ CREATE TABLE employees ( id BIGSERIAL PRIMARY KEY, name text UNIQUE NOT NULL, manager text REFERENCES employees(name) ); ================================================ FILE: internal/endtoend/testdata/cte_recursive_employees/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/cte_recursive_star/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1219 ================================================ FILE: internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Dict struct { ID string AppID string Code pgtype.Text ParentCode string Label string Value pgtype.Text Weight int32 IsDefault bool IsVirtual bool Status int16 CreateAt pgtype.Timestamptz CreateBy string UpdateAt pgtype.Timestamptz UpdateBy pgtype.Text IsDelete bool } ================================================ FILE: internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/go/query.sql.go ================================================ // 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 getDictTree = `-- name: GetDictTree :many with recursive dictTree(id, code, parent_code, label, value, path, depth) AS ( select id, code, parent_code, label, value, ARRAY[COALESCE((select id from dict where code=''),'virtual_root'), id], 1 as depth from dict where app_id = '1' and parent_code = '' and is_delete=false union select d.id, d.code, d.parent_code, d.label, d.value, t.path || ARRAY[d.id], t.depth+1 as depth from dict d join dictTree t on d.parent_code = t.code and not d.id = ANY(t.path) and d.is_delete=false ) select id, code, parent_code, label, value, path, depth from dictTree d order by depth, parent_code ` type GetDictTreeRow struct { ID string Code pgtype.Text ParentCode string Label string Value pgtype.Text Path []string Depth int32 } func (q *Queries) GetDictTree(ctx context.Context) ([]GetDictTreeRow, error) { rows, err := q.db.Query(ctx, getDictTree) if err != nil { return nil, err } defer rows.Close() var items []GetDictTreeRow for rows.Next() { var i GetDictTreeRow if err := rows.Scan( &i.ID, &i.Code, &i.ParentCode, &i.Label, &i.Value, &i.Path, &i.Depth, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/query.sql ================================================ -- name: GetDictTree :many with recursive dictTree(id, code, parent_code, label, value, path, depth) AS ( select id, code, parent_code, label, value, ARRAY[COALESCE((select id from dict where code=''),'virtual_root'), id], 1 as depth from dict where app_id = '1' and parent_code = '' and is_delete=false union select d.id, d.code, d.parent_code, d.label, d.value, t.path || ARRAY[d.id], t.depth+1 as depth from dict d join dictTree t on d.parent_code = t.code and not d.id = ANY(t.path) and d.is_delete=false ) select * from dictTree d order by depth, parent_code; ================================================ FILE: internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/schema.sql ================================================ create table dict( id VARCHAR(36) PRIMARY KEY DEFAULT gen_random_uuid(), app_id VARCHAR(36) NOT NULL, code VARCHAR(64), parent_code VARCHAR(64) NOT NULL, label TEXT NOT NULL DEFAULT '', value TEXT NULL, weight INT NOT NULL DEFAULT 0, is_default BOOLEAN NOT NULL DEFAULT false, is_virtual BOOLEAN NOT NULL DEFAULT false, status SMALLINT NOT NULL DEFAULT 1, create_at TIMESTAMPTZ(0) NOT NULL DEFAULT now(), create_by VARCHAR(36) NOT NULL DEFAULT '', update_at TIMESTAMPTZ(0), update_by VARCHAR(36), is_delete BOOLEAN NOT NULL DEFAULT false ); ================================================ FILE: internal/endtoend/testdata/cte_recursive_star/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/cte_recursive_subquery/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/2644 ================================================ FILE: internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Version struct { ID int64 Name pgtype.Text PreviousVersionID int64 } ================================================ FILE: internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getLatestVersion = `-- name: GetLatestVersion :one WITH RECURSIVE search_tree(id, chain_id, chain_counter) AS ( SELECT base.id, base.id AS chain_id, 0 as chain_counter FROM versions AS base WHERE base.previous_version_id IS NULL UNION ALL SELECT v.id, search_tree.chain_id, search_tree.chain_counter + 1 FROM versions AS v INNER JOIN search_tree ON search_tree.id = v.previous_version_id ) SELECT DISTINCT ON (search_tree.chain_id) search_tree.id FROM search_tree ORDER BY search_tree.chain_id, chain_counter DESC ` func (q *Queries) GetLatestVersion(ctx context.Context) (int64, error) { row := q.db.QueryRow(ctx, getLatestVersion) var id int64 err := row.Scan(&id) return id, err } const getLatestVersionWithSubquery = `-- name: GetLatestVersionWithSubquery :one SELECT id FROM versions WHERE versions.id IN ( WITH RECURSIVE search_tree(id, chain_id, chain_counter) AS ( SELECT base.id, base.id AS chain_id, 0 as chain_counter FROM versions AS base WHERE versions.previous_version_id IS NULL UNION ALL SELECT v.id, search_tree.chain_id, search_tree.chain_counter + 1 FROM versions AS v INNER JOIN search_tree ON search_tree.id = v.previous_version_id ) SELECT DISTINCT ON (search_tree.chain_id) search_tree.id FROM search_tree ORDER BY search_tree.chain_id, chain_counter DESC ) ` func (q *Queries) GetLatestVersionWithSubquery(ctx context.Context) (int64, error) { row := q.db.QueryRow(ctx, getLatestVersionWithSubquery) var id int64 err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/query.sql ================================================ -- name: GetLatestVersion :one WITH RECURSIVE search_tree(id, chain_id, chain_counter) AS ( SELECT base.id, base.id AS chain_id, 0 as chain_counter FROM versions AS base WHERE base.previous_version_id IS NULL UNION ALL SELECT v.id, search_tree.chain_id, search_tree.chain_counter + 1 FROM versions AS v INNER JOIN search_tree ON search_tree.id = v.previous_version_id ) SELECT DISTINCT ON (search_tree.chain_id) search_tree.id FROM search_tree ORDER BY search_tree.chain_id, chain_counter DESC; -- name: GetLatestVersionWithSubquery :one SELECT id FROM versions WHERE versions.id IN ( WITH RECURSIVE search_tree(id, chain_id, chain_counter) AS ( SELECT base.id, base.id AS chain_id, 0 as chain_counter FROM versions AS base WHERE versions.previous_version_id IS NULL UNION ALL SELECT v.id, search_tree.chain_id, search_tree.chain_counter + 1 FROM versions AS v INNER JOIN search_tree ON search_tree.id = v.previous_version_id ) SELECT DISTINCT ON (search_tree.chain_id) search_tree.id FROM search_tree ORDER BY search_tree.chain_id, chain_counter DESC ); ================================================ FILE: internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/schema.sql ================================================ CREATE TABLE versions ( id BIGSERIAL PRIMARY KEY, name TEXT, previous_version_id bigint NOT NULL ); ================================================ FILE: internal/endtoend/testdata/cte_recursive_subquery/postgresql/pgx/sqlc.yaml ================================================ version: "2" cloud: project: "01HAQMMECEYQYKFJN8MP16QC41" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" database: managed: true ================================================ FILE: internal/endtoend/testdata/cte_recursive_union/issue.md ================================================ # TODO ================================================ FILE: internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type CaseIntent struct { ID int32 CaseIntentString string Description string Author string } type CaseIntentParentJoin struct { CaseIntentID int64 CaseIntentParentID int64 } type CaseIntentVersion struct { VersionID int32 Reviewer string CreatedAt pgtype.Timestamptz } type CaseIntentVersionJoin struct { CaseIntentID int64 CaseIntentVersionID int32 } ================================================ FILE: internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/go/query.sql.go ================================================ // 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 listCaseIntentHistory = `-- name: ListCaseIntentHistory :many WITH RECURSIVE descendants AS ( SELECT case_intent_parent_id AS parent, case_intent_id AS child, 1 AS lvl FROM case_intent_parent_join UNION ALL SELECT d.parent as parent, p.case_intent_id as child, d.lvl + 1 as lvl FROM descendants d JOIN case_intent_parent_join p ON d.child = p.case_intent_parent_id ) select distinct child, 'child' group_ from descendants where parent = $1 union select distinct parent, 'parent' group_ from descendants where child = $1 ORDER BY child ` type ListCaseIntentHistoryRow struct { Child int64 Group string } func (q *Queries) ListCaseIntentHistory(ctx context.Context, caseIntentID pgtype.Int8) ([]ListCaseIntentHistoryRow, error) { rows, err := q.db.Query(ctx, listCaseIntentHistory, caseIntentID) if err != nil { return nil, err } defer rows.Close() var items []ListCaseIntentHistoryRow for rows.Next() { var i ListCaseIntentHistoryRow if err := rows.Scan(&i.Child, &i.Group); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/query.sql ================================================ -- name: ListCaseIntentHistory :many WITH RECURSIVE descendants AS ( SELECT case_intent_parent_id AS parent, case_intent_id AS child, 1 AS lvl FROM case_intent_parent_join UNION ALL SELECT d.parent as parent, p.case_intent_id as child, d.lvl + 1 as lvl FROM descendants d JOIN case_intent_parent_join p ON d.child = p.case_intent_parent_id ) select distinct child, 'child' group_ from descendants where parent = @case_intent_id union select distinct parent, 'parent' group_ from descendants where child = @case_intent_id ORDER BY child; ================================================ FILE: internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/schema.sql ================================================ CREATE TABLE case_intent_version ( version_id SERIAL NOT NULL PRIMARY KEY, reviewer TEXT NOT NULL, created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); CREATE TABLE case_intent ( id SERIAL NOT NULL PRIMARY KEY, case_intent_string TEXT NOT NULL, description TEXT NOT NULL, author TEXT NOT NULL ); CREATE TABLE case_intent_parent_join ( case_intent_id BIGINT NOT NULL, case_intent_parent_id BIGINT NOT NULL, constraint fk_case_intent_id foreign key (case_intent_id) references case_intent(id), constraint fk_case_intent_parent_id foreign key (case_intent_parent_id) references case_intent(id) ); CREATE TABLE case_intent_version_join ( case_intent_id BIGINT NOT NULL, case_intent_version_id INT NOT NULL, constraint fk_case_intent_id foreign key (case_intent_id) references case_intent(id), constraint fk_case_intent_version_id foreign key (case_intent_version_id) references case_intent_version(version_id) ); ================================================ FILE: internal/endtoend/testdata/cte_recursive_union/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/cte_select_one/issue.md ================================================ # TODO ================================================ FILE: internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/cte_select_one/postgresql/pgx/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const testRecursive = `-- name: TestRecursive :one WITH t1 AS ( select 1 as foo ) SELECT foo FROM t1 ` func (q *Queries) TestRecursive(ctx context.Context) (int32, error) { row := q.db.QueryRow(ctx, testRecursive) var foo int32 err := row.Scan(&foo) return foo, err } ================================================ FILE: internal/endtoend/testdata/cte_select_one/postgresql/pgx/query.sql ================================================ -- name: TestRecursive :one WITH t1 AS ( select 1 as foo ) SELECT * FROM t1; ================================================ FILE: internal/endtoend/testdata/cte_select_one/postgresql/pgx/schema.sql ================================================ -- TODO ================================================ FILE: internal/endtoend/testdata/cte_select_one/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/cte_update/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1515 ================================================ FILE: internal/endtoend/testdata/cte_update/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/cte_update/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_update/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Attribute struct { ID int64 Name string } type AttributeValue struct { ID int64 Val string Attribute int64 } ================================================ FILE: internal/endtoend/testdata/cte_update/postgresql/pgx/go/query.sql.go ================================================ // 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 updateAttribute = `-- name: UpdateAttribute :one with updated_attribute as (UPDATE attribute_value SET val = CASE WHEN $1::bool THEN $2 ELSE val END WHERE attribute_value.id = $3 RETURNING id,attribute,val) select updated_attribute.id, val, name from updated_attribute left join attribute on updated_attribute.attribute = attribute.id ` type UpdateAttributeParams struct { FilterValue pgtype.Bool Value pgtype.Text ID pgtype.Int8 } type UpdateAttributeRow struct { ID int64 Val string Name pgtype.Text } func (q *Queries) UpdateAttribute(ctx context.Context, arg UpdateAttributeParams) (UpdateAttributeRow, error) { row := q.db.QueryRow(ctx, updateAttribute, arg.FilterValue, arg.Value, arg.ID) var i UpdateAttributeRow err := row.Scan(&i.ID, &i.Val, &i.Name) return i, err } ================================================ FILE: internal/endtoend/testdata/cte_update/postgresql/pgx/query.sql ================================================ -- name: UpdateAttribute :one with updated_attribute as (UPDATE attribute_value SET val = CASE WHEN @filter_value::bool THEN @value ELSE val END WHERE attribute_value.id = @id RETURNING id,attribute,val) select updated_attribute.id, val, name from updated_attribute left join attribute on updated_attribute.attribute = attribute.id; ================================================ FILE: internal/endtoend/testdata/cte_update/postgresql/pgx/schema.sql ================================================ create table attribute_value ( id bigserial not null, val text not null, attribute bigint not null ); create table attribute ( id bigserial not null, name text not null ); ================================================ FILE: internal/endtoend/testdata/cte_update/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/cte_update_multiple/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1916 ================================================ FILE: internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Address struct { ID int64 AddressLine string Region string City string CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type User struct { ID int64 Username string Email string Password string Telephone int32 DefaultPayment pgtype.Int8 CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type UserAddress struct { UserID int64 AddressID int64 DefaultAddress pgtype.Int8 CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } ================================================ FILE: internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/go/query.sql.go ================================================ // 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 updateUserAddressWithAddress = `-- name: UpdateUserAddressWithAddress :one WITH t1 AS ( UPDATE "address" as a SET address_line = COALESCE($1,address_line), region = COALESCE($2,region), city= COALESCE($3,city) WHERE id = COALESCE($4,id) RETURNING a.id, a.address_line, a.region, a.city ), t2 AS ( UPDATE "user_address" SET default_address = COALESCE($5,default_address) WHERE user_id = COALESCE($6,user_id) AND address_id = COALESCE($7,address_id) RETURNING user_id, address_id, default_address ) SELECT user_id, address_id, default_address, address_line, region, city From t1,t2 ` type UpdateUserAddressWithAddressParams struct { AddressLine pgtype.Text Region pgtype.Text City pgtype.Text ID pgtype.Int8 DefaultAddress pgtype.Int8 UserID pgtype.Int8 AddressID pgtype.Int8 } type UpdateUserAddressWithAddressRow struct { UserID int64 AddressID int64 DefaultAddress pgtype.Int8 AddressLine string Region string City string } func (q *Queries) UpdateUserAddressWithAddress(ctx context.Context, arg UpdateUserAddressWithAddressParams) (UpdateUserAddressWithAddressRow, error) { row := q.db.QueryRow(ctx, updateUserAddressWithAddress, arg.AddressLine, arg.Region, arg.City, arg.ID, arg.DefaultAddress, arg.UserID, arg.AddressID, ) var i UpdateUserAddressWithAddressRow err := row.Scan( &i.UserID, &i.AddressID, &i.DefaultAddress, &i.AddressLine, &i.Region, &i.City, ) return i, err } ================================================ FILE: internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/query.sql ================================================ -- name: UpdateUserAddressWithAddress :one WITH t1 AS ( UPDATE "address" as a SET address_line = COALESCE(sqlc.narg(address_line),address_line), region = COALESCE(sqlc.narg(region),region), city= COALESCE(sqlc.narg(city),city) WHERE id = COALESCE(sqlc.arg(id),id) RETURNING a.id, a.address_line, a.region, a.city ), t2 AS ( UPDATE "user_address" SET default_address = COALESCE(sqlc.narg(default_address),default_address) WHERE user_id = COALESCE(sqlc.arg(user_id),user_id) AND address_id = COALESCE(sqlc.arg(address_id),address_id) RETURNING user_id, address_id, default_address ) SELECT user_id, address_id, default_address, address_line, region, city From t1,t2; ================================================ FILE: internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/schema.sql ================================================ CREATE TABLE "user" ( "id" bigserial PRIMARY KEY NOT NULL, "username" varchar NOT NULL, "email" varchar UNIQUE NOT NULL, "password" varchar NOT NULL, "telephone" int NOT NULL DEFAULT 0, "default_payment" bigint, "created_at" timestamptz NOT NULL DEFAULT (now()), "updated_at" timestamptz NOT NULL DEFAULT '0001-01-01 00:00:00Z' ); CREATE TABLE "address" ( "id" bigserial PRIMARY KEY NOT NULL, "address_line" varchar NOT NULL, "region" varchar NOT NULL, "city" varchar NOT NULL, "created_at" timestamptz NOT NULL DEFAULT (now()), "updated_at" timestamptz NOT NULL DEFAULT '0001-01-01 00:00:00Z' ); CREATE TABLE "user_address" ( "user_id" bigint NOT NULL, "address_id" bigint UNIQUE NOT NULL, "default_address" bigint, "created_at" timestamptz NOT NULL DEFAULT (now()), "updated_at" timestamptz NOT NULL DEFAULT '0001-01-01 00:00:00Z' ); ================================================ FILE: internal/endtoend/testdata/cte_update_multiple/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/cte_with_in/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/2153 ================================================ FILE: internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type L struct { ID int64 ParentID pgtype.Int4 } type T struct { ID int64 LID pgtype.Int4 F pgtype.Text } ================================================ FILE: internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/go/query.sql.go ================================================ // 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 getAll = `-- name: GetAll :many SELECT id, parent_id FROM L ` func (q *Queries) GetAll(ctx context.Context) ([]L, error) { rows, err := q.db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []L for rows.Next() { var i L if err := rows.Scan(&i.ID, &i.ParentID); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getAll1 = `-- name: GetAll1 :many with recursive cte as ( select id, L_ID, F from T union all select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 ) select id, l_id, f from cte ` type GetAll1Row struct { ID int64 LID pgtype.Int4 F pgtype.Text } func (q *Queries) GetAll1(ctx context.Context, lID pgtype.Int4) ([]GetAll1Row, error) { rows, err := q.db.Query(ctx, getAll1, lID) if err != nil { return nil, err } defer rows.Close() var items []GetAll1Row for rows.Next() { var i GetAll1Row if err := rows.Scan(&i.ID, &i.LID, &i.F); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getAll2 = `-- name: GetAll2 :many with recursive cte as ( select id, L_ID, F from T where T.ID=2 union all select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 ) select id, l_id, f from cte ` type GetAll2Row struct { ID int64 LID pgtype.Int4 F pgtype.Text } func (q *Queries) GetAll2(ctx context.Context, lID pgtype.Int4) ([]GetAll2Row, error) { rows, err := q.db.Query(ctx, getAll2, lID) if err != nil { return nil, err } defer rows.Close() var items []GetAll2Row for rows.Next() { var i GetAll2Row if err := rows.Scan(&i.ID, &i.LID, &i.F); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getAll3 = `-- name: GetAll3 :many select id from T where L_ID in( with recursive cte as ( select id, L_ID, F from T where T.ID =2 union all select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 ) select l_id from cte ) ` func (q *Queries) GetAll3(ctx context.Context, dollar_1 pgtype.Int4) ([]int64, error) { rows, err := q.db.Query(ctx, getAll3, dollar_1) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getAll4 = `-- name: GetAll4 :many select id from T where L_ID in( with recursive L as ( select id, L_ID, F from T where T.ID =2 union all select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 ) select l_id from L ) ` func (q *Queries) GetAll4(ctx context.Context, lID pgtype.Int4) ([]int64, error) { rows, err := q.db.Query(ctx, getAll4, lID) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/query.sql ================================================ -- name: GetAll :many SELECT * FROM L; -- name: GetAll1 :many with recursive cte as ( select id, L_ID, F from T union all select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 ) select id, l_id, f from cte; -- name: GetAll2 :many with recursive cte as ( select id, L_ID, F from T where T.ID=2 union all select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 ) select id, l_id, f from cte; -- name: GetAll4 :many select id from T where L_ID in( with recursive L as ( select id, L_ID, F from T where T.ID =2 union all select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 ) select l_id from L ); -- name: GetAll3 :many select id from T where L_ID in( with recursive cte as ( select id, L_ID, F from T where T.ID =2 union all select c.id, c.L_ID, c.F from T as c where c.L_ID = $1 ) select l_id from cte ); ================================================ FILE: internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/schema.sql ================================================ -- https://github.com/sqlc-dev/sqlc/issues/2153 CREATE TABLE L ( id BIGSERIAL PRIMARY KEY, parent_id int null ); CREATE TABLE T ( id BIGSERIAL PRIMARY KEY, L_ID int, F varchar(256) ); ================================================ FILE: internal/endtoend/testdata/cte_with_in/postgresql/pganalyze/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "sql_package": "pgx/v5" } ] } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/mysql/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/mysql/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" ) type Bar struct { ColA sql.NullBool ColB sql.NullBool ColC sql.NullBool } type Foo struct { ColA bool ColB bool ColC bool } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/mysql/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const listBar = `-- name: ListBar :many SELECT col_a, col_b, col_c FROM bar ` func (q *Queries) ListBar(ctx context.Context) ([]Bar, error) { rows, err := q.db.QueryContext(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []Bar for rows.Next() { var i Bar if err := rows.Scan(&i.ColA, &i.ColB, &i.ColC); 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 listFoo = `-- name: ListFoo :many SELECT col_a, col_b, col_c FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.ColA, &i.ColB, &i.ColC); 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 } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/mysql/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; -- name: ListBar :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/data_type_boolean/mysql/schema.sql ================================================ CREATE TABLE foo ( col_a BOOL NOT NULL, col_b BOOLEAN NOT NULL, col_c TINYINT(1) NOT NULL ); CREATE TABLE bar ( col_a BOOL, col_b BOOLEAN, col_c TINYINT(1) ); ================================================ FILE: internal/endtoend/testdata/data_type_boolean/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "db", "engine": "mysql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ColA sql.NullBool ColB sql.NullBool } type Foo struct { ColA bool ColB bool } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/go/query.sql.go ================================================ // 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 col_a, col_b FROM bar ` func (q *Queries) ListBar(ctx context.Context) ([]Bar, error) { rows, err := q.db.Query(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []Bar for rows.Next() { var i Bar if err := rows.Scan(&i.ColA, &i.ColB); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listFoo = `-- name: ListFoo :many SELECT col_a, col_b FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.ColA, &i.ColB); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; -- name: ListBar :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo ( col_a BOOL NOT NULL, col_b BOOLEAN NOT NULL ); CREATE TABLE bar ( col_a BOOL, col_b BOOLEAN ); ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Bar struct { ColA pgtype.Bool ColB pgtype.Bool } type Foo struct { ColA bool ColB bool } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 col_a, col_b FROM bar ` func (q *Queries) ListBar(ctx context.Context) ([]Bar, error) { rows, err := q.db.Query(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []Bar for rows.Next() { var i Bar if err := rows.Scan(&i.ColA, &i.ColB); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listFoo = `-- name: ListFoo :many SELECT col_a, col_b FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.ColA, &i.ColB); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; -- name: ListBar :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo ( col_a BOOL NOT NULL, col_b BOOLEAN NOT NULL ); CREATE TABLE bar ( col_a BOOL, col_b BOOLEAN ); ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ColA sql.NullBool ColB sql.NullBool } type Foo struct { ColA bool ColB bool } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/go/query.sql.go ================================================ // 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 col_a, col_b FROM bar ` func (q *Queries) ListBar(ctx context.Context) ([]Bar, error) { rows, err := q.db.QueryContext(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []Bar for rows.Next() { var i Bar if err := rows.Scan(&i.ColA, &i.ColB); 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 listFoo = `-- name: ListFoo :many SELECT col_a, col_b FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.ColA, &i.ColB); 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 } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; -- name: ListBar :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo ( col_a BOOL NOT NULL, col_b BOOLEAN NOT NULL ); CREATE TABLE bar ( col_a BOOL, col_b BOOLEAN ); ================================================ FILE: internal/endtoend/testdata/data_type_boolean/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/sqlite/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/sqlite/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" ) type Bar struct { ColA sql.NullBool ColB sql.NullBool } type Foo struct { ColA bool ColB bool } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/sqlite/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const listBar = `-- name: ListBar :many SELECT col_a, col_b FROM bar ` func (q *Queries) ListBar(ctx context.Context) ([]Bar, error) { rows, err := q.db.QueryContext(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []Bar for rows.Next() { var i Bar if err := rows.Scan(&i.ColA, &i.ColB); 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 listFoo = `-- name: ListFoo :many SELECT col_a, col_b FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.ColA, &i.ColB); 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 } ================================================ FILE: internal/endtoend/testdata/data_type_boolean/sqlite/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; -- name: ListBar :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/data_type_boolean/sqlite/schema.sql ================================================ CREATE TABLE foo ( col_a BOOL NOT NULL, col_b BOOLEAN NOT NULL ); CREATE TABLE bar ( col_a BOOL, col_b BOOLEAN ); ================================================ FILE: internal/endtoend/testdata/data_type_boolean/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "db", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/datatype/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/datatype/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype import ( "database/sql" "time" ) type DtCharacter struct { A sql.NullString B sql.NullString C sql.NullString D sql.NullString E sql.NullString F sql.NullString G sql.NullString H sql.NullString I sql.NullString J sql.NullString K sql.NullString L sql.NullString } type DtCharacterNotNull struct { A string B string C string D []byte E []byte F []byte G string H string I string J []byte K string L []byte } type DtDatetime struct { A sql.NullTime B sql.NullTime C sql.NullTime } type DtDatetimeNotNull struct { A time.Time B time.Time C time.Time } type DtNumeric struct { A sql.NullInt32 B sql.NullInt32 C sql.NullInt16 D sql.NullInt16 E sql.NullInt32 F sql.NullInt64 G interface{} H sql.NullString I sql.NullString J sql.NullFloat64 K sql.NullFloat64 L sql.NullFloat64 } type DtNumericNotNull struct { A int32 B int32 C int8 D int16 E int32 F int64 G interface{} H string I string J float64 K float64 L float64 } type DtNumericUnsigned struct { A sql.NullInt32 B sql.NullInt32 C sql.NullInt16 D sql.NullInt16 E sql.NullInt32 F sql.NullInt64 } ================================================ FILE: internal/endtoend/testdata/datatype/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/datatype/mysql/sql/character.sql ================================================ -- Character Types -- https://dev.mysql.com/doc/refman/8.0/en/string-type-syntax.html CREATE TABLE dt_character ( a CHARACTER(32), b VARCHAR(32), c CHAR(32), d BINARY(32), e VARBINARY(32), f TINYBLOB, g TINYTEXT, h TEXT, i MEDIUMTEXT, j MEDIUMBLOB, k LONGTEXT, l LONGBLOB ); CREATE TABLE dt_character_not_null ( a CHARACTER(32) NOT NULL, b VARCHAR(32) NOT NULL, c CHAR(32) NOT NULL, d BINARY(32) NOT NULL, e VARBINARY(32) NOT NULL, f TINYBLOB NOT NULL, g TINYTEXT NOT NULL, h TEXT NOT NULL, i MEDIUMTEXT NOT NULL, j MEDIUMBLOB NOT NULL, k LONGTEXT NOT NULL, l LONGBLOB NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/mysql/sql/datetime.sql ================================================ -- Date/Time Types -- https://www.sqlite.org/datatype3.html CREATE TABLE dt_datetime ( a DATE, b DATETIME, c TIMESTAMP ); CREATE TABLE dt_datetime_not_null ( a DATE NOT NULL, b DATETIME NOT NULL, c TIMESTAMP NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/mysql/sql/numeric.sql ================================================ -- Numeric Types -- https://dev.mysql.com/doc/refman/8.0/en/numeric-type-syntax.html CREATE TABLE dt_numeric ( a INT, b INTEGER, c TINYINT, d SMALLINT, e MEDIUMINT, f BIGINT, g BIT, h DECIMAL(10, 5), i DEC(10, 5), j FLOAT, k DOUBLE, l DOUBLE PRECISION ); CREATE TABLE dt_numeric_unsigned ( a INT UNSIGNED, b INTEGER UNSIGNED, c TINYINT UNSIGNED, d SMALLINT UNSIGNED, e MEDIUMINT UNSIGNED, f BIGINT UNSIGNED ); CREATE TABLE dt_numeric_not_null ( a INT NOT NULL, b INTEGER NOT NULL, c TINYINT NOT NULL, d SMALLINT NOT NULL, e MEDIUMINT NOT NULL, f BIGINT NOT NULL, g BIT NOT NULL, h DECIMAL(10, 5) NOT NULL, i DEC(10, 5) NOT NULL, j FLOAT NOT NULL, k DOUBLE NOT NULL, l DOUBLE PRECISION NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/mysql/sql/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/datatype/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "datatype", "schema": "sql/", "queries": "sql/" } ] } ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v4/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype 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, } } ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype import ( "database/sql" "time" "github.com/jackc/pgtype" ) type DtCharacter struct { A sql.NullString B sql.NullString C sql.NullString D sql.NullString E sql.NullString } type DtCharacterNotNull struct { A string B string C string D string E string } type DtDatetime struct { A sql.NullTime B sql.NullTime C sql.NullTime D sql.NullTime E sql.NullTime F sql.NullTime G sql.NullTime H sql.NullTime } type DtDatetimeNotNull struct { A time.Time B time.Time C time.Time D time.Time E time.Time F time.Time G time.Time H time.Time } type DtNetType struct { A pgtype.Inet B pgtype.CIDR C pgtype.Macaddr } type DtNetTypesNotNull struct { A pgtype.Inet B pgtype.CIDR C pgtype.Macaddr } type DtNumeric struct { A sql.NullInt16 B sql.NullInt32 C sql.NullInt64 D pgtype.Numeric E pgtype.Numeric F sql.NullFloat64 G sql.NullFloat64 H sql.NullInt16 I sql.NullInt32 J sql.NullInt64 K sql.NullInt16 L sql.NullInt32 M sql.NullInt64 } type DtNumericNotNull struct { A int16 B int32 C int64 D pgtype.Numeric E pgtype.Numeric F float32 G float64 H int16 I int32 J int64 K int16 L int32 M int64 } type DtRange struct { A pgtype.Int4range B pgtype.Int8range C pgtype.Numrange D pgtype.Tsrange E pgtype.Tstzrange F pgtype.Daterange } type DtRangeNotNull struct { A pgtype.Int4range B pgtype.Int8range C pgtype.Numrange D pgtype.Tsrange E pgtype.Tstzrange F pgtype.Daterange } ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v4/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v4/sql/character.sql ================================================ -- Character Types -- https://www.postgresql.org/docs/current/datatype-character.html CREATE TABLE dt_character ( a text, b character varying(32), c varchar(32), d character(32), e char(32) ); CREATE TABLE dt_character_not_null ( a text NOT NULL, b character varying(32) NOT NULL, c varchar(32) NOT NULL, d character(32) NOT NULL, e char(32) NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v4/sql/datetime.sql ================================================ -- Date/Time Types -- https://www.postgresql.org/docs/current/datatype-datetime.html CREATE TABLE dt_datetime ( a DATE, b TIME, c TIME WITHOUT TIME ZONE, d TIME WITH TIME ZONE, e TIMESTAMP, f TIMESTAMP WITHOUT TIME ZONE, g TIMESTAMP WITH TIME ZONE, h timestamptz ); CREATE TABLE dt_datetime_not_null ( a DATE NOT NULL, b TIME NOT NULL, c TIME WITHOUT TIME ZONE NOT NULL, d TIME WITH TIME ZONE NOT NULL, e TIMESTAMP NOT NULL, f TIMESTAMP WITHOUT TIME ZONE NOT NULL, g TIMESTAMP WITH TIME ZONE NOT NULL, h timestamptz NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v4/sql/net-types.sql ================================================ -- Network Address Types -- https://www.postgresql.org/docs/current/datatype-net-types.html CREATE TABLE dt_net_types ( a inet, b cidr, c macaddr ); CREATE TABLE dt_net_types_not_null ( a inet NOT NULL, b cidr NOT NULL, c macaddr NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v4/sql/numeric.sql ================================================ -- Numeric Types -- https://www.postgresql.org/docs/current/datatype-numeric.html CREATE TABLE dt_numeric ( -- TODO: this maps incorrectly to int16, not NullInt16 a smallint, b integer, c bigint, d decimal, e numeric, f real, g double precision, -- TODO: this maps incorrectly to int16, not NullInt16 h smallserial, i serial, j bigserial, -- TODO: this maps incorrectly to int16, not NullInt16 k int2, l int4, m int8 ); CREATE TABLE dt_numeric_not_null ( a smallint NOT NULL, b integer NOT NULL, c bigint NOT NULL, d decimal NOT NULL, e numeric NOT NULL, f real NOT NULL, g double precision NOT NULL, h smallserial NOT NULL, i serial NOT NULL, j bigserial NOT NULL, k int2 NOT NULL, l int4 NOT NULL, m int8 NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v4/sql/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v4/sql/rangetypes.sql ================================================ -- Range Types -- https://www.postgresql.org/docs/current/rangetypes.html CREATE TABLE dt_range ( a int4range, b int8range, c numrange, d tsrange, e tstzrange, f daterange ); CREATE TABLE dt_range_not_null ( a int4range NOT NULL, b int8range NOT NULL, c numrange NOT NULL, d tsrange NOT NULL, e tstzrange NOT NULL, f daterange NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "datatype", "schema": "sql/", "queries": "sql/" } ] } ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v5/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype 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, } } ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype import ( "database/sql" "net" "net/netip" "time" "github.com/jackc/pgx/v5/pgtype" ) type DtCharacter struct { A pgtype.Text B pgtype.Text C pgtype.Text D pgtype.Text E pgtype.Text } type DtCharacterNotNull struct { A string B string C string D string E string } type DtDatetime struct { A pgtype.Date B pgtype.Time C pgtype.Time D sql.NullTime E pgtype.Timestamp F pgtype.Timestamp G pgtype.Timestamptz H pgtype.Timestamptz } type DtDatetimeNotNull struct { A pgtype.Date B pgtype.Time C pgtype.Time D time.Time E pgtype.Timestamp F pgtype.Timestamp G pgtype.Timestamptz H pgtype.Timestamptz } type DtNetType struct { A *netip.Addr B *netip.Prefix C net.HardwareAddr } type DtNetTypesNotNull struct { A netip.Addr B netip.Prefix C net.HardwareAddr } type DtNumeric struct { A pgtype.Int2 B pgtype.Int4 C pgtype.Int8 D pgtype.Numeric E pgtype.Numeric F pgtype.Float4 G pgtype.Float8 H pgtype.Int2 I pgtype.Int4 J pgtype.Int8 K pgtype.Int2 L pgtype.Int4 M pgtype.Int8 } type DtNumericNotNull struct { A int16 B int32 C int64 D pgtype.Numeric E pgtype.Numeric F float32 G float64 H int16 I int32 J int64 K int16 L int32 M int64 } type DtRange struct { A pgtype.Range[pgtype.Int4] B pgtype.Range[pgtype.Int8] C pgtype.Range[pgtype.Numeric] D pgtype.Range[pgtype.Timestamp] E pgtype.Range[pgtype.Timestamptz] F pgtype.Range[pgtype.Date] } type DtRangeNotNull struct { A pgtype.Range[pgtype.Int4] B pgtype.Range[pgtype.Int8] C pgtype.Range[pgtype.Numeric] D pgtype.Range[pgtype.Timestamp] E pgtype.Range[pgtype.Timestamptz] F pgtype.Range[pgtype.Date] } ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v5/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v5/sql/character.sql ================================================ -- Character Types -- https://www.postgresql.org/docs/current/datatype-character.html CREATE TABLE dt_character ( a text, b character varying(32), c varchar(32), d character(32), e char(32) ); CREATE TABLE dt_character_not_null ( a text NOT NULL, b character varying(32) NOT NULL, c varchar(32) NOT NULL, d character(32) NOT NULL, e char(32) NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v5/sql/datetime.sql ================================================ -- Date/Time Types -- https://www.postgresql.org/docs/current/datatype-datetime.html CREATE TABLE dt_datetime ( a DATE, b TIME, c TIME WITHOUT TIME ZONE, d TIME WITH TIME ZONE, e TIMESTAMP, f TIMESTAMP WITHOUT TIME ZONE, g TIMESTAMP WITH TIME ZONE, h timestamptz ); CREATE TABLE dt_datetime_not_null ( a DATE NOT NULL, b TIME NOT NULL, c TIME WITHOUT TIME ZONE NOT NULL, d TIME WITH TIME ZONE NOT NULL, e TIMESTAMP NOT NULL, f TIMESTAMP WITHOUT TIME ZONE NOT NULL, g TIMESTAMP WITH TIME ZONE NOT NULL, h timestamptz NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v5/sql/net-types.sql ================================================ -- Network Address Types -- https://www.postgresql.org/docs/current/datatype-net-types.html CREATE TABLE dt_net_types ( a inet, b cidr, c macaddr ); CREATE TABLE dt_net_types_not_null ( a inet NOT NULL, b cidr NOT NULL, c macaddr NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v5/sql/numeric.sql ================================================ -- Numeric Types -- https://www.postgresql.org/docs/current/datatype-numeric.html CREATE TABLE dt_numeric ( -- TODO: this maps incorrectly to int16, not NullInt16 a smallint, b integer, c bigint, d decimal, e numeric, f real, g double precision, -- TODO: this maps incorrectly to int16, not NullInt16 h smallserial, i serial, j bigserial, -- TODO: this maps incorrectly to int16, not NullInt16 k int2, l int4, m int8 ); CREATE TABLE dt_numeric_not_null ( a smallint NOT NULL, b integer NOT NULL, c bigint NOT NULL, d decimal NOT NULL, e numeric NOT NULL, f real NOT NULL, g double precision NOT NULL, h smallserial NOT NULL, i serial NOT NULL, j bigserial NOT NULL, k int2 NOT NULL, l int4 NOT NULL, m int8 NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v5/sql/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v5/sql/rangetypes.sql ================================================ -- Range Types -- https://www.postgresql.org/docs/current/rangetypes.html CREATE TABLE dt_range ( a int4range, b int8range, c numrange, d tsrange, e tstzrange, f daterange ); CREATE TABLE dt_range_not_null ( a int4range NOT NULL, b int8range NOT NULL, c numrange NOT NULL, d tsrange NOT NULL, e tstzrange NOT NULL, f daterange NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "datatype", "schema": "sql/", "queries": "sql/" } ] } ================================================ FILE: internal/endtoend/testdata/datatype/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/datatype/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype import ( "database/sql" "time" ) type DtCharacter struct { A sql.NullString B sql.NullString C sql.NullString D sql.NullString E sql.NullString F sql.NullString G sql.NullString H sql.NullString } type DtCharacterNotNull struct { A string B string C string D string E string F string G string H string } type DtDatetime struct { A sql.NullTime B sql.NullTime C sql.NullTime } type DtDatetimeNotNull struct { A time.Time B time.Time C time.Time } type DtNumeric struct { A sql.NullInt64 B sql.NullInt64 C sql.NullInt64 D sql.NullInt64 E sql.NullInt64 F sql.NullInt64 G sql.NullInt64 H sql.NullInt64 I sql.NullInt64 J sql.NullFloat64 K sql.NullFloat64 L sql.NullFloat64 M sql.NullFloat64 N sql.NullFloat64 O sql.NullFloat64 } type DtNumericNotNull struct { A int64 B int64 C int64 D int64 E int64 F int64 G int64 H int64 I int64 J float64 K float64 L float64 M float64 N float64 O float64 } ================================================ FILE: internal/endtoend/testdata/datatype/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/datatype/sqlite/sql/character.sql ================================================ -- Character Types -- https://www.sqlite.org/datatype3.html CREATE TABLE dt_character ( a CHARACTER(32), b VARCHAR(32), c VARYING CHARACTER(32), d NCHAR(32), e NATIVE CHARACTER(32), f NVARCHAR(32), g TEXT, h CLOB ); CREATE TABLE dt_character_not_null ( a CHARACTER(32) NOT NULL, b VARCHAR(32) NOT NULL, c VARYING CHARACTER(32) NOT NULL, d NCHAR(32) NOT NULL, e NATIVE CHARACTER(32) NOT NULL, f NVARCHAR(32) NOT NULL, g TEXT NOT NULL, h CLOB NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/sqlite/sql/datetime.sql ================================================ -- Date/Time Types -- https://www.sqlite.org/datatype3.html CREATE TABLE dt_datetime ( a DATE, b DATETIME, c TIMESTAMP ); CREATE TABLE dt_datetime_not_null ( a DATE NOT NULL, b DATETIME NOT NULL, c TIMESTAMP NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/sqlite/sql/numeric.sql ================================================ -- Numeric Types -- https://www.sqlite.org/datatype3.html CREATE TABLE dt_numeric ( a INT, b INTEGER, c TINYINT, d SMALLINT, e MEDIUMINT, f BIGINT, g UNSIGNED BIG INT, h INT2, i INT8, j REAL, k DOUBLE, l DOUBLE PRECISION, m FLOAT, n NUMERIC, o DECIMAL(10,5) ); CREATE TABLE dt_numeric_not_null ( a INT NOT NULL, b INTEGER NOT NULL, c TINYINT NOT NULL, d SMALLINT NOT NULL, e MEDIUMINT NOT NULL, f BIGINT NOT NULL, g UNSIGNED BIG INT NOT NULL, h INT2 NOT NULL, i INT8 NOT NULL, j REAL NOT NULL, k DOUBLE NOT NULL, l DOUBLE PRECISION NOT NULL, m FLOAT NOT NULL, n NUMERIC NOT NULL, o DECIMAL(10,5) NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/sqlite/sql/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/datatype/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "datatype", "schema": "sql/", "queries": "sql/" } ] } ================================================ FILE: internal/endtoend/testdata/datatype/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/datatype/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype import ( "database/sql" "time" "github.com/sqlc-dev/pqtype" ) type DtCharacter struct { A sql.NullString B sql.NullString C sql.NullString D sql.NullString E sql.NullString } type DtCharacterNotNull struct { A string B string C string D string E string } type DtDatetime struct { A sql.NullTime B sql.NullTime C sql.NullTime D sql.NullTime E sql.NullTime F sql.NullTime G sql.NullTime H sql.NullTime } type DtDatetimeNotNull struct { A time.Time B time.Time C time.Time D time.Time E time.Time F time.Time G time.Time H time.Time } type DtNetType struct { A pqtype.Inet B pqtype.CIDR C pqtype.Macaddr } type DtNetTypesNotNull struct { A pqtype.Inet B pqtype.CIDR C pqtype.Macaddr } type DtNumeric struct { A sql.NullInt16 B sql.NullInt32 C sql.NullInt64 D sql.NullString E sql.NullString F sql.NullFloat64 G sql.NullFloat64 H sql.NullInt16 I sql.NullInt32 J sql.NullInt64 K sql.NullInt16 L sql.NullInt32 M sql.NullInt64 } type DtNumericNotNull struct { A int16 B int32 C int64 D string E string F float32 G float64 H int16 I int32 J int64 K int16 L int32 M int64 } type DtRange struct { A interface{} B interface{} C interface{} D interface{} E interface{} F interface{} } type DtRangeNotNull struct { A interface{} B interface{} C interface{} D interface{} E interface{} F interface{} } ================================================ FILE: internal/endtoend/testdata/datatype/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/datatype/stdlib/sql/character.sql ================================================ -- Character Types -- https://www.postgresql.org/docs/current/datatype-character.html CREATE TABLE dt_character ( a text, b character varying(32), c varchar(32), d character(32), e char(32) ); CREATE TABLE dt_character_not_null ( a text NOT NULL, b character varying(32) NOT NULL, c varchar(32) NOT NULL, d character(32) NOT NULL, e char(32) NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/stdlib/sql/datetime.sql ================================================ -- Date/Time Types -- https://www.postgresql.org/docs/current/datatype-datetime.html CREATE TABLE dt_datetime ( a DATE, b TIME, c TIME WITHOUT TIME ZONE, d TIME WITH TIME ZONE, e TIMESTAMP, f TIMESTAMP WITHOUT TIME ZONE, g TIMESTAMP WITH TIME ZONE, h timestamptz ); CREATE TABLE dt_datetime_not_null ( a DATE NOT NULL, b TIME NOT NULL, c TIME WITHOUT TIME ZONE NOT NULL, d TIME WITH TIME ZONE NOT NULL, e TIMESTAMP NOT NULL, f TIMESTAMP WITHOUT TIME ZONE NOT NULL, g TIMESTAMP WITH TIME ZONE NOT NULL, h timestamptz NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/stdlib/sql/net-types.sql ================================================ -- Network Address Types -- https://www.postgresql.org/docs/current/datatype-net-types.html CREATE TABLE dt_net_types ( a inet, b cidr, c macaddr ); CREATE TABLE dt_net_types_not_null ( a inet NOT NULL, b cidr NOT NULL, c macaddr NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/stdlib/sql/numeric.sql ================================================ -- Numeric Types -- https://www.postgresql.org/docs/current/datatype-numeric.html CREATE TABLE dt_numeric ( -- TODO: this maps incorrectly to int16, not NullInt16 a smallint, b integer, c bigint, d decimal, e numeric, f real, g double precision, -- TODO: this maps incorrectly to int16, not NullInt16 h smallserial, i serial, j bigserial, -- TODO: this maps incorrectly to int16, not NullInt16 k int2, l int4, m int8 ); CREATE TABLE dt_numeric_not_null ( a smallint NOT NULL, b integer NOT NULL, c bigint NOT NULL, d decimal NOT NULL, e numeric NOT NULL, f real NOT NULL, g double precision NOT NULL, h smallserial NOT NULL, i serial NOT NULL, j bigserial NOT NULL, k int2 NOT NULL, l int4 NOT NULL, m int8 NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/stdlib/sql/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/datatype/stdlib/sql/rangetypes.sql ================================================ -- Range Types -- https://www.postgresql.org/docs/current/rangetypes.html CREATE TABLE dt_range ( a int4range, b int8range, c numrange, d tsrange, e tstzrange, f daterange ); CREATE TABLE dt_range_not_null ( a int4range NOT NULL, b int8range NOT NULL, c numrange NOT NULL, d tsrange NOT NULL, e tstzrange NOT NULL, f daterange NOT NULL ); ================================================ FILE: internal/endtoend/testdata/datatype/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "datatype", "schema": "sql/", "queries": "sql/" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1519 ================================================ FILE: internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type ComputedTablesSomething struct { ID pgtype.Int4 EventType string CreatedAt pgtype.Timestamptz } type Event struct { ID pgtype.Int4 EventType string CreatedAt pgtype.Timestamptz } ================================================ FILE: internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/go/query.sql.go ================================================ // 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 someQuery = `-- name: SomeQuery :many select id from "computed_tables"."something" ` func (q *Queries) SomeQuery(ctx context.Context) ([]pgtype.Int4, error) { rows, err := q.db.Query(ctx, someQuery) if err != nil { return nil, err } defer rows.Close() var items []pgtype.Int4 for rows.Next() { var id pgtype.Int4 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/query.sql ================================================ -- name: SomeQuery :many select id from "computed_tables"."something"; ================================================ FILE: internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/schema.sql ================================================ create table events ( id int, event_type text not null, created_at timestamptz ); CREATE MATERIALIZED VIEW something AS select * from events where event_type = 'sale' order by created_at desc; create schema computed_tables; alter materialized view something set schema computed_tables; ================================================ FILE: internal/endtoend/testdata/ddl_alter_materialized_views_set_schema/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar string Baz sql.NullInt32 Bio sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/mysql/query.sql ================================================ /* name: Placeholder :exec */ SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/mysql/schema.sql ================================================ CREATE TABLE foo (bar text NOT NULL); ALTER TABLE foo ADD COLUMN baz integer; ALTER TABLE foo ADD bio integer; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar string Baz sql.NullInt32 Bio sql.NullInt32 Foobar []int32 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text NOT NULL); ALTER TABLE foo ADD COLUMN baz int; ALTER TABLE foo ADD bio int; ALTER TABLE foo ADD COLUMN foobar int[]; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar string Baz pgtype.Int4 Bio pgtype.Int4 Foobar []int32 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text NOT NULL); ALTER TABLE foo ADD COLUMN baz int; ALTER TABLE foo ADD bio int; ALTER TABLE foo ADD COLUMN foobar int[]; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar string Baz sql.NullInt32 Bio sql.NullInt32 Foobar []int32 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text NOT NULL); ALTER TABLE foo ADD COLUMN baz int; ALTER TABLE foo ADD bio int; ALTER TABLE foo ADD COLUMN foobar int[]; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Venue struct { Name sql.NullString Location sql.NullString Size sql.NullInt64 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const placeholder = `-- name: Placeholder :many SELECT name, location, size from venues ` func (q *Queries) Placeholder(ctx context.Context) ([]Venue, error) { rows, err := q.db.QueryContext(ctx, placeholder) if err != nil { return nil, err } defer rows.Close() var items []Venue for rows.Next() { var i Venue if err := rows.Scan(&i.Name, &i.Location, &i.Size); 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/query.sql ================================================ /* name: Placeholder :many */ SELECT * from venues; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/schema.sql ================================================ CREATE TABLE venues (name text); ALTER TABLE venues ADD location text; ALTER TABLE venues ADD COLUMN size integer; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar string Baz string } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text NOT NULL, baz text NOT NULL); ALTER TABLE foo ADD COLUMN IF NOT EXISTS bar text; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar string Baz string } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text NOT NULL, baz text NOT NULL); ALTER TABLE foo ADD COLUMN IF NOT EXISTS bar text; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar string Baz string } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text NOT NULL, baz text NOT NULL); ALTER TABLE foo ADD COLUMN IF NOT EXISTS bar text; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_add_column_if_not_exists/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullInt32 Baz sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/query.sql ================================================ /* name: Placeholder :exec */ SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/schema.sql ================================================ CREATE TABLE foo (bar text NOT NULL, baz text NOT NULL); ALTER TABLE foo MODIFY COLUMN bar integer; ALTER TABLE foo MODIFY baz integer; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar []string } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar TEXT); ALTER TABLE foo ALTER bar TYPE TEXT ARRAY USING bar::text[]; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar []string } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar TEXT); ALTER TABLE foo ALTER bar TYPE TEXT ARRAY USING bar::text[]; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar []string } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (bar TEXT); ALTER TABLE foo ALTER bar TYPE TEXT ARRAY USING bar::text[]; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_alter_type/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/query.sql ================================================ -- name: InsertUser :exec INSERT INTO Users (full_name, "EmailAddress", created_at) VALUES (?, ?, ?); -- name: SelectUsers :many SELECT id, full_name, "EmailAddress", created_at FROM Users; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/schema.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_case_sensitivity/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Baz sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/mysql/query.sql ================================================ /* name: Placeholder :exec */ SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/mysql/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo CHANGE COLUMN bar baz text; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Baz string } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text NOT NULL); ALTER TABLE foo RENAME COLUMN bar TO baz; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Baz string } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text NOT NULL); ALTER TABLE foo RENAME COLUMN bar TO baz; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Baz string } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text NOT NULL); ALTER TABLE foo RENAME COLUMN bar TO baz; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_change_column/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString Baz sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/query.sql ================================================ /* name: Placeholder :exec */ SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/schema.sql ================================================ CREATE TABLE foo (bar text NOT NULL, baz text NOT NULL); ALTER TABLE foo MODIFY COLUMN bar text; ALTER TABLE foo MODIFY baz text; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString Baz sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text NOT NULL, baz text NOT NULL); ALTER TABLE foo ALTER COLUMN bar DROP NOT NULL; ALTER TABLE foo ALTER baz DROP NOT NULL; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar pgtype.Text Baz pgtype.Text } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text NOT NULL, baz text NOT NULL); ALTER TABLE foo ALTER COLUMN bar DROP NOT NULL; ALTER TABLE foo ALTER baz DROP NOT NULL; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullString Baz sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text NOT NULL, baz text NOT NULL); ALTER TABLE foo ALTER COLUMN bar DROP NOT NULL; ALTER TABLE foo ALTER baz DROP NOT NULL; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_column_drop_not_null/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Baz sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/query.sql ================================================ /* name: Placeholder :exec */ SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/schema.sql ================================================ CREATE TABLE foo (bar text, baz text); ALTER TABLE foo DROP COLUMN bar; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Baz sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text, baz text); ALTER TABLE foo DROP COLUMN bar; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Baz pgtype.Text } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text, baz text); ALTER TABLE foo DROP COLUMN bar; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Baz sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text, baz text); ALTER TABLE foo DROP COLUMN bar; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Baz sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/go/query.sql.go ================================================ // 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 baz from foo ` func (q *Queries) Placeholder(ctx context.Context) error { _, err := q.db.ExecContext(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/query.sql ================================================ -- name: Placeholder :exec SELECT * from foo; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/schema.sql ================================================ CREATE TABLE foo (bar text, baz text); ALTER TABLE foo DROP COLUMN bar; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/exec.json ================================================ { "contexts": ["base"], "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/query.sql ================================================ /* name: Placeholder :exec */ SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo DROP COLUMN IF EXISTS bar; ALTER TABLE foo DROP COLUMN IF EXISTS bar; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo DROP COLUMN IF EXISTS bar; ALTER TABLE foo DROP COLUMN IF EXISTS bar; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo DROP COLUMN IF EXISTS bar; ALTER TABLE foo DROP COLUMN IF EXISTS bar; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo DROP COLUMN IF EXISTS bar; ALTER TABLE foo DROP COLUMN IF EXISTS bar; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_column_if_exists/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/exec.json ================================================ { "contexts": ["base"], "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Venue struct { ID uint64 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/query.sql ================================================ /* name: Placeholder :exec */ SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/schema.sql ================================================ CREATE TABLE venues (id SERIAL PRIMARY KEY); ALTER TABLE venues DROP CONSTRAINT venues_id_pkey; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Venue struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE venues (id SERIAL PRIMARY KEY); ALTER TABLE venues DROP CONSTRAINT venues_pkey; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Venue struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE venues (id SERIAL PRIMARY KEY); ALTER TABLE venues DROP CONSTRAINT venues_pkey; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Venue struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/schema.sql ================================================ CREATE TABLE venues (id SERIAL PRIMARY KEY); ALTER TABLE venues DROP CONSTRAINT venues_pkey; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_drop_constraint/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/schema.sql ================================================ ALTER TABLE IF EXISTS foo ADD COLUMN bar integer; ALTER TABLE IF EXISTS bar RENAME COLUMN bar TO baz; ALTER TABLE IF EXISTS bat RENAME CONSTRAINT bar TO baz; ALTER TABLE IF EXISTS baz RENAME TO bar; ALTER TABLE IF EXISTS goo SET SCHEMA bar; ALTER TABLE IF EXISTS gob ATTACH PARTITION partition_name DEFAULT; ALTER TABLE IF EXISTS doo DETACH PARTITION partition_name; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/schema.sql ================================================ ALTER TABLE IF EXISTS foo ADD COLUMN bar integer; ALTER TABLE IF EXISTS bar RENAME COLUMN bar TO baz; ALTER TABLE IF EXISTS bat RENAME CONSTRAINT bar TO baz; ALTER TABLE IF EXISTS baz RENAME TO bar; ALTER TABLE IF EXISTS goo SET SCHEMA bar; ALTER TABLE IF EXISTS gob ATTACH PARTITION partition_name DEFAULT; ALTER TABLE IF EXISTS doo DETACH PARTITION partition_name; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/schema.sql ================================================ ALTER TABLE IF EXISTS foo ADD COLUMN bar integer; ALTER TABLE IF EXISTS bar RENAME COLUMN bar TO baz; ALTER TABLE IF EXISTS bat RENAME CONSTRAINT bar TO baz; ALTER TABLE IF EXISTS baz RENAME TO bar; ALTER TABLE IF EXISTS goo SET SCHEMA bar; ALTER TABLE IF EXISTS gob ATTACH PARTITION partition_name DEFAULT; ALTER TABLE IF EXISTS doo DETACH PARTITION partition_name; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_if_exists/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "time" ) type Measurement struct { CityID int32 Logdate time.Time Peaktemp sql.NullInt32 Unitsales sql.NullInt32 } type MeasurementY2006m02 struct { CityID int32 Logdate time.Time Peaktemp sql.NullInt32 Unitsales sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE measurement ( city_id int not null, logdate date not null, peaktemp int, unitsales int ) PARTITION BY RANGE (logdate); CREATE TABLE measurement_y2006m02 PARTITION OF measurement FOR VALUES FROM ('2006-02-01') TO ('2006-03-01'); CREATE INDEX measurement_usls_idx ON ONLY measurement (unitsales); CREATE INDEX measurement_usls_200602_idx ON measurement_y2006m02 (unitsales); ALTER INDEX measurement_usls_idx ATTACH PARTITION measurement_usls_200602_idx; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Measurement struct { CityID int32 Logdate pgtype.Date Peaktemp pgtype.Int4 Unitsales pgtype.Int4 } type MeasurementY2006m02 struct { CityID int32 Logdate pgtype.Date Peaktemp pgtype.Int4 Unitsales pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE measurement ( city_id int not null, logdate date not null, peaktemp int, unitsales int ) PARTITION BY RANGE (logdate); CREATE TABLE measurement_y2006m02 PARTITION OF measurement FOR VALUES FROM ('2006-02-01') TO ('2006-03-01'); CREATE INDEX measurement_usls_idx ON ONLY measurement (unitsales); CREATE INDEX measurement_usls_200602_idx ON measurement_y2006m02 (unitsales); ALTER INDEX measurement_usls_idx ATTACH PARTITION measurement_usls_200602_idx; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "time" ) type Measurement struct { CityID int32 Logdate time.Time Peaktemp sql.NullInt32 Unitsales sql.NullInt32 } type MeasurementY2006m02 struct { CityID int32 Logdate time.Time Peaktemp sql.NullInt32 Unitsales sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/schema.sql ================================================ CREATE TABLE measurement ( city_id int not null, logdate date not null, peaktemp int, unitsales int ) PARTITION BY RANGE (logdate); CREATE TABLE measurement_y2006m02 PARTITION OF measurement FOR VALUES FROM ('2006-02-01') TO ('2006-03-01'); CREATE INDEX measurement_usls_idx ON ONLY measurement (unitsales); CREATE INDEX measurement_usls_200602_idx ON measurement_y2006m02 (unitsales); ALTER INDEX measurement_usls_idx ATTACH PARTITION measurement_usls_200602_idx; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_index/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Arena struct { Name sql.NullString } type Location struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/mysql/query.sql ================================================ /* name: Placeholder :exec */ SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/mysql/schema.sql ================================================ CREATE TABLE venues (name text); ALTER TABLE venues RENAME TO arenas; CREATE TABLE cities (name text); RENAME TABLE cities TO locations; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Arena struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE venues (name text); ALTER TABLE venues RENAME TO arenas; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Arena struct { Name pgtype.Text } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE venues (name text); ALTER TABLE venues RENAME TO arenas; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Arena struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/schema.sql ================================================ CREATE TABLE venues (name text); ALTER TABLE venues RENAME TO arenas; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Arena struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const placeholder = `-- name: Placeholder :many SELECT name from arenas ` func (q *Queries) Placeholder(ctx context.Context) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, placeholder) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var name sql.NullString if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/sqlite/query.sql ================================================ /* name: Placeholder :many */ SELECT * from arenas; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/sqlite/schema.sql ================================================ CREATE TABLE venues (name text); ALTER TABLE venues RENAME TO arenas; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Baz sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/query.sql ================================================ /* name: Placeholder :exec */ SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo RENAME COLUMN bar TO baz; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Baz sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo RENAME bar TO baz; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Baz pgtype.Text } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo RENAME bar TO baz; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Baz sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo RENAME bar TO baz; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Boo sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const placeholder = `-- name: Placeholder :many SELECT boo from foo ` func (q *Queries) Placeholder(ctx context.Context) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, placeholder) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var boo sql.NullString if err := rows.Scan(&boo); err != nil { return nil, err } items = append(items, boo) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/query.sql ================================================ /* name: Placeholder :many */ SELECT * from foo; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo RENAME COLUMN bar TO baz; ALTER TABLE foo RENAME baz TO boo; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_rename_column/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo MODIFY bar integer; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullBool } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo ALTER bar SET DATA TYPE bool USING bar::boolean; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar pgtype.Bool } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo ALTER bar SET DATA TYPE bool USING bar::boolean; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullBool } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo ALTER bar SET DATA TYPE bool USING bar::boolean; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_data_type/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar string } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo MODIFY bar text NOT NULL; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar string } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo ALTER bar SET NOT NULL; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar string } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo ALTER bar SET NOT NULL; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar string } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text); ALTER TABLE foo ALTER bar SET NOT NULL; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_not_null/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/mysql/README.md ================================================ MySQL does not implement `ALTER TABLE ... SET SCHEMA`. ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type FooBar struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getFooBar = `-- name: GetFooBar :exec SELECT name FROM foo.bar ` func (q *Queries) GetFooBar(ctx context.Context) error { _, err := q.db.Exec(ctx, getFooBar) return err } const updateFooBar = `-- name: UpdateFooBar :exec UPDATE foo.bar SET name = $1 ` func (q *Queries) UpdateFooBar(ctx context.Context, name sql.NullString) error { _, err := q.db.Exec(ctx, updateFooBar, name) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/query.sql ================================================ -- name: GetFooBar :exec SELECT * FROM foo.bar; -- name: UpdateFooBar :exec UPDATE foo.bar SET name = $1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE bar (name text); ALTER TABLE bar SET SCHEMA foo; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type FooBar struct { Name pgtype.Text } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 getFooBar = `-- name: GetFooBar :exec SELECT name FROM foo.bar ` func (q *Queries) GetFooBar(ctx context.Context) error { _, err := q.db.Exec(ctx, getFooBar) return err } const updateFooBar = `-- name: UpdateFooBar :exec UPDATE foo.bar SET name = $1 ` func (q *Queries) UpdateFooBar(ctx context.Context, name pgtype.Text) error { _, err := q.db.Exec(ctx, updateFooBar, name) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/query.sql ================================================ -- name: GetFooBar :exec SELECT * FROM foo.bar; -- name: UpdateFooBar :exec UPDATE foo.bar SET name = $1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE bar (name text); ALTER TABLE bar SET SCHEMA foo; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type FooBar struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getFooBar = `-- name: GetFooBar :exec SELECT name FROM foo.bar ` func (q *Queries) GetFooBar(ctx context.Context) error { _, err := q.db.ExecContext(ctx, getFooBar) return err } const updateFooBar = `-- name: UpdateFooBar :exec UPDATE foo.bar SET name = $1 ` func (q *Queries) UpdateFooBar(ctx context.Context, name sql.NullString) error { _, err := q.db.ExecContext(ctx, updateFooBar, name) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/query.sql ================================================ -- name: GetFooBar :exec SELECT * FROM foo.bar; -- name: UpdateFooBar :exec UPDATE foo.bar SET name = $1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE bar (name text); ALTER TABLE bar SET SCHEMA foo; ================================================ FILE: internal/endtoend/testdata/ddl_alter_table_set_schema/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/mysql/README.md ================================================ MySQL does not support `CREATE TYPE ... AS ENUM`. Instead, enumerations are defined via the `ENUM` type directly in table columns. https://dev.mysql.com/doc/refman/8.0/en/enum.html ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type Status string const ( StatusOpen Status = "open" StatusClosed Status = "closed" StatusUnknown Status = "unknown" ) func (e *Status) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Status(s) case string: *e = Status(s) default: return fmt.Errorf("unsupported scan type for Status: %T", src) } return nil } type NullStatus struct { Status Status Valid bool // Valid is true if Status is not NULL } // Scan implements the Scanner interface. func (ns *NullStatus) Scan(value interface{}) error { if value == nil { ns.Status, ns.Valid = "", false return nil } ns.Valid = true return ns.Status.Scan(value) } // Value implements the driver Valuer interface. func (ns NullStatus) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Status), nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/schema.sql ================================================ CREATE TYPE status AS ENUM ('open', 'closed'); ALTER TYPE status ADD VALUE 'unknown'; ALTER TYPE status ADD VALUE IF NOT EXISTS 'unknown'; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type Status string const ( StatusOpen Status = "open" StatusClosed Status = "closed" StatusUnknown Status = "unknown" ) func (e *Status) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Status(s) case string: *e = Status(s) default: return fmt.Errorf("unsupported scan type for Status: %T", src) } return nil } type NullStatus struct { Status Status Valid bool // Valid is true if Status is not NULL } // Scan implements the Scanner interface. func (ns *NullStatus) Scan(value interface{}) error { if value == nil { ns.Status, ns.Valid = "", false return nil } ns.Valid = true return ns.Status.Scan(value) } // Value implements the driver Valuer interface. func (ns NullStatus) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Status), nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/schema.sql ================================================ CREATE TYPE status AS ENUM ('open', 'closed'); ALTER TYPE status ADD VALUE 'unknown'; ALTER TYPE status ADD VALUE IF NOT EXISTS 'unknown'; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type Status string const ( StatusOpen Status = "open" StatusClosed Status = "closed" StatusUnknown Status = "unknown" ) func (e *Status) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Status(s) case string: *e = Status(s) default: return fmt.Errorf("unsupported scan type for Status: %T", src) } return nil } type NullStatus struct { Status Status Valid bool // Valid is true if Status is not NULL } // Scan implements the Scanner interface. func (ns *NullStatus) Scan(value interface{}) error { if value == nil { ns.Status, ns.Valid = "", false return nil } ns.Valid = true return ns.Status.Scan(value) } // Value implements the driver Valuer interface. func (ns NullStatus) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Status), nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/schema.sql ================================================ CREATE TYPE status AS ENUM ('open', 'closed'); ALTER TYPE status ADD VALUE 'unknown'; ALTER TYPE status ADD VALUE IF NOT EXISTS 'unknown'; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_add_value/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type NewEvent string const ( NewEventSTART NewEvent = "START" NewEventSTOP NewEvent = "STOP" ) func (e *NewEvent) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = NewEvent(s) case string: *e = NewEvent(s) default: return fmt.Errorf("unsupported scan type for NewEvent: %T", src) } return nil } type NullNewEvent struct { NewEvent NewEvent Valid bool // Valid is true if NewEvent is not NULL } // Scan implements the Scanner interface. func (ns *NullNewEvent) Scan(value interface{}) error { if value == nil { ns.NewEvent, ns.Valid = "", false return nil } ns.Valid = true return ns.NewEvent.Scan(value) } // Value implements the driver Valuer interface. func (ns NullNewEvent) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.NewEvent), nil } type LogLine struct { ID int64 Status NewEvent } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthors = `-- name: ListAuthors :many SELECT id, status FROM log_lines ` func (q *Queries) ListAuthors(ctx context.Context) ([]LogLine, error) { rows, err := q.db.Query(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []LogLine for rows.Next() { var i LogLine if err := rows.Scan(&i.ID, &i.Status); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM log_lines; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/schema.sql ================================================ CREATE TYPE event AS enum ('START', 'STOP'); ALTER TYPE event RENAME TO "new_event"; CREATE TABLE log_lines ( id BIGSERIAL PRIMARY KEY, status "new_event" NOT NULL ); ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type NewEvent string const ( NewEventSTART NewEvent = "START" NewEventSTOP NewEvent = "STOP" ) func (e *NewEvent) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = NewEvent(s) case string: *e = NewEvent(s) default: return fmt.Errorf("unsupported scan type for NewEvent: %T", src) } return nil } type NullNewEvent struct { NewEvent NewEvent Valid bool // Valid is true if NewEvent is not NULL } // Scan implements the Scanner interface. func (ns *NullNewEvent) Scan(value interface{}) error { if value == nil { ns.NewEvent, ns.Valid = "", false return nil } ns.Valid = true return ns.NewEvent.Scan(value) } // Value implements the driver Valuer interface. func (ns NullNewEvent) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.NewEvent), nil } type LogLine struct { ID int64 Status NewEvent } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthors = `-- name: ListAuthors :many SELECT id, status FROM log_lines ` func (q *Queries) ListAuthors(ctx context.Context) ([]LogLine, error) { rows, err := q.db.Query(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []LogLine for rows.Next() { var i LogLine if err := rows.Scan(&i.ID, &i.Status); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM log_lines; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/schema.sql ================================================ CREATE TYPE event AS enum ('START', 'STOP'); ALTER TYPE event RENAME TO "new_event"; CREATE TABLE log_lines ( id BIGSERIAL PRIMARY KEY, status "new_event" NOT NULL ); ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type NewEvent string const ( NewEventSTART NewEvent = "START" NewEventSTOP NewEvent = "STOP" ) func (e *NewEvent) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = NewEvent(s) case string: *e = NewEvent(s) default: return fmt.Errorf("unsupported scan type for NewEvent: %T", src) } return nil } type NullNewEvent struct { NewEvent NewEvent Valid bool // Valid is true if NewEvent is not NULL } // Scan implements the Scanner interface. func (ns *NullNewEvent) Scan(value interface{}) error { if value == nil { ns.NewEvent, ns.Valid = "", false return nil } ns.Valid = true return ns.NewEvent.Scan(value) } // Value implements the driver Valuer interface. func (ns NullNewEvent) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.NewEvent), nil } type LogLine struct { ID int64 Status NewEvent } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthors = `-- name: ListAuthors :many SELECT id, status FROM log_lines ` func (q *Queries) ListAuthors(ctx context.Context) ([]LogLine, error) { rows, err := q.db.QueryContext(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []LogLine for rows.Next() { var i LogLine if err := rows.Scan(&i.ID, &i.Status); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM log_lines; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/schema.sql ================================================ CREATE TYPE event AS enum ('START', 'STOP'); ALTER TYPE event RENAME TO "new_event"; CREATE TABLE log_lines ( id BIGSERIAL PRIMARY KEY, status "new_event" NOT NULL ); ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type NewEvent string const ( NewEventSTART NewEvent = "START" NewEventSTOP NewEvent = "STOP" ) func (e *NewEvent) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = NewEvent(s) case string: *e = NewEvent(s) default: return fmt.Errorf("unsupported scan type for NewEvent: %T", src) } return nil } type NullNewEvent struct { NewEvent NewEvent Valid bool // Valid is true if NewEvent is not NULL } // Scan implements the Scanner interface. func (ns *NullNewEvent) Scan(value interface{}) error { if value == nil { ns.NewEvent, ns.Valid = "", false return nil } ns.Valid = true return ns.NewEvent.Scan(value) } // Value implements the driver Valuer interface. func (ns NullNewEvent) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.NewEvent), nil } type LogLine struct { ID int64 Status NewEvent } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthors = `-- name: ListAuthors :many SELECT id, status FROM log_lines ` func (q *Queries) ListAuthors(ctx context.Context) ([]LogLine, error) { rows, err := q.db.Query(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []LogLine for rows.Next() { var i LogLine if err := rows.Scan(&i.ID, &i.Status); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM log_lines; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/schema.sql ================================================ CREATE TYPE event AS enum ('START', 'STOP'); CREATE TABLE log_lines ( id BIGSERIAL PRIMARY KEY, status "event" NOT NULL ); ALTER TYPE event RENAME TO "new_event"; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type NewEvent string const ( NewEventSTART NewEvent = "START" NewEventSTOP NewEvent = "STOP" ) func (e *NewEvent) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = NewEvent(s) case string: *e = NewEvent(s) default: return fmt.Errorf("unsupported scan type for NewEvent: %T", src) } return nil } type NullNewEvent struct { NewEvent NewEvent Valid bool // Valid is true if NewEvent is not NULL } // Scan implements the Scanner interface. func (ns *NullNewEvent) Scan(value interface{}) error { if value == nil { ns.NewEvent, ns.Valid = "", false return nil } ns.Valid = true return ns.NewEvent.Scan(value) } // Value implements the driver Valuer interface. func (ns NullNewEvent) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.NewEvent), nil } type LogLine struct { ID int64 Status NewEvent } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthors = `-- name: ListAuthors :many SELECT id, status FROM log_lines ` func (q *Queries) ListAuthors(ctx context.Context) ([]LogLine, error) { rows, err := q.db.Query(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []LogLine for rows.Next() { var i LogLine if err := rows.Scan(&i.ID, &i.Status); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM log_lines; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/schema.sql ================================================ CREATE TYPE event AS enum ('START', 'STOP'); CREATE TABLE log_lines ( id BIGSERIAL PRIMARY KEY, status "event" NOT NULL ); ALTER TYPE event RENAME TO "new_event"; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type NewEvent string const ( NewEventSTART NewEvent = "START" NewEventSTOP NewEvent = "STOP" ) func (e *NewEvent) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = NewEvent(s) case string: *e = NewEvent(s) default: return fmt.Errorf("unsupported scan type for NewEvent: %T", src) } return nil } type NullNewEvent struct { NewEvent NewEvent Valid bool // Valid is true if NewEvent is not NULL } // Scan implements the Scanner interface. func (ns *NullNewEvent) Scan(value interface{}) error { if value == nil { ns.NewEvent, ns.Valid = "", false return nil } ns.Valid = true return ns.NewEvent.Scan(value) } // Value implements the driver Valuer interface. func (ns NullNewEvent) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.NewEvent), nil } type LogLine struct { ID int64 Status NewEvent } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthors = `-- name: ListAuthors :many SELECT id, status FROM log_lines ` func (q *Queries) ListAuthors(ctx context.Context) ([]LogLine, error) { rows, err := q.db.QueryContext(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []LogLine for rows.Next() { var i LogLine if err := rows.Scan(&i.ID, &i.Status); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM log_lines; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/schema.sql ================================================ CREATE TYPE event AS enum ('START', 'STOP'); CREATE TABLE log_lines ( id BIGSERIAL PRIMARY KEY, status "event" NOT NULL ); ALTER TYPE event RENAME TO "new_event"; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_and_update_columns/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/mysql/README.md ================================================ MySQL does not support `CREATE TYPE ... AS ENUM`. Instead, enumerations are defined via the `ENUM` type directly in table columns. https://dev.mysql.com/doc/refman/8.0/en/enum.html ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type Status string const ( StatusOpen Status = "open" StatusShut Status = "shut" ) func (e *Status) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Status(s) case string: *e = Status(s) default: return fmt.Errorf("unsupported scan type for Status: %T", src) } return nil } type NullStatus struct { Status Status Valid bool // Valid is true if Status is not NULL } // Scan implements the Scanner interface. func (ns *NullStatus) Scan(value interface{}) error { if value == nil { ns.Status, ns.Valid = "", false return nil } ns.Valid = true return ns.Status.Scan(value) } // Value implements the driver Valuer interface. func (ns NullStatus) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Status), nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/schema.sql ================================================ CREATE TYPE status AS ENUM ('open', 'closed'); ALTER TYPE status RENAME VALUE 'closed' TO 'shut'; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type Status string const ( StatusOpen Status = "open" StatusShut Status = "shut" ) func (e *Status) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Status(s) case string: *e = Status(s) default: return fmt.Errorf("unsupported scan type for Status: %T", src) } return nil } type NullStatus struct { Status Status Valid bool // Valid is true if Status is not NULL } // Scan implements the Scanner interface. func (ns *NullStatus) Scan(value interface{}) error { if value == nil { ns.Status, ns.Valid = "", false return nil } ns.Valid = true return ns.Status.Scan(value) } // Value implements the driver Valuer interface. func (ns NullStatus) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Status), nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/schema.sql ================================================ CREATE TYPE status AS ENUM ('open', 'closed'); ALTER TYPE status RENAME VALUE 'closed' TO 'shut'; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type Status string const ( StatusOpen Status = "open" StatusShut Status = "shut" ) func (e *Status) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Status(s) case string: *e = Status(s) default: return fmt.Errorf("unsupported scan type for Status: %T", src) } return nil } type NullStatus struct { Status Status Valid bool // Valid is true if Status is not NULL } // Scan implements the Scanner interface. func (ns *NullStatus) Scan(value interface{}) error { if value == nil { ns.Status, ns.Valid = "", false return nil } ns.Valid = true return ns.Status.Scan(value) } // Value implements the driver Valuer interface. func (ns NullStatus) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Status), nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/schema.sql ================================================ CREATE TYPE status AS ENUM ('open', 'closed'); ALTER TYPE status RENAME VALUE 'closed' TO 'shut'; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_rename_value/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type Level string const ( LevelDEBUG Level = "DEBUG" LevelINFO Level = "INFO" LevelWARN Level = "WARN" LevelERROR Level = "ERROR" LevelFATAL Level = "FATAL" ) func (e *Level) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Level(s) case string: *e = Level(s) default: return fmt.Errorf("unsupported scan type for Level: %T", src) } return nil } type NullLevel struct { Level Level Valid bool // Valid is true if Level is not NULL } // Scan implements the Scanner interface. func (ns *NullLevel) Scan(value interface{}) error { if value == nil { ns.Level, ns.Valid = "", false return nil } ns.Valid = true return ns.Level.Scan(value) } // Value implements the driver Valuer interface. func (ns NullLevel) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Level), nil } type NewEvent string const ( NewEventSTART NewEvent = "START" NewEventSTOP NewEvent = "STOP" ) func (e *NewEvent) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = NewEvent(s) case string: *e = NewEvent(s) default: return fmt.Errorf("unsupported scan type for NewEvent: %T", src) } return nil } type NullNewEvent struct { NewEvent NewEvent Valid bool // Valid is true if NewEvent is not NULL } // Scan implements the Scanner interface. func (ns *NullNewEvent) Scan(value interface{}) error { if value == nil { ns.NewEvent, ns.Valid = "", false return nil } ns.Valid = true return ns.NewEvent.Scan(value) } // Value implements the driver Valuer interface. func (ns NullNewEvent) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.NewEvent), nil } type LogLine struct { ID int64 Status NewEvent Level Level } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthors = `-- name: ListAuthors :many SELECT id, status, level FROM log_lines ` func (q *Queries) ListAuthors(ctx context.Context) ([]LogLine, error) { rows, err := q.db.Query(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []LogLine for rows.Next() { var i LogLine if err := rows.Scan(&i.ID, &i.Status, &i.Level); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM log_lines; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/schema.sql ================================================ CREATE SCHEMA old; CREATE SCHEMA new; CREATE TYPE event AS enum ('START', 'STOP'); CREATE TYPE old.level AS enum ('DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL'); CREATE TABLE log_lines ( id BIGSERIAL PRIMARY KEY, status event NOT NULL, level old.level NOT NULL ); ALTER TYPE event SET SCHEMA new; ALTER TYPE old.level SET SCHEMA public; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type Level string const ( LevelDEBUG Level = "DEBUG" LevelINFO Level = "INFO" LevelWARN Level = "WARN" LevelERROR Level = "ERROR" LevelFATAL Level = "FATAL" ) func (e *Level) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Level(s) case string: *e = Level(s) default: return fmt.Errorf("unsupported scan type for Level: %T", src) } return nil } type NullLevel struct { Level Level Valid bool // Valid is true if Level is not NULL } // Scan implements the Scanner interface. func (ns *NullLevel) Scan(value interface{}) error { if value == nil { ns.Level, ns.Valid = "", false return nil } ns.Valid = true return ns.Level.Scan(value) } // Value implements the driver Valuer interface. func (ns NullLevel) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Level), nil } type NewEvent string const ( NewEventSTART NewEvent = "START" NewEventSTOP NewEvent = "STOP" ) func (e *NewEvent) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = NewEvent(s) case string: *e = NewEvent(s) default: return fmt.Errorf("unsupported scan type for NewEvent: %T", src) } return nil } type NullNewEvent struct { NewEvent NewEvent Valid bool // Valid is true if NewEvent is not NULL } // Scan implements the Scanner interface. func (ns *NullNewEvent) Scan(value interface{}) error { if value == nil { ns.NewEvent, ns.Valid = "", false return nil } ns.Valid = true return ns.NewEvent.Scan(value) } // Value implements the driver Valuer interface. func (ns NullNewEvent) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.NewEvent), nil } type LogLine struct { ID int64 Status NewEvent Level Level } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthors = `-- name: ListAuthors :many SELECT id, status, level FROM log_lines ` func (q *Queries) ListAuthors(ctx context.Context) ([]LogLine, error) { rows, err := q.db.Query(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []LogLine for rows.Next() { var i LogLine if err := rows.Scan(&i.ID, &i.Status, &i.Level); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM log_lines; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/schema.sql ================================================ CREATE SCHEMA old; CREATE SCHEMA new; CREATE TYPE event AS enum ('START', 'STOP'); CREATE TYPE old.level AS enum ('DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL'); CREATE TABLE log_lines ( id BIGSERIAL PRIMARY KEY, status event NOT NULL, level old.level NOT NULL ); ALTER TYPE event SET SCHEMA new; ALTER TYPE old.level SET SCHEMA public; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type Level string const ( LevelDEBUG Level = "DEBUG" LevelINFO Level = "INFO" LevelWARN Level = "WARN" LevelERROR Level = "ERROR" LevelFATAL Level = "FATAL" ) func (e *Level) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Level(s) case string: *e = Level(s) default: return fmt.Errorf("unsupported scan type for Level: %T", src) } return nil } type NullLevel struct { Level Level Valid bool // Valid is true if Level is not NULL } // Scan implements the Scanner interface. func (ns *NullLevel) Scan(value interface{}) error { if value == nil { ns.Level, ns.Valid = "", false return nil } ns.Valid = true return ns.Level.Scan(value) } // Value implements the driver Valuer interface. func (ns NullLevel) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Level), nil } type NewEvent string const ( NewEventSTART NewEvent = "START" NewEventSTOP NewEvent = "STOP" ) func (e *NewEvent) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = NewEvent(s) case string: *e = NewEvent(s) default: return fmt.Errorf("unsupported scan type for NewEvent: %T", src) } return nil } type NullNewEvent struct { NewEvent NewEvent Valid bool // Valid is true if NewEvent is not NULL } // Scan implements the Scanner interface. func (ns *NullNewEvent) Scan(value interface{}) error { if value == nil { ns.NewEvent, ns.Valid = "", false return nil } ns.Valid = true return ns.NewEvent.Scan(value) } // Value implements the driver Valuer interface. func (ns NullNewEvent) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.NewEvent), nil } type LogLine struct { ID int64 Status NewEvent Level Level } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthors = `-- name: ListAuthors :many SELECT id, status, level FROM log_lines ` func (q *Queries) ListAuthors(ctx context.Context) ([]LogLine, error) { rows, err := q.db.QueryContext(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []LogLine for rows.Next() { var i LogLine if err := rows.Scan(&i.ID, &i.Status, &i.Level); 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 } ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM log_lines; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/schema.sql ================================================ CREATE SCHEMA old; CREATE SCHEMA new; CREATE TYPE event AS enum ('START', 'STOP'); CREATE TYPE old.level AS enum ('DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL'); CREATE TABLE log_lines ( id BIGSERIAL PRIMARY KEY, status event NOT NULL, level old.level NOT NULL ); ALTER TYPE event SET SCHEMA new; ALTER TYPE old.level SET SCHEMA public; ================================================ FILE: internal/endtoend/testdata/ddl_alter_type_set_schema/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_comment/mysql/README.md ================================================ MySQL does not support the `COMMENT ON` statmement. Instead, comments can be added to columns and tables at creation time. ================================================ FILE: internal/endtoend/testdata/ddl_comment/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_comment/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) // Table comment type Bar struct { // Column comment Baz sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_comment/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_comment/mysql/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_comment/mysql/schema.sql ================================================ CREATE TABLE bar ( baz text COMMENT "Column comment" ) COMMENT="Table comment"; ================================================ FILE: internal/endtoend/testdata/ddl_comment/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "database/sql/driver" "fmt" ) // Enum comment type FooBat string const ( FooBatBat FooBat = "bat" ) func (e *FooBat) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = FooBat(s) case string: *e = FooBat(s) default: return fmt.Errorf("unsupported scan type for FooBat: %T", src) } return nil } type NullFooBat struct { FooBat FooBat Valid bool // Valid is true if FooBat is not NULL } // Scan implements the Scanner interface. func (ns *NullFooBat) Scan(value interface{}) error { if value == nil { ns.FooBat, ns.Valid = "", false return nil } ns.Valid = true return ns.FooBat.Scan(value) } // Value implements the driver Valuer interface. func (ns NullFooBat) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.FooBat), nil } // Table comment type FooBar struct { // Column comment Baz sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (baz text); CREATE TYPE foo.bat AS ENUM ('bat'); COMMENT ON SCHEMA foo IS 'Schema comment'; COMMENT ON TABLE foo.bar IS 'Table comment'; COMMENT ON COLUMN foo.bar.baz IS 'Column comment'; COMMENT ON TYPE foo.bat IS 'Enum comment'; ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" "github.com/jackc/pgx/v5/pgtype" ) // Enum comment type FooBat string const ( FooBatBat FooBat = "bat" ) func (e *FooBat) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = FooBat(s) case string: *e = FooBat(s) default: return fmt.Errorf("unsupported scan type for FooBat: %T", src) } return nil } type NullFooBat struct { FooBat FooBat Valid bool // Valid is true if FooBat is not NULL } // Scan implements the Scanner interface. func (ns *NullFooBat) Scan(value interface{}) error { if value == nil { ns.FooBat, ns.Valid = "", false return nil } ns.Valid = true return ns.FooBat.Scan(value) } // Value implements the driver Valuer interface. func (ns NullFooBat) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.FooBat), nil } // Table comment type FooBar struct { // Column comment Baz pgtype.Text } ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (baz text); CREATE TYPE foo.bat AS ENUM ('bat'); COMMENT ON SCHEMA foo IS 'Schema comment'; COMMENT ON TABLE foo.bar IS 'Table comment'; COMMENT ON COLUMN foo.bar.baz IS 'Column comment'; COMMENT ON TYPE foo.bat IS 'Enum comment'; ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "database/sql/driver" "fmt" ) // Enum comment type FooBat string const ( FooBatBat FooBat = "bat" ) func (e *FooBat) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = FooBat(s) case string: *e = FooBat(s) default: return fmt.Errorf("unsupported scan type for FooBat: %T", src) } return nil } type NullFooBat struct { FooBat FooBat Valid bool // Valid is true if FooBat is not NULL } // Scan implements the Scanner interface. func (ns *NullFooBat) Scan(value interface{}) error { if value == nil { ns.FooBat, ns.Valid = "", false return nil } ns.Valid = true return ns.FooBat.Scan(value) } // Value implements the driver Valuer interface. func (ns NullFooBat) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.FooBat), nil } // Table comment type FooBar struct { // Column comment Baz sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/stdlib/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (baz text); CREATE TYPE foo.bat AS ENUM ('bat'); COMMENT ON SCHEMA foo IS 'Schema comment'; COMMENT ON TABLE foo.bar IS 'Table comment'; COMMENT ON COLUMN foo.bar.baz IS 'Column comment'; COMMENT ON TYPE foo.bat IS 'Enum comment'; ================================================ FILE: internal/endtoend/testdata/ddl_comment/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type FooDigit string const ( FooDigit0 FooDigit = "0" FooDigit1 FooDigit = "1" FooDigit2 FooDigit = "2" FooDigit3 FooDigit = "3" FooDigit4 FooDigit = "4" FooDigit5 FooDigit = "5" FooDigit6 FooDigit = "6" FooDigit7 FooDigit = "7" FooDigit8 FooDigit = "8" FooDigit9 FooDigit = "9" FooDigitValue10 FooDigit = "#" FooDigitValue11 FooDigit = "*" ) func (e *FooDigit) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = FooDigit(s) case string: *e = FooDigit(s) default: return fmt.Errorf("unsupported scan type for FooDigit: %T", src) } return nil } type NullFooDigit struct { FooDigit FooDigit Valid bool // Valid is true if FooDigit is not NULL } // Scan implements the Scanner interface. func (ns *NullFooDigit) Scan(value interface{}) error { if value == nil { ns.FooDigit, ns.Valid = "", false return nil } ns.Valid = true return ns.FooDigit.Scan(value) } // Value implements the driver Valuer interface. func (ns NullFooDigit) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.FooDigit), nil } type FooFoobar string const ( FooFoobarFooA FooFoobar = "foo-a" FooFoobarFooB FooFoobar = "foo_b" FooFoobarFooC FooFoobar = "foo:c" FooFoobarFooD FooFoobar = "foo/d" FooFoobarFooe FooFoobar = "foo@e" FooFoobarFoof FooFoobar = "foo+f" FooFoobarFoog FooFoobar = "foo!g" ) func (e *FooFoobar) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = FooFoobar(s) case string: *e = FooFoobar(s) default: return fmt.Errorf("unsupported scan type for FooFoobar: %T", src) } return nil } type NullFooFoobar struct { FooFoobar FooFoobar Valid bool // Valid is true if FooFoobar is not NULL } // Scan implements the Scanner interface. func (ns *NullFooFoobar) Scan(value interface{}) error { if value == nil { ns.FooFoobar, ns.Valid = "", false return nil } ns.Valid = true return ns.FooFoobar.Scan(value) } // Value implements the driver Valuer interface. func (ns NullFooFoobar) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.FooFoobar), nil } type Foo struct { Foobar FooFoobar Digit FooDigit } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listFoo = `-- name: ListFoo :many SELECT foobar, digit FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Foobar, &i.Digit); 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/mysql/query.sql ================================================ /* name: ListFoo :many */ SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/mysql/schema.sql ================================================ CREATE TABLE foo ( foobar ENUM ('foo-a', 'foo_b', 'foo:c', 'foo/d', 'foo@e', 'foo+f', 'foo!g') NOT NULL, digit ENUM ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '#', '*') NOT NULL ); ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type Digit string const ( Digit0 Digit = "0" Digit1 Digit = "1" Digit2 Digit = "2" Digit3 Digit = "3" Digit4 Digit = "4" Digit5 Digit = "5" Digit6 Digit = "6" Digit7 Digit = "7" Digit8 Digit = "8" Digit9 Digit = "9" DigitValue10 Digit = "#" DigitValue11 Digit = "*" ) func (e *Digit) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Digit(s) case string: *e = Digit(s) default: return fmt.Errorf("unsupported scan type for Digit: %T", src) } return nil } type NullDigit struct { Digit Digit Valid bool // Valid is true if Digit is not NULL } // Scan implements the Scanner interface. func (ns *NullDigit) Scan(value interface{}) error { if value == nil { ns.Digit, ns.Valid = "", false return nil } ns.Valid = true return ns.Digit.Scan(value) } // Value implements the driver Valuer interface. func (ns NullDigit) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Digit), nil } type Foobar string const ( FoobarFooA Foobar = "foo-a" FoobarFooB Foobar = "foo_b" FoobarFooC Foobar = "foo:c" FoobarFooD Foobar = "foo/d" FoobarFooe Foobar = "foo@e" FoobarFoof Foobar = "foo+f" FoobarFoog Foobar = "foo!g" ) func (e *Foobar) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Foobar(s) case string: *e = Foobar(s) default: return fmt.Errorf("unsupported scan type for Foobar: %T", src) } return nil } type NullFoobar struct { Foobar Foobar Valid bool // Valid is true if Foobar is not NULL } // Scan implements the Scanner interface. func (ns *NullFoobar) Scan(value interface{}) error { if value == nil { ns.Foobar, ns.Valid = "", false return nil } ns.Valid = true return ns.Foobar.Scan(value) } // Value implements the driver Valuer interface. func (ns NullFoobar) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Foobar), nil } type Foo struct { Val Foobar } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listFoo = `-- name: ListFoo :many SELECT val FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foobar, error) { rows, err := q.db.Query(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foobar for rows.Next() { var val Foobar if err := rows.Scan(&val); err != nil { return nil, err } items = append(items, val) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/schema.sql ================================================ CREATE TYPE foobar AS ENUM ( -- Valid separators 'foo-a', 'foo_b', 'foo:c', 'foo/d', -- Strip unknown characters 'foo@e', 'foo+f', 'foo!g' ); CREATE TYPE "digit" AS ENUM ( '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '#', '*' ); CREATE TABLE foo (val foobar NOT NULL); ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type Digit string const ( Digit0 Digit = "0" Digit1 Digit = "1" Digit2 Digit = "2" Digit3 Digit = "3" Digit4 Digit = "4" Digit5 Digit = "5" Digit6 Digit = "6" Digit7 Digit = "7" Digit8 Digit = "8" Digit9 Digit = "9" DigitValue10 Digit = "#" DigitValue11 Digit = "*" ) func (e *Digit) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Digit(s) case string: *e = Digit(s) default: return fmt.Errorf("unsupported scan type for Digit: %T", src) } return nil } type NullDigit struct { Digit Digit Valid bool // Valid is true if Digit is not NULL } // Scan implements the Scanner interface. func (ns *NullDigit) Scan(value interface{}) error { if value == nil { ns.Digit, ns.Valid = "", false return nil } ns.Valid = true return ns.Digit.Scan(value) } // Value implements the driver Valuer interface. func (ns NullDigit) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Digit), nil } type Foobar string const ( FoobarFooA Foobar = "foo-a" FoobarFooB Foobar = "foo_b" FoobarFooC Foobar = "foo:c" FoobarFooD Foobar = "foo/d" FoobarFooe Foobar = "foo@e" FoobarFoof Foobar = "foo+f" FoobarFoog Foobar = "foo!g" ) func (e *Foobar) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Foobar(s) case string: *e = Foobar(s) default: return fmt.Errorf("unsupported scan type for Foobar: %T", src) } return nil } type NullFoobar struct { Foobar Foobar Valid bool // Valid is true if Foobar is not NULL } // Scan implements the Scanner interface. func (ns *NullFoobar) Scan(value interface{}) error { if value == nil { ns.Foobar, ns.Valid = "", false return nil } ns.Valid = true return ns.Foobar.Scan(value) } // Value implements the driver Valuer interface. func (ns NullFoobar) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Foobar), nil } type Foo struct { Val Foobar } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listFoo = `-- name: ListFoo :many SELECT val FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foobar, error) { rows, err := q.db.Query(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foobar for rows.Next() { var val Foobar if err := rows.Scan(&val); err != nil { return nil, err } items = append(items, val) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/schema.sql ================================================ CREATE TYPE foobar AS ENUM ( -- Valid separators 'foo-a', 'foo_b', 'foo:c', 'foo/d', -- Strip unknown characters 'foo@e', 'foo+f', 'foo!g' ); CREATE TYPE "digit" AS ENUM ( '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '#', '*' ); CREATE TABLE foo (val foobar NOT NULL); ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type Digit string const ( Digit0 Digit = "0" Digit1 Digit = "1" Digit2 Digit = "2" Digit3 Digit = "3" Digit4 Digit = "4" Digit5 Digit = "5" Digit6 Digit = "6" Digit7 Digit = "7" Digit8 Digit = "8" Digit9 Digit = "9" DigitValue10 Digit = "#" DigitValue11 Digit = "*" ) func (e *Digit) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Digit(s) case string: *e = Digit(s) default: return fmt.Errorf("unsupported scan type for Digit: %T", src) } return nil } type NullDigit struct { Digit Digit Valid bool // Valid is true if Digit is not NULL } // Scan implements the Scanner interface. func (ns *NullDigit) Scan(value interface{}) error { if value == nil { ns.Digit, ns.Valid = "", false return nil } ns.Valid = true return ns.Digit.Scan(value) } // Value implements the driver Valuer interface. func (ns NullDigit) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Digit), nil } type Foobar string const ( FoobarFooA Foobar = "foo-a" FoobarFooB Foobar = "foo_b" FoobarFooC Foobar = "foo:c" FoobarFooD Foobar = "foo/d" FoobarFooe Foobar = "foo@e" FoobarFoof Foobar = "foo+f" FoobarFoog Foobar = "foo!g" ) func (e *Foobar) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Foobar(s) case string: *e = Foobar(s) default: return fmt.Errorf("unsupported scan type for Foobar: %T", src) } return nil } type NullFoobar struct { Foobar Foobar Valid bool // Valid is true if Foobar is not NULL } // Scan implements the Scanner interface. func (ns *NullFoobar) Scan(value interface{}) error { if value == nil { ns.Foobar, ns.Valid = "", false return nil } ns.Valid = true return ns.Foobar.Scan(value) } // Value implements the driver Valuer interface. func (ns NullFoobar) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Foobar), nil } type Foo struct { Val Foobar } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listFoo = `-- name: ListFoo :many SELECT val FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foobar, error) { rows, err := q.db.QueryContext(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foobar for rows.Next() { var val Foobar if err := rows.Scan(&val); err != nil { return nil, err } items = append(items, val) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/schema.sql ================================================ CREATE TYPE foobar AS ENUM ( -- Valid separators 'foo-a', 'foo_b', 'foo:c', 'foo/d', -- Strip unknown characters 'foo@e', 'foo+f', 'foo!g' ); CREATE TYPE "digit" AS ENUM ( '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '#', '*' ); CREATE TABLE foo (val foobar NOT NULL); ================================================ FILE: internal/endtoend/testdata/ddl_create_enum/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_func_exists/exec.json ================================================ { "contexts": ["base"], "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/ddl_create_func_exists/mysql/README.md ================================================ The MySQL parser currently does not support user-defined functions. See https://github.com/pingcap/parser/issues/988. ================================================ FILE: internal/endtoend/testdata/ddl_create_func_exists/query.sql ================================================ CREATE FUNCTION f(x TIMESTAMPTZ) RETURNS void AS '' LANGUAGE sql; CREATE FUNCTION f(x timestamp with time zone) RETURNS void AS '' LANGUAGE sql; -- name: F :one SELECT f(1); ================================================ FILE: internal/endtoend/testdata/ddl_create_func_exists/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "query.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_func_exists/stderr.txt ================================================ # package querytest query.sql:1:1: relation "f" already exists ================================================ FILE: internal/endtoend/testdata/ddl_create_function/mysql/README.md ================================================ The MySQL parser currently does not support user-defined functions. See https://github.com/pingcap/parser/issues/988. ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/schema.sql ================================================ CREATE FUNCTION foo(TEXT) RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/schema.sql ================================================ CREATE FUNCTION foo(TEXT) RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/schema.sql ================================================ CREATE FUNCTION foo(TEXT) RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; ================================================ FILE: internal/endtoend/testdata/ddl_create_function/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/mysql/README.md ================================================ The MySQL parser currently does not support user-defined functions. See https://github.com/pingcap/parser/issues/988. ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/schema.sql ================================================ CREATE FUNCTION foo(bar TEXT) RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; CREATE FUNCTION foo(bar TEXT, baz TEXT) RETURNS TEXT AS $$ SELECT "baz" $$ LANGUAGE sql; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/schema.sql ================================================ CREATE FUNCTION foo(bar TEXT) RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; CREATE FUNCTION foo(bar TEXT, baz TEXT) RETURNS TEXT AS $$ SELECT "baz" $$ LANGUAGE sql; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/schema.sql ================================================ CREATE FUNCTION foo(bar TEXT) RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; CREATE FUNCTION foo(bar TEXT, baz TEXT) RETURNS TEXT AS $$ SELECT "baz" $$ LANGUAGE sql; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_args/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/mysql/README.md ================================================ The MySQL parser currently does not support user-defined functions. See https://github.com/pingcap/parser/issues/988. ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/schema.sql ================================================ CREATE FUNCTION foo(bar TEXT, baz TEXT='baz') RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/schema.sql ================================================ CREATE FUNCTION foo(bar TEXT, baz TEXT='baz') RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/schema.sql ================================================ CREATE FUNCTION foo(bar TEXT, baz TEXT='baz') RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_return/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/mysql/README.md ================================================ The MySQL parser currently does not support user-defined functions. See https://github.com/pingcap/parser/issues/988. ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/schema.sql ================================================ CREATE FUNCTION foo(bar TEXT) RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; CREATE FUNCTION foo(bar INTEGER) RETURNS TEXT AS $$ SELECT 'baz' $$ LANGUAGE sql; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/schema.sql ================================================ CREATE FUNCTION foo(bar TEXT) RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; CREATE FUNCTION foo(bar INTEGER) RETURNS TEXT AS $$ SELECT 'baz' $$ LANGUAGE sql; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/schema.sql ================================================ CREATE FUNCTION foo(bar TEXT) RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; CREATE FUNCTION foo(bar INTEGER) RETURNS TEXT AS $$ SELECT 'baz' $$ LANGUAGE sql; ================================================ FILE: internal/endtoend/testdata/ddl_create_function_types/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Tbl struct { Value sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const callInsertData = `-- name: CallInsertData :exec CALL insert_data(?, ?) ` type CallInsertDataParams struct { A int32 B int32 } func (q *Queries) CallInsertData(ctx context.Context, arg CallInsertDataParams) error { _, err := q.db.ExecContext(ctx, callInsertData, arg.A, arg.B) return err } const callInsertDataNoArgs = `-- name: CallInsertDataNoArgs :exec CALL insert_data(1, 2) ` func (q *Queries) CallInsertDataNoArgs(ctx context.Context) error { _, err := q.db.ExecContext(ctx, callInsertDataNoArgs) return err } const callInsertDataSqlcArgs = `-- name: CallInsertDataSqlcArgs :exec CALL insert_data(?, ?) ` type CallInsertDataSqlcArgsParams struct { Foo int32 Bar int32 } func (q *Queries) CallInsertDataSqlcArgs(ctx context.Context, arg CallInsertDataSqlcArgsParams) error { _, err := q.db.ExecContext(ctx, callInsertDataSqlcArgs, arg.Foo, arg.Bar) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/mysql/query.sql ================================================ -- name: CallInsertData :exec CALL insert_data(?, ?); -- name: CallInsertDataNoArgs :exec CALL insert_data(1, 2); -- name: CallInsertDataSqlcArgs :exec CALL insert_data(sqlc.arg('foo'), sqlc.arg('bar')); ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/mysql/schema.sql ================================================ CREATE TABLE tbl ( value int ); CREATE PROCEDURE insert_data(a int, b int) BEGIN INSERT INTO tbl VALUES (a); INSERT INTO tbl VALUES (b); END; ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Tbl struct { Value sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const callInsertData = `-- name: CallInsertData :exec CALL insert_data($1, $2) ` type CallInsertDataParams struct { A int32 B int32 } func (q *Queries) CallInsertData(ctx context.Context, arg CallInsertDataParams) error { _, err := q.db.Exec(ctx, callInsertData, arg.A, arg.B) return err } const callInsertDataNamed = `-- name: CallInsertDataNamed :exec CALL insert_data(b => $1, a => $2) ` type CallInsertDataNamedParams struct { B int32 A int32 } func (q *Queries) CallInsertDataNamed(ctx context.Context, arg CallInsertDataNamedParams) error { _, err := q.db.Exec(ctx, callInsertDataNamed, arg.B, arg.A) return err } const callInsertDataNoArgs = `-- name: CallInsertDataNoArgs :exec CALL insert_data(1, 2) ` func (q *Queries) CallInsertDataNoArgs(ctx context.Context) error { _, err := q.db.Exec(ctx, callInsertDataNoArgs) return err } const callInsertDataSqlcArgs = `-- name: CallInsertDataSqlcArgs :exec CALL insert_data($1, $2) ` type CallInsertDataSqlcArgsParams struct { Foo int32 Bar int32 } func (q *Queries) CallInsertDataSqlcArgs(ctx context.Context, arg CallInsertDataSqlcArgsParams) error { _, err := q.db.Exec(ctx, callInsertDataSqlcArgs, arg.Foo, arg.Bar) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/query.sql ================================================ -- name: CallInsertData :exec CALL insert_data($1, $2); -- name: CallInsertDataNoArgs :exec CALL insert_data(1, 2); -- name: CallInsertDataNamed :exec CALL insert_data(b => $1, a => $2); -- name: CallInsertDataSqlcArgs :exec CALL insert_data(sqlc.arg('foo'), sqlc.arg('bar')); ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE tbl ( value integer ); -- https://www.postgresql.org/docs/current/sql-createprocedure.html CREATE PROCEDURE insert_data(a integer, b integer) LANGUAGE SQL AS $$ INSERT INTO tbl VALUES (a); INSERT INTO tbl VALUES (b); $$; ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Tbl struct { Value pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const callInsertData = `-- name: CallInsertData :exec CALL insert_data($1, $2) ` type CallInsertDataParams struct { A int32 B int32 } func (q *Queries) CallInsertData(ctx context.Context, arg CallInsertDataParams) error { _, err := q.db.Exec(ctx, callInsertData, arg.A, arg.B) return err } const callInsertDataNamed = `-- name: CallInsertDataNamed :exec CALL insert_data(b => $1, a => $2) ` type CallInsertDataNamedParams struct { B int32 A int32 } func (q *Queries) CallInsertDataNamed(ctx context.Context, arg CallInsertDataNamedParams) error { _, err := q.db.Exec(ctx, callInsertDataNamed, arg.B, arg.A) return err } const callInsertDataNoArgs = `-- name: CallInsertDataNoArgs :exec CALL insert_data(1, 2) ` func (q *Queries) CallInsertDataNoArgs(ctx context.Context) error { _, err := q.db.Exec(ctx, callInsertDataNoArgs) return err } const callInsertDataSqlcArgs = `-- name: CallInsertDataSqlcArgs :exec CALL insert_data($1, $2) ` type CallInsertDataSqlcArgsParams struct { Foo int32 Bar int32 } func (q *Queries) CallInsertDataSqlcArgs(ctx context.Context, arg CallInsertDataSqlcArgsParams) error { _, err := q.db.Exec(ctx, callInsertDataSqlcArgs, arg.Foo, arg.Bar) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/query.sql ================================================ -- name: CallInsertData :exec CALL insert_data($1, $2); -- name: CallInsertDataNoArgs :exec CALL insert_data(1, 2); -- name: CallInsertDataNamed :exec CALL insert_data(b => $1, a => $2); -- name: CallInsertDataSqlcArgs :exec CALL insert_data(sqlc.arg('foo'), sqlc.arg('bar')); ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE tbl ( value integer ); -- https://www.postgresql.org/docs/current/sql-createprocedure.html CREATE PROCEDURE insert_data(a integer, b integer) LANGUAGE SQL AS $$ INSERT INTO tbl VALUES (a); INSERT INTO tbl VALUES (b); $$; ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Tbl struct { Value sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const callInsertData = `-- name: CallInsertData :exec CALL insert_data($1, $2) ` type CallInsertDataParams struct { A int32 B int32 } func (q *Queries) CallInsertData(ctx context.Context, arg CallInsertDataParams) error { _, err := q.db.ExecContext(ctx, callInsertData, arg.A, arg.B) return err } const callInsertDataNamed = `-- name: CallInsertDataNamed :exec CALL insert_data(b => $1, a => $2) ` type CallInsertDataNamedParams struct { B int32 A int32 } func (q *Queries) CallInsertDataNamed(ctx context.Context, arg CallInsertDataNamedParams) error { _, err := q.db.ExecContext(ctx, callInsertDataNamed, arg.B, arg.A) return err } const callInsertDataNoArgs = `-- name: CallInsertDataNoArgs :exec CALL insert_data(1, 2) ` func (q *Queries) CallInsertDataNoArgs(ctx context.Context) error { _, err := q.db.ExecContext(ctx, callInsertDataNoArgs) return err } const callInsertDataSqlcArgs = `-- name: CallInsertDataSqlcArgs :exec CALL insert_data($1, $2) ` type CallInsertDataSqlcArgsParams struct { Foo int32 Bar int32 } func (q *Queries) CallInsertDataSqlcArgs(ctx context.Context, arg CallInsertDataSqlcArgsParams) error { _, err := q.db.ExecContext(ctx, callInsertDataSqlcArgs, arg.Foo, arg.Bar) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/query.sql ================================================ -- name: CallInsertData :exec CALL insert_data($1, $2); -- name: CallInsertDataNoArgs :exec CALL insert_data(1, 2); -- name: CallInsertDataNamed :exec CALL insert_data(b => $1, a => $2); -- name: CallInsertDataSqlcArgs :exec CALL insert_data(sqlc.arg('foo'), sqlc.arg('bar')); ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/schema.sql ================================================ CREATE TABLE tbl ( value integer ); -- https://www.postgresql.org/docs/current/sql-createprocedure.html CREATE PROCEDURE insert_data(a integer, b integer) LANGUAGE SQL AS $$ INSERT INTO tbl VALUES (a); INSERT INTO tbl VALUES (b); $$; ================================================ FILE: internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Venue struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/mysql/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table/mysql/schema.sql ================================================ CREATE TABLE venues (name text); ================================================ FILE: internal/endtoend/testdata/ddl_create_table/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Venue struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE venues (name text); ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Venue struct { Name pgtype.Text } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE venues (name text); ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Venue struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/schema.sql ================================================ CREATE TABLE venues (name text); ================================================ FILE: internal/endtoend/testdata/ddl_create_table/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Venue struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table/sqlite/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table/sqlite/schema.sql ================================================ CREATE TABLE venues (name text); ================================================ FILE: internal/endtoend/testdata/ddl_create_table/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { A int32 B int32 C sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo ( PRIMARY KEY (a, b) INCLUDE (c), a integer, b integer, c integer ); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { A int32 B int32 C pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo ( PRIMARY KEY (a, b) INCLUDE (c), a integer, b integer, c integer ); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { A int32 B int32 C sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo ( PRIMARY KEY (a, b) INCLUDE (c), a integer, b integer, c integer ); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_include/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "github.com/google/uuid" ) type Llc struct { PartyID uuid.UUID Name string LegalName string IncorporationDate sql.NullTime } type Organisation struct { PartyID uuid.UUID Name string LegalName string } type Party struct { PartyID uuid.UUID Name string } type Person struct { PartyID uuid.UUID Name string FirstName string LastName string } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAllOrganisations = `-- name: GetAllOrganisations :many SELECT party_id, name, legal_name FROM organisation ` func (q *Queries) GetAllOrganisations(ctx context.Context) ([]Organisation, error) { rows, err := q.db.Query(ctx, getAllOrganisations) if err != nil { return nil, err } defer rows.Close() var items []Organisation for rows.Next() { var i Organisation if err := rows.Scan(&i.PartyID, &i.Name, &i.LegalName); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getAllParties = `-- name: GetAllParties :many SELECT party_id, name FROM party ` func (q *Queries) GetAllParties(ctx context.Context) ([]Party, error) { rows, err := q.db.Query(ctx, getAllParties) if err != nil { return nil, err } defer rows.Close() var items []Party for rows.Next() { var i Party if err := rows.Scan(&i.PartyID, &i.Name); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getAllPeople = `-- name: GetAllPeople :many SELECT party_id, name, first_name, last_name FROM person ` func (q *Queries) GetAllPeople(ctx context.Context) ([]Person, error) { rows, err := q.db.Query(ctx, getAllPeople) if err != nil { return nil, err } defer rows.Close() var items []Person for rows.Next() { var i Person if err := rows.Scan( &i.PartyID, &i.Name, &i.FirstName, &i.LastName, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/query.sql ================================================ -- name: GetAllParties :many SELECT * FROM party; -- name: GetAllPeople :many SELECT * FROM person; -- name: GetAllOrganisations :many SELECT * FROM organisation; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE party ( party_id uuid PRIMARY KEY, name text NOT NULL ); CREATE TABLE person ( first_name text NOT NULL, last_name text NOT NULL ) INHERITS (party); CREATE TABLE organisation ( legal_name text ) INHERITS (party); CREATE TABLE llc ( incorporation_date timestamp, legal_name text NOT NULL ) INHERITS (organisation); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Llc struct { PartyID pgtype.UUID Name string LegalName string IncorporationDate pgtype.Timestamp } type Organisation struct { PartyID pgtype.UUID Name string LegalName string } type Party struct { PartyID pgtype.UUID Name string } type Person struct { PartyID pgtype.UUID Name string FirstName string LastName string } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAllOrganisations = `-- name: GetAllOrganisations :many SELECT party_id, name, legal_name FROM organisation ` func (q *Queries) GetAllOrganisations(ctx context.Context) ([]Organisation, error) { rows, err := q.db.Query(ctx, getAllOrganisations) if err != nil { return nil, err } defer rows.Close() var items []Organisation for rows.Next() { var i Organisation if err := rows.Scan(&i.PartyID, &i.Name, &i.LegalName); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getAllParties = `-- name: GetAllParties :many SELECT party_id, name FROM party ` func (q *Queries) GetAllParties(ctx context.Context) ([]Party, error) { rows, err := q.db.Query(ctx, getAllParties) if err != nil { return nil, err } defer rows.Close() var items []Party for rows.Next() { var i Party if err := rows.Scan(&i.PartyID, &i.Name); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getAllPeople = `-- name: GetAllPeople :many SELECT party_id, name, first_name, last_name FROM person ` func (q *Queries) GetAllPeople(ctx context.Context) ([]Person, error) { rows, err := q.db.Query(ctx, getAllPeople) if err != nil { return nil, err } defer rows.Close() var items []Person for rows.Next() { var i Person if err := rows.Scan( &i.PartyID, &i.Name, &i.FirstName, &i.LastName, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/query.sql ================================================ -- name: GetAllParties :many SELECT * FROM party; -- name: GetAllPeople :many SELECT * FROM person; -- name: GetAllOrganisations :many SELECT * FROM organisation; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE party ( party_id uuid PRIMARY KEY, name text NOT NULL ); CREATE TABLE person ( first_name text NOT NULL, last_name text NOT NULL ) INHERITS (party); CREATE TABLE organisation ( legal_name text ) INHERITS (party); CREATE TABLE llc ( incorporation_date timestamp, legal_name text NOT NULL ) INHERITS (organisation); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "github.com/google/uuid" ) type Llc struct { PartyID uuid.UUID Name string LegalName string IncorporationDate sql.NullTime } type Organisation struct { PartyID uuid.UUID Name string LegalName string } type Party struct { PartyID uuid.UUID Name string } type Person struct { PartyID uuid.UUID Name string FirstName string LastName string } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAllOrganisations = `-- name: GetAllOrganisations :many SELECT party_id, name, legal_name FROM organisation ` func (q *Queries) GetAllOrganisations(ctx context.Context) ([]Organisation, error) { rows, err := q.db.QueryContext(ctx, getAllOrganisations) if err != nil { return nil, err } defer rows.Close() var items []Organisation for rows.Next() { var i Organisation if err := rows.Scan(&i.PartyID, &i.Name, &i.LegalName); 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 getAllParties = `-- name: GetAllParties :many SELECT party_id, name FROM party ` func (q *Queries) GetAllParties(ctx context.Context) ([]Party, error) { rows, err := q.db.QueryContext(ctx, getAllParties) if err != nil { return nil, err } defer rows.Close() var items []Party for rows.Next() { var i Party if err := rows.Scan(&i.PartyID, &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 } const getAllPeople = `-- name: GetAllPeople :many SELECT party_id, name, first_name, last_name FROM person ` func (q *Queries) GetAllPeople(ctx context.Context) ([]Person, error) { rows, err := q.db.QueryContext(ctx, getAllPeople) if err != nil { return nil, err } defer rows.Close() var items []Person for rows.Next() { var i Person if err := rows.Scan( &i.PartyID, &i.Name, &i.FirstName, &i.LastName, ); 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/query.sql ================================================ -- name: GetAllParties :many SELECT * FROM party; -- name: GetAllPeople :many SELECT * FROM person; -- name: GetAllOrganisations :many SELECT * FROM organisation; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/schema.sql ================================================ CREATE TABLE party ( party_id uuid PRIMARY KEY, name text NOT NULL ); CREATE TABLE person ( first_name text NOT NULL, last_name text NOT NULL ) INHERITS (party); CREATE TABLE organisation ( legal_name text ) INHERITS (party); CREATE TABLE llc ( incorporation_date timestamp, legal_name text NOT NULL ) INHERITS (organisation); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_inherits/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_invalid_inherits/postgresql/stdlib/exec.json ================================================ { "contexts": ["base"], "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_invalid_inherits/postgresql/stdlib/query.sql ================================================ -- name: GetAllParties :many SELECT * FROM party; -- name: GetAllOrganisations :many SELECT * FROM organisation; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_invalid_inherits/postgresql/stdlib/schema.sql ================================================ CREATE TABLE party ( name text NOT NULL ); CREATE TABLE organisation ( name integer NOT NULL ) INHERITS (party); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_invalid_inherits/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_invalid_inherits/postgresql/stdlib/stderr.txt ================================================ # package querytest schema.sql:1:1: column "name" has a type conflict ================================================ FILE: internal/endtoend/testdata/ddl_create_table_like/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/481 ================================================ FILE: internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/query.sql ================================================ -- name: AllRanked :many SELECT * FROM changes_ranked; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/schema.sql ================================================ 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 ); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_like/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/google/uuid" ) type Foo struct { ID uuid.UUID OtherID uuid.UUID } type Foo1 struct { ID uuid.UUID OtherID uuid.UUID } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo ( id uuid NOT NULL, other_id uuid NOT NULL ) PARTITION BY HASH (other_id); CREATE TABLE foo_1 PARTITION OF foo FOR VALUES WITH (MODULUS 10, REMAINDER 0); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { ID pgtype.UUID OtherID pgtype.UUID } type Foo1 struct { ID pgtype.UUID OtherID pgtype.UUID } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo ( id uuid NOT NULL, other_id uuid NOT NULL ) PARTITION BY HASH (other_id); CREATE TABLE foo_1 PARTITION OF foo FOR VALUES WITH (MODULUS 10, REMAINDER 0); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/google/uuid" ) type Foo struct { ID uuid.UUID OtherID uuid.UUID } type Foo1 struct { ID uuid.UUID OtherID uuid.UUID } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo ( id uuid NOT NULL, other_id uuid NOT NULL ) PARTITION BY HASH (other_id); CREATE TABLE foo_1 PARTITION OF foo FOR VALUES WITH (MODULUS 10, REMAINDER 0); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_partition/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type XVenue struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/mysql/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/mysql/schema.sql ================================================ CREATE TABLE `x-venues` (name text); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type XVenue struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE "x-venues" (name text); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type XVenue struct { Name pgtype.Text } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE "x-venues" (name text); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type XVenue struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/schema.sql ================================================ CREATE TABLE "x-venues" (name text); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_reserved/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_strict/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_strict/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Venue struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_strict/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_strict/sqlite/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_strict/sqlite/schema.sql ================================================ CREATE TABLE venues (name text) STRICT; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_strict/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_unknown_type/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1917 ================================================ FILE: internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/exec.json ================================================ { "contexts": ["unknown"], "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/query.sql ================================================ -- name: SelectOne :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/schema.sql ================================================ CREATE TABLE test_table ( id STRING ); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/ddl_create_table_unknown_type/postgresql/pgx/stderr.txt ================================================ # package querytest query.sql:1:1: rpc error: code = FailedPrecondition desc = type "string" does not exist (42704) CREATE TABLE test_table ( id STRING ); ================================================ FILE: internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Arena struct { Name string Location sql.NullString Size int64 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/schema.sql ================================================ CREATE TABLE IF NOT EXISTS arenas (name text PRIMARY KEY, location text, size int NOT NULL) WITHOUT ROWID; ================================================ FILE: internal/endtoend/testdata/ddl_create_table_without_rowid/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "time" "github.com/google/uuid" ) type TddTest struct { TestID uuid.UUID Title string Descr string TsCreated time.Time TsUpdated time.Time } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/schema.sql ================================================ CREATE SCHEMA tdd; CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE EXTENSION IF NOT EXISTS pgcrypto SCHEMA public VERSION "1.3"; CREATE FUNCTION tdd.trigger_set_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$BEGIN NEW.ts_updated = NOW(); RETURN NEW; END; $$; CREATE TABLE tdd.tests ( test_id uuid DEFAULT uuid_generate_v4() PRIMARY KEY, title text DEFAULT ''::text NOT NULL, descr text DEFAULT ''::text NOT NULL, ts_created timestamp with time zone DEFAULT now() NOT NULL, ts_updated timestamp with time zone DEFAULT now() NOT NULL ); CREATE TRIGGER set_timestamp BEFORE UPDATE ON tdd.tests FOR EACH ROW EXECUTE FUNCTION tdd.trigger_set_timestamp(); ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type TddTest struct { TestID pgtype.UUID Title string Descr string TsCreated pgtype.Timestamptz TsUpdated pgtype.Timestamptz } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/schema.sql ================================================ CREATE SCHEMA tdd; CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE EXTENSION IF NOT EXISTS pgcrypto SCHEMA public VERSION "1.3"; CREATE FUNCTION tdd.trigger_set_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$BEGIN NEW.ts_updated = NOW(); RETURN NEW; END; $$; CREATE TABLE tdd.tests ( test_id uuid DEFAULT uuid_generate_v4() PRIMARY KEY, title text DEFAULT ''::text NOT NULL, descr text DEFAULT ''::text NOT NULL, ts_created timestamp with time zone DEFAULT now() NOT NULL, ts_updated timestamp with time zone DEFAULT now() NOT NULL ); CREATE TRIGGER set_timestamp BEFORE UPDATE ON tdd.tests FOR EACH ROW EXECUTE FUNCTION tdd.trigger_set_timestamp(); ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "time" "github.com/google/uuid" ) type TddTest struct { TestID uuid.UUID Title string Descr string TsCreated time.Time TsUpdated time.Time } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/schema.sql ================================================ CREATE SCHEMA tdd; CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE EXTENSION IF NOT EXISTS pgcrypto SCHEMA public VERSION "1.3"; CREATE FUNCTION tdd.trigger_set_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$BEGIN NEW.ts_updated = NOW(); RETURN NEW; END; $$; CREATE TABLE tdd.tests ( test_id uuid DEFAULT uuid_generate_v4() PRIMARY KEY, title text DEFAULT ''::text NOT NULL, descr text DEFAULT ''::text NOT NULL, ts_created timestamp with time zone DEFAULT now() NOT NULL, ts_updated timestamp with time zone DEFAULT now() NOT NULL ); CREATE TRIGGER set_timestamp BEFORE UPDATE ON tdd.tests FOR EACH ROW EXECUTE FUNCTION tdd.trigger_set_timestamp(); ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Customer struct { CustID int64 CustName sql.NullString CustAddr sql.NullString } type CustomerAddress struct { CustID int64 CustAddr sql.NullString } type TriggerCustomer struct { Name string Address sql.NullString } type TriggerOrder struct { ID int64 CustomerName sql.NullString Address sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/sqlite/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/sqlite/schema.sql ================================================ /* examples copied from https://www.sqlite.org/lang_createtrigger.html only expectation in sqlc is that they parse, codegen is unaffected */ CREATE TABLE trigger_customers ( name TEXT PRIMARY KEY, address TEXT ); CREATE TABLE trigger_orders ( id INTEGER PRIMARY KEY, customer_name TEXT, address TEXT ); CREATE TRIGGER update_customer_address UPDATE OF address ON trigger_customers BEGIN UPDATE trigger_orders SET address = new.address WHERE customer_name = old.name; END; CREATE TABLE customer( cust_id INTEGER PRIMARY KEY, cust_name TEXT, cust_addr TEXT ); CREATE VIEW customer_address AS SELECT cust_id, cust_addr FROM customer; CREATE TRIGGER cust_addr_chng INSTEAD OF UPDATE OF cust_addr ON customer_address BEGIN UPDATE customer SET cust_addr=NEW.cust_addr WHERE cust_id=NEW.cust_id; END; ================================================ FILE: internal/endtoend/testdata/ddl_create_trigger/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/mysql/README.md ================================================ The MySQL parser currently does not support user-defined functions. See https://github.com/pingcap/parser/issues/988. ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/schema.sql ================================================ CREATE FUNCTION foo(bar text) RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; DROP FUNCTION foo; ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/schema.sql ================================================ CREATE FUNCTION foo(bar text) RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; DROP FUNCTION foo; ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/schema.sql ================================================ CREATE FUNCTION foo(bar text) RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; DROP FUNCTION foo; ================================================ FILE: internal/endtoend/testdata/ddl_drop_function/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/mysql/README.md ================================================ The MySQL parser currently does not support user-defined functions. See https://github.com/pingcap/parser/issues/988. ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/schema.sql ================================================ CREATE FUNCTION foo(bar text) RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; DROP FUNCTION foo(text); ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/schema.sql ================================================ CREATE FUNCTION foo(bar text) RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; DROP FUNCTION foo(text); ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/schema.sql ================================================ CREATE FUNCTION foo(bar text) RETURNS bool AS $$ SELECT true $$ LANGUAGE sql; DROP FUNCTION foo(text); ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_args/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/mysql/README.md ================================================ The MySQL parser currently does not support user-defined functions. See https://github.com/pingcap/parser/issues/988. ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/schema.sql ================================================ DROP FUNCTION IF EXISTS bar; DROP FUNCTION IF EXISTS bar(); ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/schema.sql ================================================ DROP FUNCTION IF EXISTS bar; DROP FUNCTION IF EXISTS bar(); ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/schema.sql ================================================ DROP FUNCTION IF EXISTS bar; DROP FUNCTION IF EXISTS bar(); ================================================ FILE: internal/endtoend/testdata/ddl_drop_function_if_exists/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/mysql/exec.json ================================================ { "contexts": ["base"], "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/mysql/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/mysql/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (baz text); DROP SCHEMA foo; ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (baz text); DROP SCHEMA foo CASCADE; ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (baz text); DROP SCHEMA foo CASCADE; ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (baz text); DROP SCHEMA foo CASCADE; ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/schema.sql ================================================ DROP SCHEMA IF EXISTS foo; ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/schema.sql ================================================ DROP SCHEMA IF EXISTS foo; ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/schema.sql ================================================ DROP SCHEMA IF EXISTS foo; ================================================ FILE: internal/endtoend/testdata/ddl_drop_schema_if_exists/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE venues (); DROP TABLE venues; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE venues (); DROP TABLE venues; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/schema.sql ================================================ CREATE TABLE venues (); DROP TABLE venues; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/sqlite/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/sqlite/schema.sql ================================================ CREATE TABLE venues (hi text); DROP TABLE venues; CREATE TABLE Authors (id integer); DROP TABLE Authors; CREATE TABLE "Books" (id integer); DROP TABLE "Books"; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE venues (); DROP TABLE IF EXISTS venues; DROP TABLE IF EXISTS venues; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE venues (); DROP TABLE IF EXISTS venues; DROP TABLE IF EXISTS venues; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/schema.sql ================================================ CREATE TABLE venues (); DROP TABLE IF EXISTS venues; DROP TABLE IF EXISTS venues; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/schema.sql ================================================ CREATE TABLE venues (hi text); DROP TABLE IF EXISTS venues; DROP TABLE IF EXISTS venues; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_if_exists/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE venues (); DROP TABLE public.venues; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE venues (); DROP TABLE public.venues; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/schema.sql ================================================ CREATE TABLE venues (); DROP TABLE public.venues; ================================================ FILE: internal/endtoend/testdata/ddl_drop_table_in_schema/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/schema.sql ================================================ CREATE TYPE status AS ENUM ('open', 'closed'); DROP TYPE status; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/schema.sql ================================================ CREATE TYPE status AS ENUM ('open', 'closed'); DROP TYPE status; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/schema.sql ================================================ CREATE TYPE status AS ENUM ('open', 'closed'); DROP TYPE status; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/schema.sql ================================================ CREATE TYPE status AS ENUM ('open', 'closed'); DROP TYPE IF EXISTS status; DROP TYPE IF EXISTS status; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/schema.sql ================================================ CREATE TYPE status AS ENUM ('open', 'closed'); DROP TYPE IF EXISTS status; DROP TYPE IF EXISTS status; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/schema.sql ================================================ CREATE TYPE status AS ENUM ('open', 'closed'); DROP TYPE IF EXISTS status; DROP TYPE IF EXISTS status; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_if_exists/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/schema.sql ================================================ CREATE TYPE status AS ENUM ('open', 'closed'); DROP TYPE public.status; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/schema.sql ================================================ CREATE TYPE status AS ENUM ('open', 'closed'); DROP TYPE public.status; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/schema.sql ================================================ CREATE TYPE status AS ENUM ('open', 'closed'); DROP TYPE public.status; ================================================ FILE: internal/endtoend/testdata/ddl_drop_type_in_schema/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Description struct { ID string Txt sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/schema.sql ================================================ create table descriptions ( id varchar(32) GENERATED ALWAYS AS (MD5(txt)) STORED, txt text, primary key (id) ); ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Description struct { ID string Txt pgtype.Text } ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/schema.sql ================================================ create table descriptions ( id varchar(32) GENERATED ALWAYS AS (MD5(txt)) STORED, txt text, primary key (id) ); ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Description struct { ID string Txt sql.NullString } ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/schema.sql ================================================ create table descriptions ( id varchar(32) GENERATED ALWAYS AS (MD5(txt)) STORED, txt text, primary key (id) ); ================================================ FILE: internal/endtoend/testdata/ddl_generated_columns/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_materialized_views_invalid/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1545 ================================================ FILE: internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/query.sql ================================================ -- name: GetTotalEarned :one SELECT COALESCE(SUM(earned), 0) as total_earned FROM grouped_kpis WHERE day = @day; ================================================ FILE: internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/schema.sql ================================================ CREATE TABLE kpis ( ts TIMESTAMPTZ, event_id TEXT NOT NULL ); CREATE MATERIALIZED VIEW IF NOT EXISTS grouped_kpis AS SELECT date_trunc('1 day', ts) as day, COUNT(*) FROM kpis GROUP BY 1; ================================================ FILE: internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/ddl_materialized_views_invalid/postgresql/pgx/stderr.txt ================================================ # package querytest query.sql:2:21: column "earned" does not exist ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type NewTable struct { Val sql.NullInt32 } type OldTable struct { Val sql.NullInt32 } type PgTempMigrate struct { Val sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE old_table (val SERIAL); CREATE TABLE new_table (val SERIAL); CREATE TABLE pg_temp.migrate (val SERIAL); INSERT INTO pg_temp.migrate (val) SELECT val FROM old_table; INSERT INTO new_table (val) SELECT val FROM pg_temp.migrate; ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type NewTable struct { Val pgtype.Int4 } type OldTable struct { Val pgtype.Int4 } type PgTempMigrate struct { Val pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/go/query.sql.go ================================================ // 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.Exec(ctx, placeholder) return err } ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE old_table (val SERIAL); CREATE TABLE new_table (val SERIAL); CREATE TABLE pg_temp.migrate (val SERIAL); INSERT INTO pg_temp.migrate (val) SELECT val FROM old_table; INSERT INTO new_table (val) SELECT val FROM pg_temp.migrate; ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type NewTable struct { Val sql.NullInt32 } type OldTable struct { Val sql.NullInt32 } type PgTempMigrate struct { Val sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/schema.sql ================================================ CREATE TABLE old_table (val SERIAL); CREATE TABLE new_table (val SERIAL); CREATE TABLE pg_temp.migrate (val SERIAL); INSERT INTO pg_temp.migrate (val) SELECT val FROM old_table; INSERT INTO new_table (val) SELECT val FROM pg_temp.migrate; ================================================ FILE: internal/endtoend/testdata/ddl_pg_temp/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/ddl_rename_drop_materialized_views/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/3371 ================================================ FILE: internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/query.sql ================================================ -- name: GetAuthorMv :one SELECT * FROM authors_mv WHERE id = $1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/schema.sql ================================================ 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; ================================================ FILE: internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v4/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v4" ================================================ FILE: internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/query.sql ================================================ -- name: GetAuthorMv :one SELECT * FROM authors_mv WHERE id = $1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/schema.sql ================================================ 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; ================================================ FILE: internal/endtoend/testdata/ddl_rename_drop_materialized_views/postgresql/pgx/v5/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/delete_from/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/delete_from/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/delete_from/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteFrom = `-- name: DeleteFrom :exec DELETE FROM foo WHERE id = ? ` func (q *Queries) DeleteFrom(ctx context.Context, id string) error { _, err := q.db.ExecContext(ctx, deleteFrom, id) return err } ================================================ FILE: internal/endtoend/testdata/delete_from/mysql/query.sql ================================================ /* name: DeleteFrom :exec */ DELETE FROM foo WHERE id = ?; ================================================ FILE: internal/endtoend/testdata/delete_from/mysql/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/delete_from/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteFrom = `-- name: DeleteFrom :exec DELETE FROM foo WHERE id = $1 ` func (q *Queries) DeleteFrom(ctx context.Context, id string) error { _, err := q.db.Exec(ctx, deleteFrom, id) return err } ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/pgx/v4/query.sql ================================================ -- name: DeleteFrom :exec DELETE FROM foo WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteFrom = `-- name: DeleteFrom :exec DELETE FROM foo WHERE id = $1 ` func (q *Queries) DeleteFrom(ctx context.Context, id string) error { _, err := q.db.Exec(ctx, deleteFrom, id) return err } ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/pgx/v5/query.sql ================================================ -- name: DeleteFrom :exec DELETE FROM foo WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteFrom = `-- name: DeleteFrom :exec DELETE FROM foo WHERE id = $1 ` func (q *Queries) DeleteFrom(ctx context.Context, id string) error { _, err := q.db.ExecContext(ctx, deleteFrom, id) return err } ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/stdlib/query.sql ================================================ -- name: DeleteFrom :exec DELETE FROM foo WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/delete_from/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/delete_from/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/delete_from/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/delete_from/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteFrom = `-- name: DeleteFrom :exec DELETE FROM foo WHERE id = ? ` func (q *Queries) DeleteFrom(ctx context.Context, id string) error { _, err := q.db.ExecContext(ctx, deleteFrom, id) return err } ================================================ FILE: internal/endtoend/testdata/delete_from/sqlite/query.sql ================================================ -- name: DeleteFrom :exec DELETE FROM foo WHERE id = ?; ================================================ FILE: internal/endtoend/testdata/delete_from/sqlite/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/delete_from/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/delete_inner_join/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/delete_inner_join/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Author struct { ID uint32 Name string } type AuthorBook struct { AuthorID uint32 BookID uint32 } type Book struct { ID uint32 Title string } ================================================ FILE: internal/endtoend/testdata/delete_inner_join/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const removeAllAuthorsFromTheGreatGatsby = `-- name: RemoveAllAuthorsFromTheGreatGatsby :exec DELETE author_book FROM author_book INNER JOIN book ON book.id = author_book.book_id WHERE book.title = 'The Great Gatsby' ` func (q *Queries) RemoveAllAuthorsFromTheGreatGatsby(ctx context.Context) error { _, err := q.db.ExecContext(ctx, removeAllAuthorsFromTheGreatGatsby) return err } ================================================ FILE: internal/endtoend/testdata/delete_inner_join/mysql/query.sql ================================================ /* name: RemoveAllAuthorsFromTheGreatGatsby :exec */ DELETE author_book FROM author_book INNER JOIN book ON book.id = author_book.book_id WHERE book.title = 'The Great Gatsby'; ================================================ FILE: internal/endtoend/testdata/delete_inner_join/mysql/schema.sql ================================================ CREATE TABLE author ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL ); CREATE TABLE book ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, title VARCHAR(255) NOT NULL ); CREATE TABLE author_book ( author_id INT UNSIGNED NOT NULL, book_id INT UNSIGNED NOT NULL, CONSTRAINT `pk-author_book` PRIMARY KEY (author_id, book_id), CONSTRAINT `fk-author_book-author-id` FOREIGN KEY (author_id) REFERENCES author (id), CONSTRAINT `fk-author_book-book-id` FOREIGN KEY (book_id) REFERENCES book (id) ); ================================================ FILE: internal/endtoend/testdata/delete_inner_join/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/delete_join/mysql/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/delete_join/mysql/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db type JoinTable struct { ID uint64 PrimaryTableID uint64 OtherTableID uint64 IsActive bool } type PrimaryTable struct { ID uint64 UserID uint64 } ================================================ FILE: internal/endtoend/testdata/delete_join/mysql/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const deleteJoin = `-- name: DeleteJoin :exec DELETE jt.*, pt.* FROM join_table as jt JOIN primary_table as pt ON jt.primary_table_id = pt.id WHERE jt.id = ? AND pt.user_id = ? ` type DeleteJoinParams struct { ID uint64 UserID uint64 } func (q *Queries) DeleteJoin(ctx context.Context, arg DeleteJoinParams) error { _, err := q.db.ExecContext(ctx, deleteJoin, arg.ID, arg.UserID) 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.* FROM join_table as jt LEFT JOIN primary_table as pt ON jt.primary_table_id = pt.id WHERE jt.id = ? AND pt.user_id = ? ` type DeleteLeftJoinParams struct { ID uint64 UserID uint64 } func (q *Queries) DeleteLeftJoin(ctx context.Context, arg DeleteLeftJoinParams) error { _, err := q.db.ExecContext(ctx, deleteLeftJoin, arg.ID, arg.UserID) return err } const deleteRightJoin = `-- name: DeleteRightJoin :exec DELETE jt.*, pt.* FROM join_table as jt RIGHT JOIN primary_table as pt ON jt.primary_table_id = pt.id WHERE jt.id = ? AND pt.user_id = ? ` type DeleteRightJoinParams struct { ID uint64 UserID uint64 } func (q *Queries) DeleteRightJoin(ctx context.Context, arg DeleteRightJoinParams) error { _, err := q.db.ExecContext(ctx, deleteRightJoin, arg.ID, arg.UserID) return err } ================================================ FILE: internal/endtoend/testdata/delete_join/mysql/query.sql ================================================ -- name: DeleteJoin :exec DELETE jt.*, pt.* FROM join_table as jt JOIN primary_table as pt ON jt.primary_table_id = pt.id WHERE jt.id = ? AND pt.user_id = ?; -- name: DeleteLeftJoin :exec DELETE jt.*, pt.* FROM join_table as jt LEFT JOIN primary_table as pt ON jt.primary_table_id = pt.id WHERE jt.id = ? AND pt.user_id = ?; -- name: DeleteRightJoin :exec DELETE jt.*, pt.* FROM join_table as jt RIGHT JOIN primary_table as pt ON jt.primary_table_id = pt.id WHERE jt.id = ? AND pt.user_id = ?; -- name: DeleteJoinWithSubquery :exec DELETE pt FROM primary_table pt JOIN (SELECT 1 as id) jt ON pt.id = jt.id; ================================================ FILE: internal/endtoend/testdata/delete_join/mysql/schema.sql ================================================ CREATE TABLE primary_table ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, user_id bigint(20) unsigned NOT NULL, PRIMARY KEY (id) ); CREATE TABLE join_table ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, primary_table_id bigint(20) unsigned NOT NULL, other_table_id bigint(20) unsigned NOT NULL, is_active tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (id) ); ================================================ FILE: internal/endtoend/testdata/delete_join/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "db", "engine": "mysql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/delete_using/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1714 ================================================ FILE: internal/endtoend/testdata/delete_using/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/delete_using/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/delete_using/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type A struct { AID pgtype.Text BIDFk pgtype.Text } type B struct { BID pgtype.Text } ================================================ FILE: internal/endtoend/testdata/delete_using/postgresql/pgx/go/query.sql.go ================================================ // 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 getSomeDeletedNotOk = `-- name: GetSomeDeletedNotOk :many DELETE FROM a USING b WHERE a.b_id_fk = b.b_id RETURNING b.b_id ` func (q *Queries) GetSomeDeletedNotOk(ctx context.Context) ([]pgtype.Text, error) { rows, err := q.db.Query(ctx, getSomeDeletedNotOk) if err != nil { return nil, err } defer rows.Close() var items []pgtype.Text for rows.Next() { var b_id pgtype.Text if err := rows.Scan(&b_id); err != nil { return nil, err } items = append(items, b_id) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/delete_using/postgresql/pgx/query.sql ================================================ -- name: GetSomeDeletedNotOk :many DELETE FROM a USING b WHERE a.b_id_fk = b.b_id RETURNING b.b_id; -- column "b_id" does not exist ================================================ FILE: internal/endtoend/testdata/delete_using/postgresql/pgx/schema.sql ================================================ CREATE TABLE a ( a_id TEXT, b_id_fk TEXT ); CREATE TABLE b ( b_id TEXT ); ================================================ FILE: internal/endtoend/testdata/delete_using/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/diff_no_output/exec.json ================================================ { "command": "diff" } ================================================ FILE: internal/endtoend/testdata/diff_no_output/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/diff_no_output/go/models.go ================================================ // 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 } type Book struct { ID int64 Title string } ================================================ FILE: internal/endtoend/testdata/diff_no_output/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package authors import ( "context" "database/sql" ) const createAuthor = `-- name: CreateAuthor :one INSERT INTO authors ( name, bio ) VALUES ( $1, $2 ) RETURNING id, name, bio ` type CreateAuthorParams struct { Name string Bio sql.NullString } func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (Author, error) { row := q.db.QueryRowContext(ctx, createAuthor, arg.Name, arg.Bio) var i Author err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err } const 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 bio ` func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const selectOne = `-- name: SelectOne :one SELECT 1 ` func (q *Queries) SelectOne(ctx context.Context) (int32, error) { row := q.db.QueryRowContext(ctx, selectOne) var column_1 int32 err := row.Scan(&column_1) return column_1, err } ================================================ FILE: internal/endtoend/testdata/diff_no_output/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; -- name: ListAuthors :many SELECT * FROM authors ORDER BY bio; -- name: SelectOne :one SELECT 1; -- name: CreateAuthor :one INSERT INTO authors ( name, bio ) VALUES ( $1, $2 ) RETURNING *; ================================================ FILE: internal/endtoend/testdata/diff_no_output/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); CREATE TABLE books ( id BIGSERIAL PRIMARY KEY, title text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/diff_no_output/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "go": { "package": "authors", "out": "go" } } } ] } ================================================ FILE: internal/endtoend/testdata/diff_output/exec.json ================================================ { "command": "diff" } ================================================ FILE: internal/endtoend/testdata/diff_output/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/diff_output/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/diff_output/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package authors import ( "context" "database/sql" ) const createAuthor = `-- name: CreateAuthor :one INSERT INTO authors ( name, bio ) VALUES ( $1, $2 ) RETURNING id, name, bio ` type CreateAuthorParams struct { Name string Bio sql.NullString } func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (Author, error) { row := q.db.QueryRowContext(ctx, createAuthor, arg.Name, arg.Bio) var i Author err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err } const deleteAuthor = `-- name: DeleteAuthor :exec DELETE FROM authors WHERE id = $1 ` func (q *Queries) DeleteAuthor(ctx context.Context, id int64) error { _, err := q.db.ExecContext(ctx, deleteAuthor, id) return err } const getAuthor = `-- name: GetAuthor :one SELECT id, name, bio FROM authors WHERE id = $1 LIMIT 1 ` func (q *Queries) GetAuthor(ctx context.Context, id int64) (Author, error) { row := q.db.QueryRowContext(ctx, getAuthor, id) var i Author err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err } const listAuthors = `-- name: ListAuthors :many SELECT id, name, bio FROM authors ORDER BY name ` func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/diff_output/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; -- name: ListAuthors :many SELECT * FROM authors ORDER BY bio; -- name: SelectOne :one SELECT 1; -- name: CreateAuthor :one INSERT INTO authors ( name, bio ) VALUES ( $1, $2 ) RETURNING *; ================================================ FILE: internal/endtoend/testdata/diff_output/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); CREATE TABLE books ( id BIGSERIAL PRIMARY KEY, title text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/diff_output/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "go": { "package": "authors", "out": "go" } } } ] } ================================================ FILE: internal/endtoend/testdata/diff_output/stderr.txt ================================================ --- a/go/models.go +++ b/go/models.go @@ -13,3 +13,8 @@ Name string Bio sql.NullString } + +type Book struct { + ID int64 + Title string +} --- a/go/query.sql.go +++ b/go/query.sql.go @@ -31,16 +31,6 @@ 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 @@ -55,7 +45,7 @@ const listAuthors = `-- name: ListAuthors :many SELECT id, name, bio FROM authors +ORDER BY bio -ORDER BY name ` func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { @@ -80,3 +70,14 @@ } return items, nil } + +const selectOne = `-- name: SelectOne :one +SELECT 1 +` + +func (q *Queries) SelectOne(ctx context.Context) (int32, error) { + row := q.db.QueryRowContext(ctx, selectOne) + var column_1 int32 + err := row.Scan(&column_1) + return column_1, err +} ================================================ FILE: internal/endtoend/testdata/do/postgresql/pgx/db/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "context" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgconn" ) type DBTX interface { Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) Query(context.Context, string, ...interface{}) (pgx.Rows, error) QueryRow(context.Context, string, ...interface{}) pgx.Row } func New(db DBTX) *Queries { return &Queries{db: db} } type Queries struct { db DBTX } func (q *Queries) WithTx(tx pgx.Tx) *Queries { return &Queries{ db: tx, } } ================================================ FILE: internal/endtoend/testdata/do/postgresql/pgx/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "github.com/jackc/pgx/v5/pgtype" ) type Author struct { ID int64 Name string Bio pgtype.Text } ================================================ FILE: internal/endtoend/testdata/do/postgresql/pgx/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const doStuff = `-- name: DoStuff :exec DO $$ BEGIN ALTER TABLE authors ADD COLUMN marked_for_processing bool; END $$ ` func (q *Queries) DoStuff(ctx context.Context) error { _, err := q.db.Exec(ctx, doStuff) return err } ================================================ FILE: internal/endtoend/testdata/do/postgresql/pgx/query.sql ================================================ -- name: DoStuff :exec DO $$ BEGIN ALTER TABLE authors ADD COLUMN marked_for_processing bool; END $$; ================================================ FILE: internal/endtoend/testdata/do/postgresql/pgx/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/do/postgresql/pgx/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "db", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "sql_package": "pgx/v5" } ] } ================================================ FILE: internal/endtoend/testdata/do/postgresql/pq/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/do/postgresql/pq/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" ) type Author struct { ID int64 Name string Bio sql.NullString } ================================================ FILE: internal/endtoend/testdata/do/postgresql/pq/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const doStuff = `-- name: DoStuff :exec DO $$ BEGIN ALTER TABLE authors ADD COLUMN marked_for_processing bool; END $$ ` func (q *Queries) DoStuff(ctx context.Context) error { _, err := q.db.ExecContext(ctx, doStuff) return err } ================================================ FILE: internal/endtoend/testdata/do/postgresql/pq/query.sql ================================================ -- name: DoStuff :exec DO $$ BEGIN ALTER TABLE authors ADD COLUMN marked_for_processing bool; END $$; ================================================ FILE: internal/endtoend/testdata/do/postgresql/pq/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/do/postgresql/pq/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "db", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/duplicate_go_names/enum/query.sql ================================================ -- name: GetFoos :many SELECT * FROM foos; ================================================ FILE: internal/endtoend/testdata/duplicate_go_names/enum/schema.sql ================================================ CREATE TYPE foo AS ENUM (); CREATE TABLE foos (); ================================================ FILE: internal/endtoend/testdata/duplicate_go_names/enum/sqlc.yaml ================================================ version: "2" sql: - schema: "schema.sql" queries: "query.sql" engine: "postgresql" gen: go: out: "db" ================================================ FILE: internal/endtoend/testdata/duplicate_go_names/enum/stderr.txt ================================================ # package error generating code: struct name conflicts with enum name: Foo ================================================ FILE: internal/endtoend/testdata/duplicate_go_names/null_enum/query.sql ================================================ -- name: GetFoos :many SELECT * FROM null_foos; ================================================ FILE: internal/endtoend/testdata/duplicate_go_names/null_enum/schema.sql ================================================ CREATE TYPE foo AS ENUM (); CREATE TABLE null_foos (); ================================================ FILE: internal/endtoend/testdata/duplicate_go_names/null_enum/sqlc.yaml ================================================ version: "2" sql: - schema: "schema.sql" queries: "query.sql" engine: "postgresql" gen: go: out: "db" ================================================ FILE: internal/endtoend/testdata/duplicate_go_names/null_enum/stderr.txt ================================================ # package error generating code: struct name conflicts with enum name: NullFoo ================================================ FILE: internal/endtoend/testdata/duplicate_go_names/query_constant/query.sql ================================================ -- name: Foo :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/duplicate_go_names/query_constant/schema.sql ================================================ CREATE TYPE foo AS ENUM (); ================================================ FILE: internal/endtoend/testdata/duplicate_go_names/query_constant/sqlc.yaml ================================================ version: "2" sql: - schema: "schema.sql" queries: "query.sql" engine: "postgresql" gen: go: out: "db" emit_exported_queries: true ================================================ FILE: internal/endtoend/testdata/duplicate_go_names/query_constant/stderr.txt ================================================ # package error generating code: query constant name conflicts with enum name: Foo ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 `db:"id" json:"id"` FirstName string `db:"first_name" json:"first_name"` LastName sql.NullString `db:"last_name" json:"last_name"` Age int32 `db:"age" json:"age"` } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); 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 } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/mysql/query.sql ================================================ /* name: GetAll :many */ SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/mysql/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "mysql", "emit_json_tags": true, "emit_db_tags": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 `db:"id" json:"id"` FirstName string `db:"first_name" json:"first_name"` LastName sql.NullString `db:"last_name" json:"last_name"` Age int32 `db:"age" json:"age"` } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "emit_db_tags": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type User struct { ID int32 `db:"id" json:"id"` FirstName string `db:"first_name" json:"first_name"` LastName pgtype.Text `db:"last_name" json:"last_name"` Age int32 `db:"age" json:"age"` } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "emit_db_tags": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 `db:"id" json:"id"` FirstName string `db:"first_name" json:"first_name"` LastName sql.NullString `db:"last_name" json:"last_name"` Age int32 `db:"age" json:"age"` } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); 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 } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "emit_db_tags": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int64 `db:"id" json:"id"` FirstName string `db:"first_name" json:"first_name"` LastName sql.NullString `db:"last_name" json:"last_name"` Age int64 `db:"age" json:"age"` } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); 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 } ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/sqlite/query.sql ================================================ /* name: GetAll :many */ SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/sqlite/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL PRIMARY KEY, first_name varchar NOT NULL, last_name varchar, age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_db_and_json_tags/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "sqlite", "emit_json_tags": true, "emit_db_tags": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 `db:"id"` FirstName string `db:"first_name"` LastName sql.NullString `db:"last_name"` Age int32 `db:"age"` } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); 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 } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/mysql/query.sql ================================================ /* name: GetAll :many */ SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/emit_db_tags/mysql/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_db_tags/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "mysql", "emit_db_tags": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 `db:"id"` FirstName string `db:"first_name"` LastName sql.NullString `db:"last_name"` Age int32 `db:"age"` } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_db_tags": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type User struct { ID int32 `db:"id"` FirstName string `db:"first_name"` LastName pgtype.Text `db:"last_name"` Age int32 `db:"age"` } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_db_tags": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 `db:"id"` FirstName string `db:"first_name"` LastName sql.NullString `db:"last_name"` Age int32 `db:"age"` } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); 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 } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_db_tags/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_db_tags": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int64 `db:"id"` FirstName string `db:"first_name"` LastName sql.NullString `db:"last_name"` Age int64 `db:"age"` } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); 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 } ================================================ FILE: internal/endtoend/testdata/emit_db_tags/sqlite/query.sql ================================================ /* name: GetAll :many */ SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/emit_db_tags/sqlite/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL PRIMARY KEY, first_name varchar NOT NULL, last_name varchar, age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_db_tags/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "sqlite", "emit_db_tags": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/pgx/v4/go/query.sql.go ================================================ // 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 bar ` func (q *Queries) ListBar(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(ctx, listBar) if err != nil { return nil, err } defer rows.Close() 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.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/pgx/v4/query.sql ================================================ -- name: ListBar :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/pgx/v4/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_empty_slices": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/pgx/v5/go/query.sql.go ================================================ // 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 bar ` func (q *Queries) ListBar(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(ctx, listBar) if err != nil { return nil, err } defer rows.Close() 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.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/pgx/v5/query.sql ================================================ -- name: ListBar :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/pgx/v5/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_empty_slices": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/stdlib/go/query.sql.go ================================================ // 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 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() 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 } ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/stdlib/query.sql ================================================ -- name: ListBar :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/stdlib/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/emit_empty_slices/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_empty_slices": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_enum_valid_and_values/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_enum_valid_and_values/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type IPProtocol string const ( IPProtocolTCP IPProtocol = "tcp" IpProtocolIp IPProtocol = "ip" IpProtocolIcmp IPProtocol = "icmp" ) func (e *IPProtocol) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = IPProtocol(s) case string: *e = IPProtocol(s) default: return fmt.Errorf("unsupported scan type for IPProtocol: %T", src) } return nil } type NullIPProtocol struct { IPProtocol IPProtocol Valid bool // Valid is true if IPProtocol is not NULL } // Scan implements the Scanner interface. func (ns *NullIPProtocol) Scan(value interface{}) error { if value == nil { ns.IPProtocol, ns.Valid = "", false return nil } ns.Valid = true return ns.IPProtocol.Scan(value) } // Value implements the driver Valuer interface. func (ns NullIPProtocol) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.IPProtocol), nil } func (e IPProtocol) Valid() bool { switch e { case IPProtocolTCP, IpProtocolIp, IpProtocolIcmp: return true } return false } func AllIPProtocolValues() []IPProtocol { return []IPProtocol{ IPProtocolTCP, IpProtocolIp, IpProtocolIcmp, } } type BarNew struct { IDNew int32 IpOld IPProtocol } ================================================ FILE: internal/endtoend/testdata/emit_enum_valid_and_values/go/query.sql.go ================================================ // 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_old, ip_old FROM bar_old ` func (q *Queries) ListBar(ctx context.Context) ([]BarNew, error) { rows, err := q.db.Query(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []BarNew for rows.Next() { var i BarNew if err := rows.Scan(&i.IDNew, &i.IpOld); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listFoo = `-- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old WHERE ip_old = $1 AND id_old = $2 ` type ListFooParams struct { IpOld IPProtocol IDNew int32 } type ListFooRow struct { FooNew int32 BazOld int32 } func (q *Queries) ListFoo(ctx context.Context, arg ListFooParams) ([]ListFooRow, error) { rows, err := q.db.Query(ctx, listFoo, arg.IpOld, arg.IDNew) if err != nil { return nil, err } defer rows.Close() var items []ListFooRow for rows.Next() { var i ListFooRow if err := rows.Scan(&i.FooNew, &i.BazOld); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/emit_enum_valid_and_values/query.sql ================================================ -- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old WHERE ip_old = $1 AND id_old = $2; -- name: ListBar :many SELECT * FROM bar_old; ================================================ FILE: internal/endtoend/testdata/emit_enum_valid_and_values/schema.sql ================================================ CREATE TYPE ip_protocol AS enum ('tcp', 'ip', 'icmp'); CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); ================================================ FILE: internal/endtoend/testdata/emit_enum_valid_and_values/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_enum_valid_method": true, "emit_all_enum_values": true } ], "rename": { "id_old": "IDNew", "bar_old": "BarNew", "foo_old": "FooNew", "ip_protocol": "IPProtocol", "ip_protocol_tcp": "IPProtocolTCP" } } ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const UpdateBarID = `-- name: UpdateBarID :exec UPDATE bar SET id = $1 WHERE id = $2 ` type UpdateBarIDParams struct { ID int32 ID_2 int32 } func (q *Queries) UpdateBarID(ctx context.Context, arg UpdateBarIDParams) error { _, err := q.db.Exec(ctx, UpdateBarID, arg.ID, arg.ID_2) return err } ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/pgx/v4/query.sql ================================================ -- name: UpdateBarID :exec UPDATE bar SET id = $1 WHERE id = $2; ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/pgx/v4/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_exported_queries": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const UpdateBarID = `-- name: UpdateBarID :exec UPDATE bar SET id = $1 WHERE id = $2 ` type UpdateBarIDParams struct { ID int32 ID_2 int32 } func (q *Queries) UpdateBarID(ctx context.Context, arg UpdateBarIDParams) error { _, err := q.db.Exec(ctx, UpdateBarID, arg.ID, arg.ID_2) return err } ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/pgx/v5/query.sql ================================================ -- name: UpdateBarID :exec UPDATE bar SET id = $1 WHERE id = $2; ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/pgx/v5/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_exported_queries": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const UpdateBarID = `-- name: UpdateBarID :exec UPDATE bar SET id = $1 WHERE id = $2 ` type UpdateBarIDParams struct { ID int32 ID_2 int32 } func (q *Queries) UpdateBarID(ctx context.Context, arg UpdateBarIDParams) error { _, err := q.db.ExecContext(ctx, UpdateBarID, arg.ID, arg.ID_2) return err } ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/stdlib/query.sql ================================================ -- name: UpdateBarID :exec UPDATE bar SET id = $1 WHERE id = $2; ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/stdlib/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/emit_exported_queries/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_exported_queries": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/mysql/go/db.go ================================================ // 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() *Queries { return &Queries{} } type Queries struct { } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 FirstName string LastName sql.NullString Age int32 } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context, db DBTX) ([]User, error) { rows, err := db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); 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 } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/mysql/query.sql ================================================ /* name: GetAll :many */ SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/mysql/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "mysql", "emit_methods_with_db_argument": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/go/db.go ================================================ // 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() *Queries { return &Queries{} } type Queries struct { } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 FirstName string LastName sql.NullString Age int32 } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context, db DBTX) ([]User, error) { rows, err := db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_methods_with_db_argument": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/go/db.go ================================================ // 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() *Queries { return &Queries{} } type Queries struct { } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type User struct { ID int32 FirstName string LastName pgtype.Text Age int32 } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context, db DBTX) ([]User, error) { rows, err := db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_methods_with_db_argument": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/go/db.go ================================================ // 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() *Queries { return &Queries{} } type Queries struct { } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 FirstName string LastName sql.NullString Age int32 } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context, db DBTX) ([]User, error) { rows, err := db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); 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 } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_methods_with_db_argument": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/go/db.go ================================================ // 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() *Queries { return &Queries{} } type Queries struct { } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int64 FirstName string LastName sql.NullString Age int64 } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context, db DBTX) ([]User, error) { rows, err := db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); 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 } ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/query.sql ================================================ /* name: GetAll :many */ SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL PRIMARY KEY, first_name varchar NOT NULL, last_name varchar, age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_methods_with_db_argument/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "sqlite", "emit_methods_with_db_argument": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype 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, } } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype import ( "time" "github.com/jackc/pgtype" ) type DtCharacter struct { A *string B *string C *string D *string E *string } type DtCharacterNotNull struct { A string B string C string D string E string } type DtDatetime struct { A *time.Time B *time.Time C *time.Time D *time.Time E *time.Time F *time.Time G *time.Time H *time.Time } type DtDatetimeNotNull struct { A time.Time B time.Time C time.Time D time.Time E time.Time F time.Time G time.Time H time.Time } type DtNetType struct { A pgtype.Inet B pgtype.CIDR C pgtype.Macaddr } type DtNetTypesNotNull struct { A pgtype.Inet B pgtype.CIDR C pgtype.Macaddr } type DtNumeric struct { A *int16 B *int32 C *int64 D pgtype.Numeric E pgtype.Numeric F *float32 G *float64 H *int16 I *int32 J *int64 K *int16 L *int32 M *int64 } type DtNumericNotNull struct { A int16 B int32 C int64 D pgtype.Numeric E pgtype.Numeric F float32 G float64 H int16 I int32 J int64 K int16 L int32 M int64 } type DtRange struct { A pgtype.Int4range B pgtype.Int8range C pgtype.Numrange D pgtype.Tsrange E pgtype.Tstzrange F pgtype.Daterange } type DtRangeNotNull struct { A pgtype.Int4range B pgtype.Int8range C pgtype.Numrange D pgtype.Tsrange E pgtype.Tstzrange F pgtype.Daterange } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/sql/character.sql ================================================ -- Character Types -- https://www.postgresql.org/docs/current/datatype-character.html CREATE TABLE dt_character ( a text, b character varying(32), c varchar(32), d character(32), e char(32) ); CREATE TABLE dt_character_not_null ( a text NOT NULL, b character varying(32) NOT NULL, c varchar(32) NOT NULL, d character(32) NOT NULL, e char(32) NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/sql/datetime.sql ================================================ -- Date/Time Types -- https://www.postgresql.org/docs/current/datatype-datetime.html CREATE TABLE dt_datetime ( a DATE, b TIME, c TIME WITHOUT TIME ZONE, d TIME WITH TIME ZONE, e TIMESTAMP, f TIMESTAMP WITHOUT TIME ZONE, g TIMESTAMP WITH TIME ZONE, h timestamptz ); CREATE TABLE dt_datetime_not_null ( a DATE NOT NULL, b TIME NOT NULL, c TIME WITHOUT TIME ZONE NOT NULL, d TIME WITH TIME ZONE NOT NULL, e TIMESTAMP NOT NULL, f TIMESTAMP WITHOUT TIME ZONE NOT NULL, g TIMESTAMP WITH TIME ZONE NOT NULL, h timestamptz NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/sql/net-types.sql ================================================ -- Network Address Types -- https://www.postgresql.org/docs/current/datatype-net-types.html CREATE TABLE dt_net_types ( a inet, b cidr, c macaddr ); CREATE TABLE dt_net_types_not_null ( a inet NOT NULL, b cidr NOT NULL, c macaddr NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/sql/numeric.sql ================================================ -- Numeric Types -- https://www.postgresql.org/docs/current/datatype-numeric.html CREATE TABLE dt_numeric ( -- TODO: this maps incorrectly to int16, not NullInt16 a smallint, b integer, c bigint, d decimal, e numeric, f real, g double precision, -- TODO: this maps incorrectly to int16, not NullInt16 h smallserial, i serial, j bigserial, -- TODO: this maps incorrectly to int16, not NullInt16 k int2, l int4, m int8 ); CREATE TABLE dt_numeric_not_null ( a smallint NOT NULL, b integer NOT NULL, c bigint NOT NULL, d decimal NOT NULL, e numeric NOT NULL, f real NOT NULL, g double precision NOT NULL, h smallserial NOT NULL, i serial NOT NULL, j bigserial NOT NULL, k int2 NOT NULL, l int4 NOT NULL, m int8 NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/sql/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/sql/rangetypes.sql ================================================ -- Range Types -- https://www.postgresql.org/docs/current/rangetypes.html CREATE TABLE dt_range ( a int4range, b int8range, c numrange, d tsrange, e tstzrange, f daterange ); CREATE TABLE dt_range_not_null ( a int4range NOT NULL, b int8range NOT NULL, c numrange NOT NULL, d tsrange NOT NULL, e tstzrange NOT NULL, f daterange NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "datatype", "schema": "sql/", "queries": "sql/", "emit_pointers_for_null_types": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype 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, } } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype import ( "net" "net/netip" "time" "github.com/jackc/pgx/v5/pgtype" ) type DtCharacter struct { A *string B *string C *string D *string E *string } type DtCharacterNotNull struct { A string B string C string D string E string } type DtDatetime struct { A pgtype.Date B pgtype.Time C pgtype.Time D *time.Time E pgtype.Timestamp F pgtype.Timestamp G pgtype.Timestamptz H pgtype.Timestamptz } type DtDatetimeNotNull struct { A pgtype.Date B pgtype.Time C pgtype.Time D time.Time E pgtype.Timestamp F pgtype.Timestamp G pgtype.Timestamptz H pgtype.Timestamptz } type DtNetType struct { A *netip.Addr B *netip.Prefix C net.HardwareAddr } type DtNetTypesNotNull struct { A netip.Addr B netip.Prefix C net.HardwareAddr } type DtNumeric struct { A *int16 B *int32 C *int64 D pgtype.Numeric E pgtype.Numeric F *float32 G *float64 H *int16 I *int32 J *int64 K *int16 L *int32 M *int64 } type DtNumericNotNull struct { A int16 B int32 C int64 D pgtype.Numeric E pgtype.Numeric F float32 G float64 H int16 I int32 J int64 K int16 L int32 M int64 } type DtRange struct { A pgtype.Range[pgtype.Int4] B pgtype.Range[pgtype.Int8] C pgtype.Range[pgtype.Numeric] D pgtype.Range[pgtype.Timestamp] E pgtype.Range[pgtype.Timestamptz] F pgtype.Range[pgtype.Date] } type DtRangeNotNull struct { A pgtype.Range[pgtype.Int4] B pgtype.Range[pgtype.Int8] C pgtype.Range[pgtype.Numeric] D pgtype.Range[pgtype.Timestamp] E pgtype.Range[pgtype.Timestamptz] F pgtype.Range[pgtype.Date] } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/sql/character.sql ================================================ -- Character Types -- https://www.postgresql.org/docs/current/datatype-character.html CREATE TABLE dt_character ( a text, b character varying(32), c varchar(32), d character(32), e char(32) ); CREATE TABLE dt_character_not_null ( a text NOT NULL, b character varying(32) NOT NULL, c varchar(32) NOT NULL, d character(32) NOT NULL, e char(32) NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/sql/datetime.sql ================================================ -- Date/Time Types -- https://www.postgresql.org/docs/current/datatype-datetime.html CREATE TABLE dt_datetime ( a DATE, b TIME, c TIME WITHOUT TIME ZONE, d TIME WITH TIME ZONE, e TIMESTAMP, f TIMESTAMP WITHOUT TIME ZONE, g TIMESTAMP WITH TIME ZONE, h timestamptz ); CREATE TABLE dt_datetime_not_null ( a DATE NOT NULL, b TIME NOT NULL, c TIME WITHOUT TIME ZONE NOT NULL, d TIME WITH TIME ZONE NOT NULL, e TIMESTAMP NOT NULL, f TIMESTAMP WITHOUT TIME ZONE NOT NULL, g TIMESTAMP WITH TIME ZONE NOT NULL, h timestamptz NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/sql/net-types.sql ================================================ -- Network Address Types -- https://www.postgresql.org/docs/current/datatype-net-types.html CREATE TABLE dt_net_types ( a inet, b cidr, c macaddr ); CREATE TABLE dt_net_types_not_null ( a inet NOT NULL, b cidr NOT NULL, c macaddr NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/sql/numeric.sql ================================================ -- Numeric Types -- https://www.postgresql.org/docs/current/datatype-numeric.html CREATE TABLE dt_numeric ( -- TODO: this maps incorrectly to int16, not NullInt16 a smallint, b integer, c bigint, d decimal, e numeric, f real, g double precision, -- TODO: this maps incorrectly to int16, not NullInt16 h smallserial, i serial, j bigserial, -- TODO: this maps incorrectly to int16, not NullInt16 k int2, l int4, m int8 ); CREATE TABLE dt_numeric_not_null ( a smallint NOT NULL, b integer NOT NULL, c bigint NOT NULL, d decimal NOT NULL, e numeric NOT NULL, f real NOT NULL, g double precision NOT NULL, h smallserial NOT NULL, i serial NOT NULL, j bigserial NOT NULL, k int2 NOT NULL, l int4 NOT NULL, m int8 NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/sql/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/sql/rangetypes.sql ================================================ -- Range Types -- https://www.postgresql.org/docs/current/rangetypes.html CREATE TABLE dt_range ( a int4range, b int8range, c numrange, d tsrange, e tstzrange, f daterange ); CREATE TABLE dt_range_not_null ( a int4range NOT NULL, b int8range NOT NULL, c numrange NOT NULL, d tsrange NOT NULL, e tstzrange NOT NULL, f daterange NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "datatype", "schema": "sql/", "queries": "sql/", "emit_pointers_for_null_types": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/sql/query.sql ================================================ -- name: Noop :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/sql/types.sql ================================================ 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 ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "datatype", "schema": "sql/types.sql", "queries": "sql/query.sql", "emit_pointers_for_null_types": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype import ( "database/sql" "time" "github.com/sqlc-dev/pqtype" ) type DtCharacter struct { A sql.NullString B sql.NullString C sql.NullString D sql.NullString E sql.NullString } type DtCharacterNotNull struct { A string B string C string D string E string } type DtDatetime struct { A sql.NullTime B sql.NullTime C sql.NullTime D sql.NullTime E sql.NullTime F sql.NullTime G sql.NullTime H sql.NullTime } type DtDatetimeNotNull struct { A time.Time B time.Time C time.Time D time.Time E time.Time F time.Time G time.Time H time.Time } type DtNetType struct { A pqtype.Inet B pqtype.CIDR C pqtype.Macaddr } type DtNetTypesNotNull struct { A pqtype.Inet B pqtype.CIDR C pqtype.Macaddr } type DtNumeric struct { A sql.NullInt16 B sql.NullInt32 C sql.NullInt64 D sql.NullString E sql.NullString F sql.NullFloat64 G sql.NullFloat64 H sql.NullInt16 I sql.NullInt32 J sql.NullInt64 K sql.NullInt16 L sql.NullInt32 M sql.NullInt64 } type DtNumericNotNull struct { A int16 B int32 C int64 D string E string F float32 G float64 H int16 I int32 J int64 K int16 L int32 M int64 } type DtRange struct { A interface{} B interface{} C interface{} D interface{} E interface{} F interface{} } type DtRangeNotNull struct { A interface{} B interface{} C interface{} D interface{} E interface{} F interface{} } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/sql/character.sql ================================================ -- Character Types -- https://www.postgresql.org/docs/current/datatype-character.html CREATE TABLE dt_character ( a text, b character varying(32), c varchar(32), d character(32), e char(32) ); CREATE TABLE dt_character_not_null ( a text NOT NULL, b character varying(32) NOT NULL, c varchar(32) NOT NULL, d character(32) NOT NULL, e char(32) NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/sql/datetime.sql ================================================ -- Date/Time Types -- https://www.postgresql.org/docs/current/datatype-datetime.html CREATE TABLE dt_datetime ( a DATE, b TIME, c TIME WITHOUT TIME ZONE, d TIME WITH TIME ZONE, e TIMESTAMP, f TIMESTAMP WITHOUT TIME ZONE, g TIMESTAMP WITH TIME ZONE, h timestamptz ); CREATE TABLE dt_datetime_not_null ( a DATE NOT NULL, b TIME NOT NULL, c TIME WITHOUT TIME ZONE NOT NULL, d TIME WITH TIME ZONE NOT NULL, e TIMESTAMP NOT NULL, f TIMESTAMP WITHOUT TIME ZONE NOT NULL, g TIMESTAMP WITH TIME ZONE NOT NULL, h timestamptz NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/sql/net-types.sql ================================================ -- Network Address Types -- https://www.postgresql.org/docs/current/datatype-net-types.html CREATE TABLE dt_net_types ( a inet, b cidr, c macaddr ); CREATE TABLE dt_net_types_not_null ( a inet NOT NULL, b cidr NOT NULL, c macaddr NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/sql/numeric.sql ================================================ -- Numeric Types -- https://www.postgresql.org/docs/current/datatype-numeric.html CREATE TABLE dt_numeric ( -- TODO: this maps incorrectly to int16, not NullInt16 a smallint, b integer, c bigint, d decimal, e numeric, f real, g double precision, -- TODO: this maps incorrectly to int16, not NullInt16 h smallserial, i serial, j bigserial, -- TODO: this maps incorrectly to int16, not NullInt16 k int2, l int4, m int8 ); CREATE TABLE dt_numeric_not_null ( a smallint NOT NULL, b integer NOT NULL, c bigint NOT NULL, d decimal NOT NULL, e numeric NOT NULL, f real NOT NULL, g double precision NOT NULL, h smallserial NOT NULL, i serial NOT NULL, j bigserial NOT NULL, k int2 NOT NULL, l int4 NOT NULL, m int8 NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/sql/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/sql/rangetypes.sql ================================================ -- Range Types -- https://www.postgresql.org/docs/current/rangetypes.html CREATE TABLE dt_range ( a int4range, b int8range, c numrange, d tsrange, e tstzrange, f daterange ); CREATE TABLE dt_range_not_null ( a int4range NOT NULL, b int8range NOT NULL, c numrange NOT NULL, d tsrange NOT NULL, e tstzrange NOT NULL, f daterange NOT NULL ); ================================================ FILE: internal/endtoend/testdata/emit_pointers_for_null_types/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "datatype", "schema": "sql/", "queries": "sql/", "emit_pointers_for_null_types": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { A sql.NullInt32 B sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" "database/sql" ) type Querier interface { GetAll(ctx context.Context) ([]*Foo, error) GetAllAByB(ctx context.Context, b sql.NullInt32) ([]sql.NullInt32, error) GetOne(ctx context.Context, arg *GetOneParams) (*Foo, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getAll = `-- name: GetAll :many SELECT a, b FROM foo ` func (q *Queries) GetAll(ctx context.Context) ([]*Foo, error) { rows, err := q.db.QueryContext(ctx, getAll) 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 getAllAByB = `-- name: GetAllAByB :many SELECT a FROM foo WHERE b = ? ` func (q *Queries) GetAllAByB(ctx context.Context, b sql.NullInt32) ([]sql.NullInt32, error) { rows, err := q.db.QueryContext(ctx, getAllAByB, b) if err != nil { return nil, err } defer rows.Close() var items []sql.NullInt32 for rows.Next() { var a sql.NullInt32 if err := rows.Scan(&a); err != nil { return nil, err } items = append(items, a) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getOne = `-- name: GetOne :one SELECT a, b FROM foo WHERE a = ? AND b = ? LIMIT 1 ` type GetOneParams struct { A sql.NullInt32 B sql.NullInt32 } func (q *Queries) GetOne(ctx context.Context, arg *GetOneParams) (*Foo, error) { row := q.db.QueryRowContext(ctx, getOne, arg.A, arg.B) var i Foo err := row.Scan(&i.A, &i.B) return &i, err } ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/query.sql ================================================ /* name: GetOne :one */ SELECT * FROM foo WHERE a = ? AND b = ? LIMIT 1; /* name: GetAll :many */ SELECT * FROM foo; /* name: GetAllAByB :many */ SELECT a FROM foo WHERE b = ?; ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/schema.sql ================================================ CREATE TABLE foo (a integer, b integer); ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "mysql", "emit_interface": true, "emit_result_struct_pointers": true, "emit_params_struct_pointers": true } ] } ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/batch.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: batch.go package querytest import ( "context" "database/sql" "errors" "github.com/jackc/pgx/v4" ) var ( ErrBatchAlreadyClosed = errors.New("batch already closed") ) const insertValues = `-- name: InsertValues :batchone INSERT INTO foo (a, b) VALUES ($1, $2) ON CONFLICT DO NOTHING RETURNING a, b ` type InsertValuesBatchResults struct { br pgx.BatchResults tot int closed bool } type InsertValuesParams struct { A sql.NullInt32 B sql.NullInt32 } func (q *Queries) InsertValues(ctx context.Context, arg []*InsertValuesParams) *InsertValuesBatchResults { batch := &pgx.Batch{} for _, a := range arg { vals := []interface{}{ a.A, a.B, } batch.Queue(insertValues, vals...) } br := q.db.SendBatch(ctx, batch) return &InsertValuesBatchResults{br, len(arg), false} } func (b *InsertValuesBatchResults) QueryRow(f func(int, *Foo, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var i Foo if b.closed { if f != nil { f(t, nil, ErrBatchAlreadyClosed) } continue } row := b.br.QueryRow() err := row.Scan(&i.A, &i.B) if f != nil { f(t, &i, err) } } } func (b *InsertValuesBatchResults) Close() error { b.closed = true return b.br.Close() } ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/db.go ================================================ // 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 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, } } ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { A sql.NullInt32 B sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getAll = `-- name: GetAll :many SELECT a, b FROM foo ` func (q *Queries) GetAll(ctx context.Context) ([]*Foo, error) { rows, err := q.db.Query(ctx, getAll) 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 getAllAByB = `-- name: GetAllAByB :many SELECT a FROM foo WHERE b = $1 ` func (q *Queries) GetAllAByB(ctx context.Context, b sql.NullInt32) ([]sql.NullInt32, error) { rows, err := q.db.Query(ctx, getAllAByB, b) if err != nil { return nil, err } defer rows.Close() var items []sql.NullInt32 for rows.Next() { var a sql.NullInt32 if err := rows.Scan(&a); err != nil { return nil, err } items = append(items, a) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getOne = `-- name: GetOne :one SELECT a, b FROM foo WHERE a = $1 AND b = $2 LIMIT 1 ` type GetOneParams struct { A sql.NullInt32 B sql.NullInt32 } func (q *Queries) GetOne(ctx context.Context, arg *GetOneParams) (*Foo, error) { row := q.db.QueryRow(ctx, getOne, arg.A, arg.B) var i Foo err := row.Scan(&i.A, &i.B) return &i, err } ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/query.sql ================================================ -- name: InsertValues :batchone INSERT INTO foo (a, b) VALUES ($1, $2) ON CONFLICT DO NOTHING RETURNING *; -- name: GetOne :one SELECT * FROM foo WHERE a = $1 AND b = $2 LIMIT 1; -- name: GetAll :many SELECT * FROM foo; -- name: GetAllAByB :many SELECT a FROM foo WHERE b = $1; ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (a integer, b integer); ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v4/sqlc.json ================================================ { "version": "2", "sql": [ { "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { "package": "querytest", "sql_package": "pgx/v4", "out": "go", "emit_result_struct_pointers": true, "emit_params_struct_pointers": true } } } ] } ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/batch.go ================================================ // 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 insertValues = `-- name: InsertValues :batchone INSERT INTO foo (a, b) VALUES ($1, $2) ON CONFLICT DO NOTHING RETURNING a, b ` type InsertValuesBatchResults struct { br pgx.BatchResults tot int closed bool } type InsertValuesParams struct { A pgtype.Int4 B pgtype.Int4 } func (q *Queries) InsertValues(ctx context.Context, arg []*InsertValuesParams) *InsertValuesBatchResults { batch := &pgx.Batch{} for _, a := range arg { vals := []interface{}{ a.A, a.B, } batch.Queue(insertValues, vals...) } br := q.db.SendBatch(ctx, batch) return &InsertValuesBatchResults{br, len(arg), false} } func (b *InsertValuesBatchResults) QueryRow(f func(int, *Foo, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var i Foo if b.closed { if f != nil { f(t, nil, ErrBatchAlreadyClosed) } continue } row := b.br.QueryRow() err := row.Scan(&i.A, &i.B) if f != nil { f(t, &i, err) } } } func (b *InsertValuesBatchResults) Close() error { b.closed = true return b.br.Close() } ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { A pgtype.Int4 B pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 getAll = `-- name: GetAll :many SELECT a, b FROM foo ` func (q *Queries) GetAll(ctx context.Context) ([]*Foo, error) { rows, err := q.db.Query(ctx, getAll) 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 getAllAByB = `-- name: GetAllAByB :many SELECT a FROM foo WHERE b = $1 ` func (q *Queries) GetAllAByB(ctx context.Context, b pgtype.Int4) ([]pgtype.Int4, error) { rows, err := q.db.Query(ctx, getAllAByB, b) if err != nil { return nil, err } defer rows.Close() var items []pgtype.Int4 for rows.Next() { var a pgtype.Int4 if err := rows.Scan(&a); err != nil { return nil, err } items = append(items, a) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getOne = `-- name: GetOne :one SELECT a, b FROM foo WHERE a = $1 AND b = $2 LIMIT 1 ` type GetOneParams struct { A pgtype.Int4 B pgtype.Int4 } func (q *Queries) GetOne(ctx context.Context, arg *GetOneParams) (*Foo, error) { row := q.db.QueryRow(ctx, getOne, arg.A, arg.B) var i Foo err := row.Scan(&i.A, &i.B) return &i, err } ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/query.sql ================================================ -- name: InsertValues :batchone INSERT INTO foo (a, b) VALUES ($1, $2) ON CONFLICT DO NOTHING RETURNING *; -- name: GetOne :one SELECT * FROM foo WHERE a = $1 AND b = $2 LIMIT 1; -- name: GetAll :many SELECT * FROM foo; -- name: GetAllAByB :many SELECT a FROM foo WHERE b = $1; ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (a integer, b integer); ================================================ FILE: internal/endtoend/testdata/emit_result_and_params_struct_pointers/postgresql/pgx/v5/sqlc.json ================================================ { "version": "2", "sql": [ { "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { "package": "querytest", "sql_package": "pgx/v5", "out": "go", "emit_result_struct_pointers": true, "emit_params_struct_pointers": true } } } ] } ================================================ FILE: internal/endtoend/testdata/emit_sql_as_comment/stdlib/exec.json ================================================ { "os": ["darwin", "linux"] } ================================================ FILE: internal/endtoend/testdata/emit_sql_as_comment/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/emit_sql_as_comment/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/emit_sql_as_comment/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/emit_sql_as_comment/stdlib/query.sql ================================================ -- name: ListBar :many -- Lists all bars SELECT id FROM ( SELECT * FROM bar ) bar; -- name: RemoveBar :exec DELETE FROM bar WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/emit_sql_as_comment/stdlib/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/emit_sql_as_comment/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_sql_as_comment": true } ] } ================================================ FILE: internal/endtoend/testdata/enum/mysql/go/db.go ================================================ // 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() *Queries { return &Queries{} } type Queries struct { } ================================================ FILE: internal/endtoend/testdata/enum/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "database/sql/driver" "fmt" ) type UsersShirtSize string const ( UsersShirtSizeXSmall UsersShirtSize = "x-small" UsersShirtSizeSmall UsersShirtSize = "small" UsersShirtSizeMedium UsersShirtSize = "medium" UsersShirtSizeLarge UsersShirtSize = "large" UsersShirtSizeXLarge UsersShirtSize = "x-large" ) func (e *UsersShirtSize) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = UsersShirtSize(s) case string: *e = UsersShirtSize(s) default: return fmt.Errorf("unsupported scan type for UsersShirtSize: %T", src) } return nil } type NullUsersShirtSize struct { UsersShirtSize UsersShirtSize Valid bool // Valid is true if UsersShirtSize is not NULL } // Scan implements the Scanner interface. func (ns *NullUsersShirtSize) Scan(value interface{}) error { if value == nil { ns.UsersShirtSize, ns.Valid = "", false return nil } ns.Valid = true return ns.UsersShirtSize.Scan(value) } // Value implements the driver Valuer interface. func (ns NullUsersShirtSize) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.UsersShirtSize), nil } type UsersShoeSize string const ( UsersShoeSizeXSmall UsersShoeSize = "x-small" UsersShoeSizeSmall UsersShoeSize = "small" UsersShoeSizeMedium UsersShoeSize = "medium" UsersShoeSizeLarge UsersShoeSize = "large" UsersShoeSizeXLarge UsersShoeSize = "x-large" ) func (e *UsersShoeSize) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = UsersShoeSize(s) case string: *e = UsersShoeSize(s) default: return fmt.Errorf("unsupported scan type for UsersShoeSize: %T", src) } return nil } type NullUsersShoeSize struct { UsersShoeSize UsersShoeSize Valid bool // Valid is true if UsersShoeSize is not NULL } // Scan implements the Scanner interface. func (ns *NullUsersShoeSize) Scan(value interface{}) error { if value == nil { ns.UsersShoeSize, ns.Valid = "", false return nil } ns.Valid = true return ns.UsersShoeSize.Scan(value) } // Value implements the driver Valuer interface. func (ns NullUsersShoeSize) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.UsersShoeSize), nil } type User struct { ID int32 FirstName string LastName sql.NullString Age int32 ShoeSize UsersShoeSize ShirtSize NullUsersShirtSize } ================================================ FILE: internal/endtoend/testdata/enum/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const deleteBySize = `-- name: DeleteBySize :exec DELETE FROM users WHERE shoe_size = ? AND shirt_size = ? ` type DeleteBySizeParams struct { ShoeSize UsersShoeSize ShirtSize NullUsersShirtSize } func (q *Queries) DeleteBySize(ctx context.Context, db DBTX, arg DeleteBySizeParams) error { _, err := db.ExecContext(ctx, deleteBySize, arg.ShoeSize, arg.ShirtSize) return err } const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age, shoe_size, shirt_size FROM users ` func (q *Queries) GetAll(ctx context.Context, db DBTX) ([]User, error) { rows, err := db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, &i.ShoeSize, &i.ShirtSize, ); 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 newUser = `-- name: NewUser :exec INSERT INTO users ( id, first_name, last_name, age, shoe_size, shirt_size ) VALUES (?, ?, ?, ?, ?, ?) ` type NewUserParams struct { ID int32 FirstName string LastName sql.NullString Age int32 ShoeSize UsersShoeSize ShirtSize NullUsersShirtSize } func (q *Queries) NewUser(ctx context.Context, db DBTX, arg NewUserParams) error { _, err := db.ExecContext(ctx, newUser, arg.ID, arg.FirstName, arg.LastName, arg.Age, arg.ShoeSize, arg.ShirtSize, ) return err } const updateSizes = `-- name: UpdateSizes :exec UPDATE users SET shoe_size = ?, shirt_size = ? WHERE id = ? ` type UpdateSizesParams struct { ShoeSize UsersShoeSize ShirtSize NullUsersShirtSize ID int32 } func (q *Queries) UpdateSizes(ctx context.Context, db DBTX, arg UpdateSizesParams) error { _, err := db.ExecContext(ctx, updateSizes, arg.ShoeSize, arg.ShirtSize, arg.ID) return err } ================================================ FILE: internal/endtoend/testdata/enum/mysql/query.sql ================================================ /* name: GetAll :many */ SELECT * FROM users; -- name: NewUser :exec INSERT INTO users ( id, first_name, last_name, age, shoe_size, shirt_size ) VALUES (?, ?, ?, ?, ?, ?); -- name: UpdateSizes :exec UPDATE users SET shoe_size = ?, shirt_size = ? WHERE id = ?; -- name: DeleteBySize :exec DELETE FROM users WHERE shoe_size = ? AND shirt_size = ?; ================================================ FILE: internal/endtoend/testdata/enum/mysql/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL, shoe_size ENUM('x-small', 'small', 'medium', 'large', 'x-large') NOT NULL, shirt_size ENUM('x-small', 'small', 'medium', 'large', 'x-large') ); ================================================ FILE: internal/endtoend/testdata/enum/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "mysql", "emit_methods_with_db_argument": true } ] } ================================================ FILE: internal/endtoend/testdata/enum/postgresql/pgx/v4/go/db.go ================================================ // 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() *Queries { return &Queries{} } type Queries struct { } ================================================ FILE: internal/endtoend/testdata/enum/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "database/sql/driver" "fmt" ) type Size string const ( SizeXSmall Size = "x-small" SizeSmall Size = "small" SizeMedium Size = "medium" SizeLarge Size = "large" SizeXLarge Size = "x-large" ) func (e *Size) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Size(s) case string: *e = Size(s) default: return fmt.Errorf("unsupported scan type for Size: %T", src) } return nil } type NullSize struct { Size Size Valid bool // Valid is true if Size is not NULL } // Scan implements the Scanner interface. func (ns *NullSize) Scan(value interface{}) error { if value == nil { ns.Size, ns.Valid = "", false return nil } ns.Valid = true return ns.Size.Scan(value) } // Value implements the driver Valuer interface. func (ns NullSize) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Size), nil } type User struct { ID int32 FirstName string LastName sql.NullString Age int32 ShoeSize Size ShirtSize NullSize } ================================================ FILE: internal/endtoend/testdata/enum/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const deleteBySize = `-- name: DeleteBySize :exec DELETE FROM users WHERE shoe_size = $1 AND shirt_size = $2 ` type DeleteBySizeParams struct { ShoeSize Size ShirtSize NullSize } func (q *Queries) DeleteBySize(ctx context.Context, db DBTX, arg DeleteBySizeParams) error { _, err := db.Exec(ctx, deleteBySize, arg.ShoeSize, arg.ShirtSize) return err } const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age, shoe_size, shirt_size FROM users ` func (q *Queries) GetAll(ctx context.Context, db DBTX) ([]User, error) { rows, err := db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, &i.ShoeSize, &i.ShirtSize, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const newUser = `-- name: NewUser :exec INSERT INTO users ( first_name, last_name, age, shoe_size, shirt_size ) VALUES ($1, $2, $3, $4, $5) ` type NewUserParams struct { FirstName string LastName sql.NullString Age int32 ShoeSize Size ShirtSize NullSize } func (q *Queries) NewUser(ctx context.Context, db DBTX, arg NewUserParams) error { _, err := db.Exec(ctx, newUser, arg.FirstName, arg.LastName, arg.Age, arg.ShoeSize, arg.ShirtSize, ) return err } const updateSizes = `-- name: UpdateSizes :exec UPDATE users SET shoe_size = $2, shirt_size = $3 WHERE id = $1 ` type UpdateSizesParams struct { ID int32 ShoeSize Size ShirtSize NullSize } func (q *Queries) UpdateSizes(ctx context.Context, db DBTX, arg UpdateSizesParams) error { _, err := db.Exec(ctx, updateSizes, arg.ID, arg.ShoeSize, arg.ShirtSize) return err } ================================================ FILE: internal/endtoend/testdata/enum/postgresql/pgx/v4/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; -- name: NewUser :exec INSERT INTO users ( first_name, last_name, age, shoe_size, shirt_size ) VALUES ($1, $2, $3, $4, $5); -- name: UpdateSizes :exec UPDATE users SET shoe_size = $2, shirt_size = $3 WHERE id = $1; -- name: DeleteBySize :exec DELETE FROM users WHERE shoe_size = $1 AND shirt_size = $2; ================================================ FILE: internal/endtoend/testdata/enum/postgresql/pgx/v4/schema.sql ================================================ CREATE TYPE size AS ENUM('x-small', 'small', 'medium', 'large', 'x-large'); CREATE TABLE users ( id integer NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL, shoe_size size NOT NULL, shirt_size size ); ================================================ FILE: internal/endtoend/testdata/enum/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_methods_with_db_argument": true } ] } ================================================ FILE: internal/endtoend/testdata/enum/postgresql/pgx/v5/go/db.go ================================================ // 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() *Queries { return &Queries{} } type Queries struct { } ================================================ FILE: internal/endtoend/testdata/enum/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" "github.com/jackc/pgx/v5/pgtype" ) type Size string const ( SizeXSmall Size = "x-small" SizeSmall Size = "small" SizeMedium Size = "medium" SizeLarge Size = "large" SizeXLarge Size = "x-large" ) func (e *Size) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Size(s) case string: *e = Size(s) default: return fmt.Errorf("unsupported scan type for Size: %T", src) } return nil } type NullSize struct { Size Size Valid bool // Valid is true if Size is not NULL } // Scan implements the Scanner interface. func (ns *NullSize) Scan(value interface{}) error { if value == nil { ns.Size, ns.Valid = "", false return nil } ns.Valid = true return ns.Size.Scan(value) } // Value implements the driver Valuer interface. func (ns NullSize) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Size), nil } type User struct { ID int32 FirstName string LastName pgtype.Text Age int32 ShoeSize Size ShirtSize NullSize } ================================================ FILE: internal/endtoend/testdata/enum/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 deleteBySize = `-- name: DeleteBySize :exec DELETE FROM users WHERE shoe_size = $1 AND shirt_size = $2 ` type DeleteBySizeParams struct { ShoeSize Size ShirtSize NullSize } func (q *Queries) DeleteBySize(ctx context.Context, db DBTX, arg DeleteBySizeParams) error { _, err := db.Exec(ctx, deleteBySize, arg.ShoeSize, arg.ShirtSize) return err } const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age, shoe_size, shirt_size FROM users ` func (q *Queries) GetAll(ctx context.Context, db DBTX) ([]User, error) { rows, err := db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, &i.ShoeSize, &i.ShirtSize, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const newUser = `-- name: NewUser :exec INSERT INTO users ( first_name, last_name, age, shoe_size, shirt_size ) VALUES ($1, $2, $3, $4, $5) ` type NewUserParams struct { FirstName string LastName pgtype.Text Age int32 ShoeSize Size ShirtSize NullSize } func (q *Queries) NewUser(ctx context.Context, db DBTX, arg NewUserParams) error { _, err := db.Exec(ctx, newUser, arg.FirstName, arg.LastName, arg.Age, arg.ShoeSize, arg.ShirtSize, ) return err } const updateSizes = `-- name: UpdateSizes :exec UPDATE users SET shoe_size = $2, shirt_size = $3 WHERE id = $1 ` type UpdateSizesParams struct { ID int32 ShoeSize Size ShirtSize NullSize } func (q *Queries) UpdateSizes(ctx context.Context, db DBTX, arg UpdateSizesParams) error { _, err := db.Exec(ctx, updateSizes, arg.ID, arg.ShoeSize, arg.ShirtSize) return err } ================================================ FILE: internal/endtoend/testdata/enum/postgresql/pgx/v5/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; -- name: NewUser :exec INSERT INTO users ( first_name, last_name, age, shoe_size, shirt_size ) VALUES ($1, $2, $3, $4, $5); -- name: UpdateSizes :exec UPDATE users SET shoe_size = $2, shirt_size = $3 WHERE id = $1; -- name: DeleteBySize :exec DELETE FROM users WHERE shoe_size = $1 AND shirt_size = $2; ================================================ FILE: internal/endtoend/testdata/enum/postgresql/pgx/v5/schema.sql ================================================ CREATE TYPE size AS ENUM('x-small', 'small', 'medium', 'large', 'x-large'); CREATE TABLE users ( id integer NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL, shoe_size size NOT NULL, shirt_size size ); ================================================ FILE: internal/endtoend/testdata/enum/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_methods_with_db_argument": true } ] } ================================================ FILE: internal/endtoend/testdata/enum/postgresql/stdlib/go/db.go ================================================ // 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() *Queries { return &Queries{} } type Queries struct { } ================================================ FILE: internal/endtoend/testdata/enum/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "database/sql/driver" "fmt" ) type Size string const ( SizeXSmall Size = "x-small" SizeSmall Size = "small" SizeMedium Size = "medium" SizeLarge Size = "large" SizeXLarge Size = "x-large" ) func (e *Size) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = Size(s) case string: *e = Size(s) default: return fmt.Errorf("unsupported scan type for Size: %T", src) } return nil } type NullSize struct { Size Size Valid bool // Valid is true if Size is not NULL } // Scan implements the Scanner interface. func (ns *NullSize) Scan(value interface{}) error { if value == nil { ns.Size, ns.Valid = "", false return nil } ns.Valid = true return ns.Size.Scan(value) } // Value implements the driver Valuer interface. func (ns NullSize) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.Size), nil } type User struct { ID int32 FirstName string LastName sql.NullString Age int32 ShoeSize Size ShirtSize NullSize } ================================================ FILE: internal/endtoend/testdata/enum/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const deleteBySize = `-- name: DeleteBySize :exec DELETE FROM users WHERE shoe_size = $1 AND shirt_size = $2 ` type DeleteBySizeParams struct { ShoeSize Size ShirtSize NullSize } func (q *Queries) DeleteBySize(ctx context.Context, db DBTX, arg DeleteBySizeParams) error { _, err := db.ExecContext(ctx, deleteBySize, arg.ShoeSize, arg.ShirtSize) return err } const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age, shoe_size, shirt_size FROM users ` func (q *Queries) GetAll(ctx context.Context, db DBTX) ([]User, error) { rows, err := db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, &i.ShoeSize, &i.ShirtSize, ); 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 newUser = `-- name: NewUser :exec INSERT INTO users ( first_name, last_name, age, shoe_size, shirt_size ) VALUES ($1, $2, $3, $4, $5) ` type NewUserParams struct { FirstName string LastName sql.NullString Age int32 ShoeSize Size ShirtSize NullSize } func (q *Queries) NewUser(ctx context.Context, db DBTX, arg NewUserParams) error { _, err := db.ExecContext(ctx, newUser, arg.FirstName, arg.LastName, arg.Age, arg.ShoeSize, arg.ShirtSize, ) return err } const updateSizes = `-- name: UpdateSizes :exec UPDATE users SET shoe_size = $2, shirt_size = $3 WHERE id = $1 ` type UpdateSizesParams struct { ID int32 ShoeSize Size ShirtSize NullSize } func (q *Queries) UpdateSizes(ctx context.Context, db DBTX, arg UpdateSizesParams) error { _, err := db.ExecContext(ctx, updateSizes, arg.ID, arg.ShoeSize, arg.ShirtSize) return err } ================================================ FILE: internal/endtoend/testdata/enum/postgresql/stdlib/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; -- name: NewUser :exec INSERT INTO users ( first_name, last_name, age, shoe_size, shirt_size ) VALUES ($1, $2, $3, $4, $5); -- name: UpdateSizes :exec UPDATE users SET shoe_size = $2, shirt_size = $3 WHERE id = $1; -- name: DeleteBySize :exec DELETE FROM users WHERE shoe_size = $1 AND shirt_size = $2; ================================================ FILE: internal/endtoend/testdata/enum/postgresql/stdlib/schema.sql ================================================ CREATE TYPE size AS ENUM('x-small', 'small', 'medium', 'large', 'x-large'); CREATE TABLE users ( id integer NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL, shoe_size size NOT NULL, shirt_size size ); ================================================ FILE: internal/endtoend/testdata/enum/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_methods_with_db_argument": true } ] } ================================================ FILE: internal/endtoend/testdata/enum_column/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1503 https://github.com/sqlc-dev/sqlc/issues/2475 ================================================ FILE: internal/endtoend/testdata/enum_column/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/enum_column/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type AuthorsAddItem string const ( AuthorsAddItemOk AuthorsAddItem = "ok" AuthorsAddItemAdded AuthorsAddItem = "added" ) func (e *AuthorsAddItem) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = AuthorsAddItem(s) case string: *e = AuthorsAddItem(s) default: return fmt.Errorf("unsupported scan type for AuthorsAddItem: %T", src) } return nil } type NullAuthorsAddItem struct { AuthorsAddItem AuthorsAddItem Valid bool // Valid is true if AuthorsAddItem is not NULL } // Scan implements the Scanner interface. func (ns *NullAuthorsAddItem) Scan(value interface{}) error { if value == nil { ns.AuthorsAddItem, ns.Valid = "", false return nil } ns.Valid = true return ns.AuthorsAddItem.Scan(value) } // Value implements the driver Valuer interface. func (ns NullAuthorsAddItem) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.AuthorsAddItem), nil } type AuthorsAdded string const ( AuthorsAddedOk AuthorsAdded = "ok" ) func (e *AuthorsAdded) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = AuthorsAdded(s) case string: *e = AuthorsAdded(s) default: return fmt.Errorf("unsupported scan type for AuthorsAdded: %T", src) } return nil } type NullAuthorsAdded struct { AuthorsAdded AuthorsAdded Valid bool // Valid is true if AuthorsAdded is not NULL } // Scan implements the Scanner interface. func (ns *NullAuthorsAdded) Scan(value interface{}) error { if value == nil { ns.AuthorsAdded, ns.Valid = "", false return nil } ns.Valid = true return ns.AuthorsAdded.Scan(value) } // Value implements the driver Valuer interface. func (ns NullAuthorsAdded) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.AuthorsAdded), nil } type AuthorsBar string const ( AuthorsBarOk AuthorsBar = "ok" ) func (e *AuthorsBar) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = AuthorsBar(s) case string: *e = AuthorsBar(s) default: return fmt.Errorf("unsupported scan type for AuthorsBar: %T", src) } return nil } type NullAuthorsBar struct { AuthorsBar AuthorsBar Valid bool // Valid is true if AuthorsBar is not NULL } // Scan implements the Scanner interface. func (ns *NullAuthorsBar) Scan(value interface{}) error { if value == nil { ns.AuthorsBar, ns.Valid = "", false return nil } ns.Valid = true return ns.AuthorsBar.Scan(value) } // Value implements the driver Valuer interface. func (ns NullAuthorsBar) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.AuthorsBar), nil } type AuthorsFoo string const ( AuthorsFooOk AuthorsFoo = "ok" ) func (e *AuthorsFoo) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = AuthorsFoo(s) case string: *e = AuthorsFoo(s) default: return fmt.Errorf("unsupported scan type for AuthorsFoo: %T", src) } return nil } type NullAuthorsFoo struct { AuthorsFoo AuthorsFoo Valid bool // Valid is true if AuthorsFoo is not NULL } // Scan implements the Scanner interface. func (ns *NullAuthorsFoo) Scan(value interface{}) error { if value == nil { ns.AuthorsFoo, ns.Valid = "", false return nil } ns.Valid = true return ns.AuthorsFoo.Scan(value) } // Value implements the driver Valuer interface. func (ns NullAuthorsFoo) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.AuthorsFoo), nil } type AuthorsRemoveItem string const ( AuthorsRemoveItemOk AuthorsRemoveItem = "ok" ) func (e *AuthorsRemoveItem) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = AuthorsRemoveItem(s) case string: *e = AuthorsRemoveItem(s) default: return fmt.Errorf("unsupported scan type for AuthorsRemoveItem: %T", src) } return nil } type NullAuthorsRemoveItem struct { AuthorsRemoveItem AuthorsRemoveItem Valid bool // Valid is true if AuthorsRemoveItem is not NULL } // Scan implements the Scanner interface. func (ns *NullAuthorsRemoveItem) Scan(value interface{}) error { if value == nil { ns.AuthorsRemoveItem, ns.Valid = "", false return nil } ns.Valid = true return ns.AuthorsRemoveItem.Scan(value) } // Value implements the driver Valuer interface. func (ns NullAuthorsRemoveItem) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.AuthorsRemoveItem), nil } type BooksFoo string const ( BooksFooOk BooksFoo = "ok" ) func (e *BooksFoo) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = BooksFoo(s) case string: *e = BooksFoo(s) default: return fmt.Errorf("unsupported scan type for BooksFoo: %T", src) } return nil } type NullBooksFoo struct { BooksFoo BooksFoo Valid bool // Valid is true if BooksFoo is not NULL } // Scan implements the Scanner interface. func (ns *NullBooksFoo) Scan(value interface{}) error { if value == nil { ns.BooksFoo, ns.Valid = "", false return nil } ns.Valid = true return ns.BooksFoo.Scan(value) } // Value implements the driver Valuer interface. func (ns NullBooksFoo) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.BooksFoo), nil } type Author struct { ID int64 Foo AuthorsFoo Bar AuthorsBar Added AuthorsAdded AddItem AuthorsAddItem RemoveItem AuthorsRemoveItem } type Book struct { ID int64 Foo BooksFoo } ================================================ FILE: internal/endtoend/testdata/enum_column/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthors = `-- name: ListAuthors :many SELECT id, foo, bar, added, add_item, remove_item FROM authors ` func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan( &i.ID, &i.Foo, &i.Bar, &i.Added, &i.AddItem, &i.RemoveItem, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listBooks = `-- name: ListBooks :many SELECT id, foo FROM books ` func (q *Queries) ListBooks(ctx context.Context) ([]Book, error) { rows, err := q.db.QueryContext(ctx, listBooks) if err != nil { return nil, err } defer rows.Close() var items []Book for rows.Next() { var i Book if err := rows.Scan(&i.ID, &i.Foo); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/enum_column/mysql/query.sql ================================================ /* name: ListAuthors :many */ SELECT * FROM authors; /* name: ListBooks :many */ SELECT * FROM books; ================================================ FILE: internal/endtoend/testdata/enum_column/mysql/schema.sql ================================================ CREATE TABLE authors ( id BIGINT PRIMARY KEY, foo ENUM("ok") DEFAULT "ok" NOT NULL, renamed ENUM("ok") DEFAULT "ok" NOT NULL, removed ENUM("ok") DEFAULT "ok" NOT NULL, add_item ENUM("ok") DEFAULT "ok" NOT NULL, remove_item ENUM("ok", "removed") DEFAULT "ok" NOT NULL ); CREATE TABLE renamed ( id BIGINT PRIMARY KEY, foo ENUM("ok") DEFAULT "ok" NOT NULL ); CREATE TABLE removed ( id BIGINT PRIMARY KEY, foo ENUM("ok") DEFAULT "ok" NOT NULL ); /* Rename column */ ALTER TABLE authors RENAME COLUMN renamed TO bar; /* Drop column */ ALTER TABLE authors DROP COLUMN removed; /* Add column */ ALTER TABLE authors ADD COLUMN added ENUM("ok") DEFAULT "ok" NOT NULL; /* Add enum values */ ALTER TABLE authors MODIFY add_item ENUM("ok", "added") DEFAULT "ok" NOT NULL; /* Remove enum values */ ALTER TABLE authors MODIFY remove_item ENUM("ok") DEFAULT "ok" NOT NULL; /* Drop table */ DROP TABLE removed; /* Rename table */ ALTER TABLE renamed RENAME TO books; ================================================ FILE: internal/endtoend/testdata/enum_column/mysql/sqlc.yaml ================================================ version: "2" sql: - engine: "mysql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" ================================================ FILE: internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql/driver" "fmt" ) type EnumType string const ( EnumTypeBeforefirst EnumType = "beforefirst" EnumTypeFirst EnumType = "first" EnumTypeSecond EnumType = "second" EnumTypeThird EnumType = "third" EnumTypeFourth EnumType = "fourth" EnumTypeFifth EnumType = "fifth" EnumTypeLast EnumType = "last" EnumTypeAfterlast EnumType = "afterlast" ) func (e *EnumType) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = EnumType(s) case string: *e = EnumType(s) default: return fmt.Errorf("unsupported scan type for EnumType: %T", src) } return nil } type NullEnumType struct { EnumType EnumType Valid bool // Valid is true if EnumType is not NULL } // Scan implements the Scanner interface. func (ns *NullEnumType) Scan(value interface{}) error { if value == nil { ns.EnumType, ns.Valid = "", false return nil } ns.Valid = true return ns.EnumType.Scan(value) } // Value implements the driver Valuer interface. func (ns NullEnumType) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.EnumType), nil } func (e EnumType) Valid() bool { switch e { case EnumTypeBeforefirst, EnumTypeFirst, EnumTypeSecond, EnumTypeThird, EnumTypeFourth, EnumTypeFifth, EnumTypeLast, EnumTypeAfterlast: return true } return false } func AllEnumTypeValues() []EnumType { return []EnumType{ EnumTypeBeforefirst, EnumTypeFirst, EnumTypeSecond, EnumTypeThird, EnumTypeFourth, EnumTypeFifth, EnumTypeLast, EnumTypeAfterlast, } } type Foo struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "context" ) type Querier interface { GetAll(ctx context.Context) ([]int32, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/enum_ordering/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const getAll = `-- name: GetAll :many SELECT id FROM foo ` func (q *Queries) GetAll(ctx context.Context) ([]int32, error) { rows, err := q.db.QueryContext(ctx, getAll) 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 } ================================================ FILE: internal/endtoend/testdata/enum_ordering/postgresql/stdlib/query.sql ================================================ -- name: GetAll :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/enum_ordering/postgresql/stdlib/schema.sql ================================================ CREATE TYPE enum_type AS ENUM ('first', 'last'); ALTER TYPE enum_type ADD VALUE 'afterlast' AFTER 'last'; ALTER TYPE enum_type ADD VALUE 'third' AFTER 'first'; ALTER TYPE enum_type ADD VALUE 'fourth' BEFORE 'last'; ALTER TYPE enum_type ADD VALUE 'fifth' AFTER 'fourth'; ALTER TYPE enum_type ADD VALUE 'second' BEFORE 'third'; ALTER TYPE enum_type ADD VALUE 'beforefirst' BEFORE 'first'; CREATE TABLE foo ( id SERIAL PRIMARY KEY ); ================================================ FILE: internal/endtoend/testdata/enum_ordering/postgresql/stdlib/sqlc.json ================================================ { "version": "2", "sql": [ { "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { "out" : "go", "package" : "db", "emit_interface": true, "emit_all_enum_values": true, "emit_enum_valid_method": true } } } ] } ================================================ FILE: internal/endtoend/testdata/exec_create_table/mysql/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/exec_create_table/mysql/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db ================================================ FILE: internal/endtoend/testdata/exec_create_table/mysql/db/mysql.query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/exec_create_table/mysql/mysql.query.sql ================================================ -- name: CreateTable :exec CREATE TABLE test (id INTEGER NOT NULL); ================================================ FILE: internal/endtoend/testdata/exec_create_table/mysql/mysql.schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/exec_create_table/mysql/sqlc.yaml ================================================ version: 2 sql: - queries: mysql.query.sql schema: mysql.schema.sql engine: mysql gen: go: out: db ================================================ FILE: internal/endtoend/testdata/exec_create_table/postgresql/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/exec_create_table/postgresql/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db ================================================ FILE: internal/endtoend/testdata/exec_create_table/postgresql/db/postgresql.query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/exec_create_table/postgresql/postgresql.query.sql ================================================ -- name: CreateTable :exec CREATE TABLE test (id INTEGER NOT NULL); ================================================ FILE: internal/endtoend/testdata/exec_create_table/postgresql/postgresql.schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/exec_create_table/postgresql/sqlc.yaml ================================================ version: 2 sql: - queries: postgresql.query.sql schema: postgresql.schema.sql engine: postgresql gen: go: out: db ================================================ FILE: internal/endtoend/testdata/exec_create_table/sqlite/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/exec_create_table/sqlite/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db ================================================ FILE: internal/endtoend/testdata/exec_create_table/sqlite/db/sqlite.query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/exec_create_table/sqlite/sqlc.yaml ================================================ version: 2 sql: - queries: sqlite.query.sql schema: sqlite.schema.sql engine: sqlite gen: go: out: db ================================================ FILE: internal/endtoend/testdata/exec_create_table/sqlite/sqlite.query.sql ================================================ -- name: CreateTable :exec CREATE TABLE test (id INTEGER NOT NULL); ================================================ FILE: internal/endtoend/testdata/exec_create_table/sqlite/sqlite.schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/exec_imports/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/exec_imports/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullInt32 Bars []int32 } ================================================ FILE: internal/endtoend/testdata/exec_imports/pgx/v4/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { Bar(ctx context.Context) error Bars(ctx context.Context) error } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/exec_imports/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const bar = `-- name: Bar :exec SELECT bar FROM foo ` func (q *Queries) Bar(ctx context.Context) error { _, err := q.db.Exec(ctx, bar) return err } const bars = `-- name: Bars :exec SELECT bars FROM foo ` func (q *Queries) Bars(ctx context.Context) error { _, err := q.db.Exec(ctx, bars) return err } ================================================ FILE: internal/endtoend/testdata/exec_imports/pgx/v4/query.sql ================================================ -- name: Bar :exec SELECT bar FROM foo; -- name: Bars :exec SELECT bars FROM foo; ================================================ FILE: internal/endtoend/testdata/exec_imports/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar int, bars int[] not null); ================================================ FILE: internal/endtoend/testdata/exec_imports/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/exec_imports/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/exec_imports/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar pgtype.Int4 Bars []int32 } ================================================ FILE: internal/endtoend/testdata/exec_imports/pgx/v5/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { Bar(ctx context.Context) error Bars(ctx context.Context) error } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/exec_imports/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const bar = `-- name: Bar :exec SELECT bar FROM foo ` func (q *Queries) Bar(ctx context.Context) error { _, err := q.db.Exec(ctx, bar) return err } const bars = `-- name: Bars :exec SELECT bars FROM foo ` func (q *Queries) Bars(ctx context.Context) error { _, err := q.db.Exec(ctx, bars) return err } ================================================ FILE: internal/endtoend/testdata/exec_imports/pgx/v5/query.sql ================================================ -- name: Bar :exec SELECT bar FROM foo; -- name: Bars :exec SELECT bars FROM foo; ================================================ FILE: internal/endtoend/testdata/exec_imports/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar int, bars int[] not null); ================================================ FILE: internal/endtoend/testdata/exec_imports/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/exec_imports/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/exec_imports/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar sql.NullInt32 Bars []int32 } ================================================ FILE: internal/endtoend/testdata/exec_imports/stdlib/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { Bar(ctx context.Context) error Bars(ctx context.Context) error } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/exec_imports/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const bar = `-- name: Bar :exec SELECT bar FROM foo ` func (q *Queries) Bar(ctx context.Context) error { _, err := q.db.ExecContext(ctx, bar) return err } const bars = `-- name: Bars :exec SELECT bars FROM foo ` func (q *Queries) Bars(ctx context.Context) error { _, err := q.db.ExecContext(ctx, bars) return err } ================================================ FILE: internal/endtoend/testdata/exec_imports/stdlib/query.sql ================================================ -- name: Bar :exec SELECT bar FROM foo; -- name: Bars :exec SELECT bars FROM foo; ================================================ FILE: internal/endtoend/testdata/exec_imports/stdlib/schema.sql ================================================ CREATE TABLE foo (bar int, bars int[] not null); ================================================ FILE: internal/endtoend/testdata/exec_imports/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { InsertBar(ctx context.Context) (int64, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const insertBar = `-- name: InsertBar :execlastid INSERT INTO bar () VALUES () ` func (q *Queries) InsertBar(ctx context.Context) (int64, error) { result, err := q.db.ExecContext(ctx, insertBar) if err != nil { return 0, err } return result.LastInsertId() } ================================================ FILE: internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/query.sql ================================================ -- name: InsertBar :execlastid INSERT INTO bar () VALUES (); ================================================ FILE: internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/schema.sql ================================================ CREATE TABLE bar (id integer(10) NOT NULL AUTO_INCREMENT PRIMARY KEY); ================================================ FILE: internal/endtoend/testdata/exec_lastid/go_postgresql_stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "mysql", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/exec_no_return_struct/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/2970 ================================================ FILE: internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/schema.sql ================================================ CREATE TABLE IF NOT EXISTS job ( task_name text NOT NULL, last_run timestamp with time zone DEFAULT now() NOT NULL ); ================================================ FILE: internal/endtoend/testdata/exec_no_return_struct/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" "github.com/jackc/pgconn" ) type Querier interface { DeleteBarByID(ctx context.Context, id int32) (pgconn.CommandTag, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/jackc/pgconn" ) const deleteBarByID = `-- name: DeleteBarByID :execresult DELETE FROM bar WHERE id = $1 ` func (q *Queries) DeleteBarByID(ctx context.Context, id int32) (pgconn.CommandTag, error) { return q.db.Exec(ctx, deleteBarByID, id) } ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/query.sql ================================================ -- name: DeleteBarByID :execresult DELETE FROM bar WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" "github.com/jackc/pgx/v5/pgconn" ) type Querier interface { DeleteBarByID(ctx context.Context, id int32) (pgconn.CommandTag, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/jackc/pgx/v5/pgconn" ) const deleteBarByID = `-- name: DeleteBarByID :execresult DELETE FROM bar WHERE id = $1 ` func (q *Queries) DeleteBarByID(ctx context.Context, id int32) (pgconn.CommandTag, error) { return q.db.Exec(ctx, deleteBarByID, id) } ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/query.sql ================================================ -- name: DeleteBarByID :execresult DELETE FROM bar WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" "database/sql" ) type Querier interface { DeleteBarByID(ctx context.Context, id int32) (sql.Result, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const deleteBarByID = `-- name: DeleteBarByID :execresult DELETE FROM bar WHERE id = $1 ` func (q *Queries) DeleteBarByID(ctx context.Context, id int32) (sql.Result, error) { return q.db.ExecContext(ctx, deleteBarByID, id) } ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_stdlib/query.sql ================================================ -- name: DeleteBarByID :execresult DELETE FROM bar WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_stdlib/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/exec_result/go_postgresql_stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { DeleteBarByID(ctx context.Context, id int32) (int64, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteBarByID = `-- name: DeleteBarByID :execrows DELETE FROM bar WHERE id = $1 ` func (q *Queries) DeleteBarByID(ctx context.Context, id int32) (int64, error) { result, err := q.db.Exec(ctx, deleteBarByID, id) if err != nil { return 0, err } return result.RowsAffected(), nil } ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/query.sql ================================================ -- name: DeleteBarByID :execrows DELETE FROM bar WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { DeleteBarByID(ctx context.Context, id int32) (int64, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteBarByID = `-- name: DeleteBarByID :execrows DELETE FROM bar WHERE id = $1 ` func (q *Queries) DeleteBarByID(ctx context.Context, id int32) (int64, error) { result, err := q.db.Exec(ctx, deleteBarByID, id) if err != nil { return 0, err } return result.RowsAffected(), nil } ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/query.sql ================================================ -- name: DeleteBarByID :execrows DELETE FROM bar WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { DeleteBarByID(ctx context.Context, id int32) (int64, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteBarByID = `-- name: DeleteBarByID :execrows DELETE FROM bar WHERE id = $1 ` func (q *Queries) DeleteBarByID(ctx context.Context, id int32) (int64, error) { result, err := q.db.ExecContext(ctx, deleteBarByID, id) if err != nil { return 0, err } return result.RowsAffected() } ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/query.sql ================================================ -- name: DeleteBarByID :execrows DELETE FROM bar WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/exec_rows/go_postgresql_stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/full_outer_join/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/full_outer_join/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Author struct { ID int64 Name string } type Book struct { ID int64 Title string } ================================================ FILE: internal/endtoend/testdata/full_outer_join/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getAuthor = `-- name: GetAuthor :one SELECT a.id, name, b.id, title FROM authors AS a FULL OUTER JOIN books AS b ON a.id = b.id WHERE a.id = ? LIMIT 1 ` type GetAuthorRow struct { ID sql.NullInt64 Name sql.NullString ID_2 sql.NullInt64 Title sql.NullString } func (q *Queries) GetAuthor(ctx context.Context, id int64) (GetAuthorRow, error) { row := q.db.QueryRowContext(ctx, getAuthor, id) var i GetAuthorRow err := row.Scan( &i.ID, &i.Name, &i.ID_2, &i.Title, ) return i, err } ================================================ FILE: internal/endtoend/testdata/full_outer_join/sqlite/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors AS a FULL OUTER JOIN books AS b ON a.id = b.id WHERE a.id = ? LIMIT 1; ================================================ FILE: internal/endtoend/testdata/full_outer_join/sqlite/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id INTEGER PRIMARY KEY, name text NOT NULL ); CREATE TABLE books ( id INTEGER PRIMARY KEY, title text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/full_outer_join/sqlite/sqlc.json ================================================ {"version": "1", "packages": [{"path": "go", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "name": "querytest"}]} ================================================ FILE: internal/endtoend/testdata/func_aggregate/pganalyze/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/func_aggregate/pganalyze/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_aggregate/pganalyze/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/func_aggregate/pganalyze/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const percentile = `-- name: Percentile :one select percentile_disc(0.5) within group (order by authors.name) from authors ` func (q *Queries) Percentile(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, percentile) var percentile_disc string err := row.Scan(&percentile_disc) return percentile_disc, err } ================================================ FILE: internal/endtoend/testdata/func_aggregate/pganalyze/query.sql ================================================ -- name: Percentile :one select percentile_disc(0.5) within group (order by authors.name) from authors; ================================================ FILE: internal/endtoend/testdata/func_aggregate/pganalyze/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/func_aggregate/pganalyze/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_aggregate/postgresql/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/func_aggregate/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_aggregate/postgresql/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/func_aggregate/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const percentile = `-- name: Percentile :one select percentile_disc(0.5) within group (order by authors.name) from authors ` func (q *Queries) Percentile(ctx context.Context) (interface{}, error) { row := q.db.QueryRowContext(ctx, percentile) var percentile_disc interface{} err := row.Scan(&percentile_disc) return percentile_disc, err } ================================================ FILE: internal/endtoend/testdata/func_aggregate/postgresql/query.sql ================================================ -- name: Percentile :one select percentile_disc(0.5) within group (order by authors.name) from authors; ================================================ FILE: internal/endtoend/testdata/func_aggregate/postgresql/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/func_aggregate/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_args/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_args/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_args/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const makeIntervalDays = `-- name: MakeIntervalDays :one SELECT make_interval(days => $1::int) ` func (q *Queries) MakeIntervalDays(ctx context.Context, dollar_1 int32) (int64, error) { row := q.db.QueryRow(ctx, makeIntervalDays, dollar_1) var make_interval int64 err := row.Scan(&make_interval) return make_interval, err } const makeIntervalMonths = `-- name: MakeIntervalMonths :one SELECT make_interval(months => $1::int) ` func (q *Queries) MakeIntervalMonths(ctx context.Context, months int32) (int64, error) { row := q.db.QueryRow(ctx, makeIntervalMonths, months) var make_interval int64 err := row.Scan(&make_interval) return make_interval, err } const makeIntervalSecs = `-- name: MakeIntervalSecs :one SELECT make_interval(secs => $1) ` func (q *Queries) MakeIntervalSecs(ctx context.Context, secs float64) (int64, error) { row := q.db.QueryRow(ctx, makeIntervalSecs, secs) var make_interval int64 err := row.Scan(&make_interval) return make_interval, err } const plus = `-- name: Plus :one SELECT plus(b => $2, a => $1) ` type PlusParams struct { A int32 B int32 } func (q *Queries) Plus(ctx context.Context, arg PlusParams) (int32, error) { row := q.db.QueryRow(ctx, plus, arg.A, arg.B) var plus int32 err := row.Scan(&plus) return plus, err } const tableArgs = `-- name: TableArgs :one SELECT table_args(x => $1) ` func (q *Queries) TableArgs(ctx context.Context, x int32) (int32, error) { row := q.db.QueryRow(ctx, tableArgs, x) var table_args int32 err := row.Scan(&table_args) return table_args, err } ================================================ FILE: internal/endtoend/testdata/func_args/pgx/v4/query.sql ================================================ -- name: Plus :one SELECT plus(b => $2, a => $1); -- name: MakeIntervalSecs :one SELECT make_interval(secs => $1); -- name: MakeIntervalDays :one SELECT make_interval(days => $1::int); -- name: MakeIntervalMonths :one SELECT make_interval(months => sqlc.arg('months')::int); -- name: TableArgs :one SELECT table_args(x => $1); ================================================ FILE: internal/endtoend/testdata/func_args/pgx/v4/schema.sql ================================================ CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ BEGIN RETURN a + b; END; $$ LANGUAGE plpgsql; CREATE FUNCTION table_args(x INT) RETURNS TABLE (y INT) AS 'SELECT x' LANGUAGE sql; ================================================ FILE: internal/endtoend/testdata/func_args/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_args/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_args/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_args/pgx/v5/go/query.sql.go ================================================ // 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 makeIntervalDays = `-- name: MakeIntervalDays :one SELECT make_interval(days => $1::int) ` func (q *Queries) MakeIntervalDays(ctx context.Context, dollar_1 int32) (pgtype.Interval, error) { row := q.db.QueryRow(ctx, makeIntervalDays, dollar_1) var make_interval pgtype.Interval err := row.Scan(&make_interval) return make_interval, err } const makeIntervalMonths = `-- name: MakeIntervalMonths :one SELECT make_interval(months => $1::int) ` func (q *Queries) MakeIntervalMonths(ctx context.Context, months int32) (pgtype.Interval, error) { row := q.db.QueryRow(ctx, makeIntervalMonths, months) var make_interval pgtype.Interval err := row.Scan(&make_interval) return make_interval, err } const makeIntervalSecs = `-- name: MakeIntervalSecs :one SELECT make_interval(secs => $1) ` func (q *Queries) MakeIntervalSecs(ctx context.Context, secs float64) (pgtype.Interval, error) { row := q.db.QueryRow(ctx, makeIntervalSecs, secs) var make_interval pgtype.Interval err := row.Scan(&make_interval) return make_interval, err } const plus = `-- name: Plus :one SELECT plus(b => $2, a => $1) ` type PlusParams struct { A int32 B int32 } func (q *Queries) Plus(ctx context.Context, arg PlusParams) (int32, error) { row := q.db.QueryRow(ctx, plus, arg.A, arg.B) var plus int32 err := row.Scan(&plus) return plus, err } const tableArgs = `-- name: TableArgs :one SELECT table_args(x => $1) ` func (q *Queries) TableArgs(ctx context.Context, x int32) (int32, error) { row := q.db.QueryRow(ctx, tableArgs, x) var table_args int32 err := row.Scan(&table_args) return table_args, err } ================================================ FILE: internal/endtoend/testdata/func_args/pgx/v5/query.sql ================================================ -- name: Plus :one SELECT plus(b => $2, a => $1); -- name: MakeIntervalSecs :one SELECT make_interval(secs => $1); -- name: MakeIntervalDays :one SELECT make_interval(days => $1::int); -- name: MakeIntervalMonths :one SELECT make_interval(months => sqlc.arg('months')::int); -- name: TableArgs :one SELECT table_args(x => $1); ================================================ FILE: internal/endtoend/testdata/func_args/pgx/v5/schema.sql ================================================ CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ BEGIN RETURN a + b; END; $$ LANGUAGE plpgsql; CREATE FUNCTION table_args(x INT) RETURNS TABLE (y INT) AS 'SELECT x' LANGUAGE sql; ================================================ FILE: internal/endtoend/testdata/func_args/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_args/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_args/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_args/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const makeIntervalDays = `-- name: MakeIntervalDays :one SELECT make_interval(days => $1::int) ` func (q *Queries) MakeIntervalDays(ctx context.Context, dollar_1 int32) (int64, error) { row := q.db.QueryRowContext(ctx, makeIntervalDays, dollar_1) var make_interval int64 err := row.Scan(&make_interval) return make_interval, err } const makeIntervalMonths = `-- name: MakeIntervalMonths :one SELECT make_interval(months => $1::int) ` func (q *Queries) MakeIntervalMonths(ctx context.Context, months int32) (int64, error) { row := q.db.QueryRowContext(ctx, makeIntervalMonths, months) var make_interval int64 err := row.Scan(&make_interval) return make_interval, err } const makeIntervalSecs = `-- name: MakeIntervalSecs :one SELECT make_interval(secs => $1) ` func (q *Queries) MakeIntervalSecs(ctx context.Context, secs float64) (int64, error) { row := q.db.QueryRowContext(ctx, makeIntervalSecs, secs) var make_interval int64 err := row.Scan(&make_interval) return make_interval, err } const plus = `-- name: Plus :one SELECT plus(b => $2, a => $1) ` type PlusParams struct { A int32 B int32 } func (q *Queries) Plus(ctx context.Context, arg PlusParams) (int32, error) { row := q.db.QueryRowContext(ctx, plus, arg.A, arg.B) var plus int32 err := row.Scan(&plus) return plus, err } const tableArgs = `-- name: TableArgs :one SELECT table_args(x => $1) ` func (q *Queries) TableArgs(ctx context.Context, x int32) (int32, error) { row := q.db.QueryRowContext(ctx, tableArgs, x) var table_args int32 err := row.Scan(&table_args) return table_args, err } ================================================ FILE: internal/endtoend/testdata/func_args/stdlib/query.sql ================================================ -- name: Plus :one SELECT plus(b => $2, a => $1); -- name: MakeIntervalSecs :one SELECT make_interval(secs => $1); -- name: MakeIntervalDays :one SELECT make_interval(days => $1::int); -- name: MakeIntervalMonths :one SELECT make_interval(months => sqlc.arg('months')::int); -- name: TableArgs :one SELECT table_args(x => $1); ================================================ FILE: internal/endtoend/testdata/func_args/stdlib/schema.sql ================================================ CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ BEGIN RETURN a + b; END; $$ LANGUAGE plpgsql; CREATE FUNCTION table_args(x INT) RETURNS TABLE (y INT) AS 'SELECT x' LANGUAGE sql; ================================================ FILE: internal/endtoend/testdata/func_args/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_args_typecast/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_args_typecast/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_args_typecast/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const plusPositionalCast = `-- name: PlusPositionalCast :one SELECT plus($1, $2::INTEGER) ` type PlusPositionalCastParams struct { A int32 Column2 int32 } func (q *Queries) PlusPositionalCast(ctx context.Context, arg PlusPositionalCastParams) (int32, error) { row := q.db.QueryRow(ctx, plusPositionalCast, arg.A, arg.Column2) var plus int32 err := row.Scan(&plus) return plus, err } ================================================ FILE: internal/endtoend/testdata/func_args_typecast/pgx/v4/query.sql ================================================ -- name: PlusPositionalCast :one SELECT plus($1, $2::INTEGER); ================================================ FILE: internal/endtoend/testdata/func_args_typecast/pgx/v4/schema.sql ================================================ CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ BEGIN RETURN a + b; END; $$ LANGUAGE plpgsql; ================================================ FILE: internal/endtoend/testdata/func_args_typecast/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_args_typecast/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_args_typecast/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_args_typecast/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const plusPositionalCast = `-- name: PlusPositionalCast :one SELECT plus($1, $2::INTEGER) ` type PlusPositionalCastParams struct { A int32 Column2 int32 } func (q *Queries) PlusPositionalCast(ctx context.Context, arg PlusPositionalCastParams) (int32, error) { row := q.db.QueryRow(ctx, plusPositionalCast, arg.A, arg.Column2) var plus int32 err := row.Scan(&plus) return plus, err } ================================================ FILE: internal/endtoend/testdata/func_args_typecast/pgx/v5/query.sql ================================================ -- name: PlusPositionalCast :one SELECT plus($1, $2::INTEGER); ================================================ FILE: internal/endtoend/testdata/func_args_typecast/pgx/v5/schema.sql ================================================ CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ BEGIN RETURN a + b; END; $$ LANGUAGE plpgsql; ================================================ FILE: internal/endtoend/testdata/func_args_typecast/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_args_typecast/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_args_typecast/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_args_typecast/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const plusPositionalCast = `-- name: PlusPositionalCast :one SELECT plus($1, $2::INTEGER) ` type PlusPositionalCastParams struct { A int32 Column2 int32 } func (q *Queries) PlusPositionalCast(ctx context.Context, arg PlusPositionalCastParams) (int32, error) { row := q.db.QueryRowContext(ctx, plusPositionalCast, arg.A, arg.Column2) var plus int32 err := row.Scan(&plus) return plus, err } ================================================ FILE: internal/endtoend/testdata/func_args_typecast/stdlib/query.sql ================================================ -- name: PlusPositionalCast :one SELECT plus($1, $2::INTEGER); ================================================ FILE: internal/endtoend/testdata/func_args_typecast/stdlib/schema.sql ================================================ CREATE FUNCTION plus(a integer, b integer) RETURNS integer AS $$ BEGIN RETURN a + b; END; $$ LANGUAGE plpgsql; ================================================ FILE: internal/endtoend/testdata/func_args_typecast/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_call_cast/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_call_cast/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_call_cast/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const demo = `-- name: Demo :one SELECT CAST(GREATEST(1,2,3,4,5) AS UNSIGNED) as col1 ` func (q *Queries) Demo(ctx context.Context) (int64, error) { row := q.db.QueryRowContext(ctx, demo) var col1 int64 err := row.Scan(&col1) return col1, err } ================================================ FILE: internal/endtoend/testdata/func_call_cast/mysql/query.sql ================================================ -- name: Demo :one SELECT CAST(GREATEST(1,2,3,4,5) AS UNSIGNED) as col1 ================================================ FILE: internal/endtoend/testdata/func_call_cast/mysql/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/func_call_cast/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/google/uuid" ) const demo = `-- name: Demo :one SELECT uuid_generate_v5('7c4597a0-8cfa-4c19-8da0-b8474a36440d', $1)::uuid as col1 ` func (q *Queries) Demo(ctx context.Context, name string) (uuid.UUID, error) { row := q.db.QueryRow(ctx, demo, name) var col1 uuid.UUID err := row.Scan(&col1) return col1, err } ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/query.sql ================================================ -- name: Demo :one SELECT uuid_generate_v5('7c4597a0-8cfa-4c19-8da0-b8474a36440d', $1)::uuid as col1; ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/schema.sql ================================================ CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 demo = `-- name: Demo :one SELECT uuid_generate_v5('7c4597a0-8cfa-4c19-8da0-b8474a36440d', $1)::uuid as col1 ` func (q *Queries) Demo(ctx context.Context, name string) (pgtype.UUID, error) { row := q.db.QueryRow(ctx, demo, name) var col1 pgtype.UUID err := row.Scan(&col1) return col1, err } ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/query.sql ================================================ -- name: Demo :one SELECT uuid_generate_v5('7c4597a0-8cfa-4c19-8da0-b8474a36440d', $1)::uuid as col1; ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/schema.sql ================================================ CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/google/uuid" ) const demo = `-- name: Demo :one SELECT uuid_generate_v5('7c4597a0-8cfa-4c19-8da0-b8474a36440d', $1)::uuid as col1 ` func (q *Queries) Demo(ctx context.Context, name string) (uuid.UUID, error) { row := q.db.QueryRowContext(ctx, demo, name) var col1 uuid.UUID err := row.Scan(&col1) return col1, err } ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/stdlib/query.sql ================================================ -- name: Demo :one SELECT uuid_generate_v5('7c4597a0-8cfa-4c19-8da0-b8474a36440d', $1)::uuid as col1; ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/stdlib/schema.sql ================================================ CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; ================================================ FILE: internal/endtoend/testdata/func_call_cast/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_call_cast/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_call_cast/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_call_cast/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const demo = `-- name: Demo :one SELECT CAST(CHAR(1,2,3,4,5) AS BLOB) AS col1 ` func (q *Queries) Demo(ctx context.Context) ([]byte, error) { row := q.db.QueryRowContext(ctx, demo) var col1 []byte err := row.Scan(&col1) return col1, err } ================================================ FILE: internal/endtoend/testdata/func_call_cast/sqlite/query.sql ================================================ -- name: Demo :one SELECT CAST(CHAR(1,2,3,4,5) AS BLOB) AS col1 ================================================ FILE: internal/endtoend/testdata/func_call_cast/sqlite/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/func_call_cast/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_match_types/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_match_types/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Book struct { ID int32 Title string Author string Pages int32 } ================================================ FILE: internal/endtoend/testdata/func_match_types/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const authorPages = `-- name: AuthorPages :many select author, count(title) as num_books, SUM(pages) as total_pages from books group by author ` type AuthorPagesRow struct { Author string NumBooks int64 TotalPages interface{} } func (q *Queries) AuthorPages(ctx context.Context) ([]AuthorPagesRow, error) { rows, err := q.db.QueryContext(ctx, authorPages) if err != nil { return nil, err } defer rows.Close() var items []AuthorPagesRow for rows.Next() { var i AuthorPagesRow if err := rows.Scan(&i.Author, &i.NumBooks, &i.TotalPages); 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 } ================================================ FILE: internal/endtoend/testdata/func_match_types/mysql/query.sql ================================================ -- name: AuthorPages :many select author, count(title) as num_books, SUM(pages) as total_pages from books group by author; ================================================ FILE: internal/endtoend/testdata/func_match_types/mysql/schema.sql ================================================ CREATE TABLE books ( id integer PRIMARY KEY, title text NOT NULL, author text NOT NULL, pages integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/func_match_types/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_match_types/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_match_types/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Book struct { ID int32 Title string Author string Pages int32 } ================================================ FILE: internal/endtoend/testdata/func_match_types/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const authorPages = `-- name: AuthorPages :many select author, count(title) as num_books, SUM(pages) as total_pages from books group by author ` type AuthorPagesRow struct { Author string NumBooks int64 TotalPages int64 } func (q *Queries) AuthorPages(ctx context.Context) ([]AuthorPagesRow, error) { rows, err := q.db.QueryContext(ctx, authorPages) if err != nil { return nil, err } defer rows.Close() var items []AuthorPagesRow for rows.Next() { var i AuthorPagesRow if err := rows.Scan(&i.Author, &i.NumBooks, &i.TotalPages); 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 } ================================================ FILE: internal/endtoend/testdata/func_match_types/postgresql/query.sql ================================================ -- name: AuthorPages :many select author, count(title) as num_books, SUM(pages) as total_pages from books group by author; ================================================ FILE: internal/endtoend/testdata/func_match_types/postgresql/schema.sql ================================================ CREATE TABLE books ( id integer PRIMARY KEY, title text NOT NULL, author text NOT NULL, pages integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/func_match_types/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_match_types/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_match_types/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Book struct { ID int64 Title string Author string Pages int64 } ================================================ FILE: internal/endtoend/testdata/func_match_types/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const authorPages = `-- name: AuthorPages :many select author, count(title) as num_books, sum(pages) as total_pages from books group by author ` type AuthorPagesRow struct { Author string NumBooks int64 TotalPages sql.NullFloat64 } func (q *Queries) AuthorPages(ctx context.Context) ([]AuthorPagesRow, error) { rows, err := q.db.QueryContext(ctx, authorPages) if err != nil { return nil, err } defer rows.Close() var items []AuthorPagesRow for rows.Next() { var i AuthorPagesRow if err := rows.Scan(&i.Author, &i.NumBooks, &i.TotalPages); 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 } ================================================ FILE: internal/endtoend/testdata/func_match_types/sqlite/query.sql ================================================ -- name: AuthorPages :many select author, count(title) as num_books, sum(pages) as total_pages from books group by author; ================================================ FILE: internal/endtoend/testdata/func_match_types/sqlite/schema.sql ================================================ CREATE TABLE books ( id integer PRIMARY KEY, title text NOT NULL, author text NOT NULL, pages integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/func_match_types/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_out_param/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1654 ================================================ FILE: internal/endtoend/testdata/func_out_param/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_out_param/pgx/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/func_out_param/pgx/go/query.sql.go ================================================ // 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 createAuthor = `-- name: CreateAuthor :one SELECT id FROM add_author ( $1, $2 ) ` type CreateAuthorParams struct { Name string Bio string } func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (pgtype.Int4, error) { row := q.db.QueryRow(ctx, createAuthor, arg.Name, arg.Bio) var id pgtype.Int4 err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/func_out_param/pgx/query.sql ================================================ -- name: CreateAuthor :one SELECT * FROM add_author ( sqlc.arg(name), sqlc.arg(bio) ); ================================================ FILE: internal/endtoend/testdata/func_out_param/pgx/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); CREATE OR REPLACE FUNCTION add_author (name text, bio text, out id int) AS $$ DECLARE BEGIN id = 123; END; $$ LANGUAGE plpgsql; ================================================ FILE: internal/endtoend/testdata/func_out_param/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/pganalyze/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/pganalyze/go/query.sql.go ================================================ // 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 getDate = `-- name: GetDate :one SELECT now from NOW() ` func (q *Queries) GetDate(ctx context.Context) (pgtype.Timestamptz, error) { row := q.db.QueryRow(ctx, getDate) var now pgtype.Timestamptz err := row.Scan(&now) return now, err } ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/pganalyze/query.sql ================================================ /* name: GetDate :one */ SELECT * from NOW(); ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/pganalyze/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/pganalyze/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getDate = `-- name: GetDate :one SELECT from CURRENT_DATE ` type GetDateRow struct { } func (q *Queries) GetDate(ctx context.Context) (GetDateRow, error) { row := q.db.QueryRow(ctx, getDate) var i GetDateRow err := row.Scan() return i, err } ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/query.sql ================================================ /* name: GetDate :one */ SELECT * from CURRENT_DATE; ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/stdlib/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getDate = `-- name: GetDate :one SELECT from CURRENT_DATE ` type GetDateRow struct { } func (q *Queries) GetDate(ctx context.Context) (GetDateRow, error) { row := q.db.QueryRowContext(ctx, getDate) var i GetDateRow err := row.Scan() return i, err } ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/stdlib/query.sql ================================================ /* name: GetDate :one */ SELECT * from CURRENT_DATE; ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/stdlib/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/func_return_date/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_return_record/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1979 ================================================ FILE: internal/endtoend/testdata/func_return_record/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/func_return_record/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_return_record/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type MyTable struct { Data []byte } ================================================ FILE: internal/endtoend/testdata/func_return_record/postgresql/pgx/go/query.sql.go ================================================ // 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 getData = `-- name: GetData :one SELECT key, value FROM my_table, jsonb_each(data) LIMIT 1 ` type GetDataRow struct { Key pgtype.Text Value []byte } func (q *Queries) GetData(ctx context.Context) (GetDataRow, error) { row := q.db.QueryRow(ctx, getData) var i GetDataRow err := row.Scan(&i.Key, &i.Value) return i, err } ================================================ FILE: internal/endtoend/testdata/func_return_record/postgresql/pgx/query.sql ================================================ -- name: GetData :one SELECT key, value FROM my_table, jsonb_each(data) LIMIT 1; ================================================ FILE: internal/endtoend/testdata/func_return_record/postgresql/pgx/schema.sql ================================================ CREATE TABLE my_table ( data JSONB NOT NULL ); ================================================ FILE: internal/endtoend/testdata/func_return_record/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const generateSeries = `-- name: GenerateSeries :many SELECT ($1::int) + i FROM generate_series(0, $2::int) AS i LIMIT 1 ` type GenerateSeriesParams struct { Column1 int32 Column2 int32 } func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]int32, error) { rows, err := q.db.Query(ctx, generateSeries, arg.Column1, arg.Column2) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var column_1 int32 if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/query.sql ================================================ /* name: GenerateSeries :many */ SELECT ($1::int) + i FROM generate_series(0, $2::int) AS i LIMIT 1; ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const generateSeries = `-- name: GenerateSeries :many SELECT ($1::int) + i FROM generate_series(0, $2::int) AS i LIMIT 1 ` type GenerateSeriesParams struct { Column1 int32 Column2 int32 } func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]int32, error) { rows, err := q.db.Query(ctx, generateSeries, arg.Column1, arg.Column2) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var column_1 int32 if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/query.sql ================================================ /* name: GenerateSeries :many */ SELECT ($1::int) + i FROM generate_series(0, $2::int) AS i LIMIT 1; ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const generateSeries = `-- name: GenerateSeries :many SELECT ($1::int) + i FROM generate_series(0, $2::int) AS i LIMIT 1 ` type GenerateSeriesParams struct { Column1 int32 Column2 int32 } func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]int32, error) { rows, err := q.db.QueryContext(ctx, generateSeries, arg.Column1, arg.Column2) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var column_1 int32 if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/stdlib/query.sql ================================================ /* name: GenerateSeries :many */ SELECT ($1::int) + i FROM generate_series(0, $2::int) AS i LIMIT 1; ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/stdlib/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/func_return_series/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/func_return_table/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1322 ================================================ FILE: internal/endtoend/testdata/func_return_table/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/func_return_table/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_return_table/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Account struct { ID int32 Username string Password string } ================================================ FILE: internal/endtoend/testdata/func_return_table/postgresql/pgx/go/query.sql.go ================================================ // 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 foo = `-- name: Foo :one SELECT register_account FROM register_account('a', 'b') ` func (q *Queries) Foo(ctx context.Context) (pgtype.Int4, error) { row := q.db.QueryRow(ctx, foo) var register_account pgtype.Int4 err := row.Scan(®ister_account) return register_account, err } ================================================ FILE: internal/endtoend/testdata/func_return_table/postgresql/pgx/query.sql ================================================ -- name: Foo :one SELECT * FROM register_account('a', 'b'); ================================================ FILE: internal/endtoend/testdata/func_return_table/postgresql/pgx/schema.sql ================================================ CREATE TABLE accounts ( id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY, username TEXT NOT NULL UNIQUE, password TEXT NOT NULL ); -- this is a useless and horrifying function cause we don't hash -- the password, this is just to repro the bug in sqlc CREATE OR REPLACE FUNCTION register_account( _username TEXT, _password VARCHAR(70) ) RETURNS TABLE ( account_id INTEGER ) AS $$ BEGIN INSERT INTO accounts (username, password) VALUES ( _username, _password ) RETURNING id INTO account_id; RETURN NEXT; END; $$ LANGUAGE plpgsql; ================================================ FILE: internal/endtoend/testdata/func_return_table/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/func_return_table_columns/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/2386 ================================================ FILE: internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Blog struct { ID int32 Name string } ================================================ FILE: internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/go/query.sql.go ================================================ // 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 testFuncSelectBlog = `-- name: TestFuncSelectBlog :many select id, name from test_select_blog($1) ` type TestFuncSelectBlogRow struct { ID pgtype.Int4 Name pgtype.Text } func (q *Queries) TestFuncSelectBlog(ctx context.Context, pID int32) ([]TestFuncSelectBlogRow, error) { rows, err := q.db.Query(ctx, testFuncSelectBlog, pID) if err != nil { return nil, err } defer rows.Close() var items []TestFuncSelectBlogRow for rows.Next() { var i TestFuncSelectBlogRow if err := rows.Scan(&i.ID, &i.Name); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/query.sql ================================================ -- name: TestFuncSelectBlog :many select id, name from test_select_blog($1); ================================================ FILE: internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/schema.sql ================================================ create table blog ( id serial primary key, name text not null ); create function test_select_blog(in p_id int) returns table (id int, name text) AS $$ BEGIN RETURN QUERY select id, name from blog where id = p_id; END; $$ language plpgsql; ================================================ FILE: internal/endtoend/testdata/func_return_table_columns/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/func_star_expansion/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/2364 ================================================ FILE: internal/endtoend/testdata/func_star_expansion/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/func_star_expansion/postgresql/pgx/go/query.sql.go ================================================ // 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 testFuncGetTime = `-- name: TestFuncGetTime :one select test_func_get_time from test_func_get_time() ` func (q *Queries) TestFuncGetTime(ctx context.Context) (pgtype.Timestamp, error) { row := q.db.QueryRow(ctx, testFuncGetTime) var test_func_get_time pgtype.Timestamp err := row.Scan(&test_func_get_time) return test_func_get_time, err } const testFuncSelectBlog = `-- name: TestFuncSelectBlog :one select test_func_select_blog from test_func_select_blog($1) ` func (q *Queries) TestFuncSelectBlog(ctx context.Context, pID int32) (interface{}, error) { row := q.db.QueryRow(ctx, testFuncSelectBlog, pID) var test_func_select_blog interface{} err := row.Scan(&test_func_select_blog) return test_func_select_blog, err } const testFuncSelectString = `-- name: TestFuncSelectString :one select test_func_select_string from test_func_select_string($1) ` func (q *Queries) TestFuncSelectString(ctx context.Context, pString string) (pgtype.Text, error) { row := q.db.QueryRow(ctx, testFuncSelectString, pString) var test_func_select_string pgtype.Text err := row.Scan(&test_func_select_string) return test_func_select_string, err } ================================================ FILE: internal/endtoend/testdata/func_star_expansion/postgresql/pgx/query.sql ================================================ -- name: TestFuncGetTime :one select * from test_func_get_time(); -- name: TestFuncSelectString :one select * from test_func_select_string($1); -- name: TestFuncSelectBlog :one select * from test_func_select_blog($1); ================================================ FILE: internal/endtoend/testdata/func_star_expansion/postgresql/pgx/schema.sql ================================================ create function test_func_get_time () returns timestamp AS $$ Begin return now(); End; $$ language plpgsql; create function test_func_select_string (in p_string text) returns text AS $$ Begin return p_string; End; $$ language plpgsql; create function test_func_select_blog(in p_id int) returns table (id int, name text, created_at timestamp, updated_at timestamp) AS $$ BEGIN RETURN QUERY select id, name, created_at, updated_at from blog where id = p_id; END; $$ language plpgsql; ================================================ FILE: internal/endtoend/testdata/func_star_expansion/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "encoding/json" ) type Test struct { ID sql.NullInt32 J json.RawMessage } ================================================ FILE: internal/endtoend/testdata/func_variadic/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const updateJ = `-- name: UpdateJ :exec UPDATE test SET j = jsonb_build_object($1::text, $2::text, $3::text, $4::text) WHERE id = $5 ` type UpdateJParams struct { Column1 string Column2 string Column3 string Column4 string ID sql.NullInt32 } func (q *Queries) UpdateJ(ctx context.Context, arg UpdateJParams) error { _, err := q.db.ExecContext(ctx, updateJ, arg.Column1, arg.Column2, arg.Column3, arg.Column4, arg.ID, ) return err } ================================================ FILE: internal/endtoend/testdata/func_variadic/postgresql/stdlib/query.sql ================================================ -- name: UpdateJ :exec UPDATE test SET j = jsonb_build_object($1::text, $2::text, $3::text, $4::text) WHERE id = $5; ================================================ FILE: internal/endtoend/testdata/func_variadic/postgresql/stdlib/schema.sql ================================================ CREATE TABLE test ( id integer, j jsonb NOT NULL ); ================================================ FILE: internal/endtoend/testdata/func_variadic/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/geometric/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/geometric/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgtype" ) type TestTable struct { VBoxNull pgtype.Box VCircleNull pgtype.Circle VLineNull pgtype.Line VLsegNull pgtype.Lseg VPathNull pgtype.Path VPointNull pgtype.Point VPolygonNull pgtype.Polygon VBox pgtype.Box VCircle pgtype.Circle VLine pgtype.Line VLseg pgtype.Lseg VPath pgtype.Path VPoint pgtype.Point VPolygon pgtype.Polygon } ================================================ FILE: internal/endtoend/testdata/geometric/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectTest = `-- name: SelectTest :many SELECT v_box_null, v_circle_null, v_line_null, v_lseg_null, v_path_null, v_point_null, v_polygon_null, v_box, v_circle, v_line, v_lseg, v_path, v_point, v_polygon from test_table ` func (q *Queries) SelectTest(ctx context.Context) ([]TestTable, error) { rows, err := q.db.Query(ctx, selectTest) if err != nil { return nil, err } defer rows.Close() var items []TestTable for rows.Next() { var i TestTable if err := rows.Scan( &i.VBoxNull, &i.VCircleNull, &i.VLineNull, &i.VLsegNull, &i.VPathNull, &i.VPointNull, &i.VPolygonNull, &i.VBox, &i.VCircle, &i.VLine, &i.VLseg, &i.VPath, &i.VPoint, &i.VPolygon, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/geometric/pgx/v4/query.sql ================================================ -- name: SelectTest :many SELECT * from test_table; ================================================ FILE: internal/endtoend/testdata/geometric/pgx/v4/schema.sql ================================================ CREATE TABLE test_table ( v_box_null box, v_circle_null circle, v_line_null line, v_lseg_null lseg, v_path_null path, v_point_null point, v_polygon_null polygon, v_box box not null, v_circle circle not null, v_line line not null, v_lseg lseg not null, v_path path not null, v_point point not null, v_polygon polygon not null ); ================================================ FILE: internal/endtoend/testdata/geometric/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/geometric/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/geometric/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type TestTable struct { VBoxNull pgtype.Box VCircleNull pgtype.Circle VLineNull pgtype.Line VLsegNull pgtype.Lseg VPathNull pgtype.Path VPointNull pgtype.Point VPolygonNull pgtype.Polygon VBox pgtype.Box VCircle pgtype.Circle VLine pgtype.Line VLseg pgtype.Lseg VPath pgtype.Path VPoint pgtype.Point VPolygon pgtype.Polygon } ================================================ FILE: internal/endtoend/testdata/geometric/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectTest = `-- name: SelectTest :many SELECT v_box_null, v_circle_null, v_line_null, v_lseg_null, v_path_null, v_point_null, v_polygon_null, v_box, v_circle, v_line, v_lseg, v_path, v_point, v_polygon from test_table ` func (q *Queries) SelectTest(ctx context.Context) ([]TestTable, error) { rows, err := q.db.Query(ctx, selectTest) if err != nil { return nil, err } defer rows.Close() var items []TestTable for rows.Next() { var i TestTable if err := rows.Scan( &i.VBoxNull, &i.VCircleNull, &i.VLineNull, &i.VLsegNull, &i.VPathNull, &i.VPointNull, &i.VPolygonNull, &i.VBox, &i.VCircle, &i.VLine, &i.VLseg, &i.VPath, &i.VPoint, &i.VPolygon, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/geometric/pgx/v5/query.sql ================================================ -- name: SelectTest :many SELECT * from test_table; ================================================ FILE: internal/endtoend/testdata/geometric/pgx/v5/schema.sql ================================================ CREATE TABLE test_table ( v_box_null box, v_circle_null circle, v_line_null line, v_lseg_null lseg, v_path_null path, v_point_null point, v_polygon_null polygon, v_box box not null, v_circle circle not null, v_line line not null, v_lseg lseg not null, v_path path not null, v_point point not null, v_polygon polygon not null ); ================================================ FILE: internal/endtoend/testdata/geometric/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/go.mod ================================================ module github.com/sqlc-dev/sqlc/endtoend go 1.18 require ( github.com/go-sql-driver/mysql v1.7.0 github.com/gofrs/uuid v4.0.0+incompatible github.com/google/uuid v1.3.0 github.com/hexon/mysqltsv v0.1.0 github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853 github.com/jackc/pgtype v1.6.2 github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904 github.com/jackc/pgx/v5 v5.4.3 github.com/lib/pq v1.9.0 github.com/sqlc-dev/pqtype v0.2.0 github.com/sqlc-dev/sqlc-testdata v1.0.0 github.com/volatiletech/null/v8 v8.1.2 gopkg.in/guregu/null.v4 v4.0.0 ) require ( github.com/friendsofgo/errors v0.9.2 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgproto3/v2 v2.0.1 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect github.com/pgvector/pgvector-go v0.1.1 // indirect github.com/volatiletech/inflect v0.0.1 // indirect github.com/volatiletech/randomize v0.0.1 // indirect github.com/volatiletech/strmangle v0.0.1 // indirect golang.org/x/crypto v0.9.0 // indirect golang.org/x/text v0.9.0 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect ) ================================================ FILE: internal/endtoend/testdata/go.sum ================================================ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 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/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= 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/friendsofgo/errors v0.9.2 h1:X6NYxef4efCBdwI7BgS820zFaN7Cphrmb+Pljdzjtgk= github.com/friendsofgo/errors v0.9.2/go.mod h1:yCvFW5AkDIL9qn7suHVLiI/gH228n7PC4Pn44IGoTOI= github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= 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/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hexon/mysqltsv v0.1.0 h1:48wYQlsPH8ZEkKAVCdsOYzMYAlEoevw8ZWD8rqYPdlg= github.com/hexon/mysqltsv v0.1.0/go.mod h1:p3vPBkpxebjHWF1bWKYNcXx5pFu+yAG89QZQEKSvVrY= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= github.com/jackc/pgconn v1.4.0/go.mod h1:Y2O3ZDF0q4mMacyWV3AstPJpeHXWGEetiFttmq5lahk= github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853 h1:LRlrfJW9S99uiOCY8F/qLvX1yEY1TVAaCBHFb79yHBQ= github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= 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 h1:JVX6jT/XfzNqIjye4717ITLaNwV9mWbJx0dLCpcRzdA= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.1 h1:Rdjp4NFjwHnEslx2b66FfCI2S0LhO4itac3hXz6WX9M= github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0= github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkALtxZMCH411K+tKzNpwzCKU+AnPzBKZ+I+Po= github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ= github.com/jackc/pgtype v1.6.2 h1:b3pDeuhbbzBYcg5kwNmNDun4pFUD/0AAr1kLXZLeNt8= github.com/jackc/pgtype v1.6.2/go.mod h1:JCULISAZBFGrHaOXIIFiyfzW5VY0GRitRr8NeJsrdig= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= 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.5.0/go.mod h1:EpAKPLdnTorwmPUUsqrPxy5fphV18j9q3wrfRXgo+kA= github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6fOLDxqtlyhe9UWgfIi9R8+8v8GKV5TRA/o= github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904 h1:SdGWuGg+Cpxq6Z+ArXt0nafaKeTvtKGEoW+yvycspUU= github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg= github.com/jackc/pgx/v5 v5.0.1 h1:JZu9othr7l8so2JMDAGeDUMXqERAuZpovyfl4H50tdg= github.com/jackc/pgx/v5 v5.0.1/go.mod h1:JBbvW3Hdw77jKl9uJrEDATUZIFM2VFPzRq4RWIhkF4o= github.com/jackc/pgx/v5 v5.3.1 h1:Fcr8QJ1ZeLi5zsPZqQeUZhNhxfkkKBOgJuYkJHoBOtU= github.com/jackc/pgx/v5 v5.3.1/go.mod h1:t3JDKnCBlYIc0ewLF0Q7B8MXmoIaBOZj/ic7iHozM/8= github.com/jackc/pgx/v5 v5.4.3 h1:cxFyXhxlvAifxnkKKdlxv8XqUf59tDlYjnV5YYfsJJY= github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.9.0 h1:L8nSXQQzAYByakOFMTwpjRoHsMJklur4Gi59b6VivR8= github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= 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.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/pgvector/pgvector-go v0.1.1 h1:kqJigGctFnlWvskUiYIvJRNwUtQl/aMSUZVs0YWQe+g= github.com/pgvector/pgvector-go v0.1.1/go.mod h1:wLJgD/ODkdtd2LJK4l6evHXTuG+8PxymYAVomKHOWac= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc h1:jUIKcSPO9MoMJBbEoyE/RJoE8vz7Mb8AjvifMMwSyvY= github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/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/sqlc-dev/pqtype v0.2.0 h1:zfzDpAxjCU0/GO7EgZ7ELUh0w28SrMSHzO3rH5Wd3is= github.com/sqlc-dev/pqtype v0.2.0/go.mod h1:oyUjp5981ctiL9UYvj1bVvCKi8OXkCa0u645hce7CAs= github.com/sqlc-dev/sqlc-testdata v1.0.0 h1:NrfFkZ3xh2XHqDNqYE6Q87hhXd1n6GQr3XE0V+CveSQ= github.com/sqlc-dev/sqlc-testdata v1.0.0/go.mod h1:Ima4gy0tylq+cNW1VSV36/NoAHMbZZKjHNs7SfM9Pns= 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/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.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/volatiletech/inflect v0.0.1 h1:2a6FcMQyhmPZcLa+uet3VJ8gLn/9svWhJxJYwvE8KsU= github.com/volatiletech/inflect v0.0.1/go.mod h1:IBti31tG6phkHitLlr5j7shC5SOo//x0AjDzaJU1PLA= github.com/volatiletech/null/v8 v8.1.2 h1:kiTiX1PpwvuugKwfvUNX/SU/5A2KGZMXfGD0DUHdKEI= github.com/volatiletech/null/v8 v8.1.2/go.mod h1:98DbwNoKEpRrYtGjWFctievIfm4n4MxG0A6EBUcoS5g= github.com/volatiletech/randomize v0.0.1 h1:eE5yajattWqTB2/eN8df4dw+8jwAzBtbdo5sbWC4nMk= github.com/volatiletech/randomize v0.0.1/go.mod h1:GN3U0QYqfZ9FOJ67bzax1cqZ5q2xuj2mXrXBjWaRTlY= github.com/volatiletech/strmangle v0.0.1 h1:UKQoHmY6be/R3tSvD2nQYrH41k43OJkidwEiC74KIzk= github.com/volatiletech/strmangle v0.0.1/go.mod h1:F6RA6IkB5vq0yTG4GQ0UsbbRcl3ni9P76i+JrTBKFFg= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= 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.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= 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= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 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/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 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/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-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/guregu/null.v4 v4.0.0 h1:1Wm3S1WEA2I26Kq+6vcW+w0gcDo44YKYD7YIEJNHDjg= gopkg.in/guregu/null.v4 v4.0.0/go.mod h1:YoQhUrADuG3i9WqesrCmpNRwm1ypAgSHYqoOcTu/JrI= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= ================================================ FILE: internal/endtoend/testdata/golang_initialisms_empty/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/golang_initialisms_empty/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" ) type Foo struct { BarId sql.NullString } ================================================ FILE: internal/endtoend/testdata/golang_initialisms_empty/db/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/golang_initialisms_empty/query.sql ================================================ -- name: SelectFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/golang_initialisms_empty/schema.sql ================================================ CREATE TABLE foo( bar_id text ); ================================================ FILE: internal/endtoend/testdata/golang_initialisms_empty/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "go": { "out": "db", "initialisms": [] } } } ] } ================================================ FILE: internal/endtoend/testdata/golang_initialisms_url/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/golang_initialisms_url/db/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/golang_initialisms_url/db/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/golang_initialisms_url/query.sql ================================================ -- name: SelectFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/golang_initialisms_url/schema.sql ================================================ CREATE TABLE foo ( bar_id text, site_url text ); ================================================ FILE: internal/endtoend/testdata/golang_initialisms_url/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "go": { "out": "db", "initialisms": ["id", "url"] } } } ] } ================================================ FILE: internal/endtoend/testdata/golang_invalid_sql_driver/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/golang_invalid_sql_driver/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" ) type Foo struct { Bar sql.NullString } ================================================ FILE: internal/endtoend/testdata/golang_invalid_sql_driver/db/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/golang_invalid_sql_driver/query.sql ================================================ -- name: SelectFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/golang_invalid_sql_driver/schema.sql ================================================ CREATE TABLE foo( bar text ); ================================================ FILE: internal/endtoend/testdata/golang_invalid_sql_driver/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "go": { "out": "db", "sql_driver": "github.com/unknown/driver" } } } ] } ================================================ FILE: internal/endtoend/testdata/golang_invalid_sql_driver/stderr.txt ================================================ # package error generating code: invalid options: unknown SQL driver: github.com/unknown/driver ================================================ FILE: internal/endtoend/testdata/golang_invalid_sql_package/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/golang_invalid_sql_package/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" ) type Foo struct { Bar sql.NullString } ================================================ FILE: internal/endtoend/testdata/golang_invalid_sql_package/db/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/golang_invalid_sql_package/query.sql ================================================ -- name: SelectFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/golang_invalid_sql_package/schema.sql ================================================ CREATE TABLE foo ( bar text ); ================================================ FILE: internal/endtoend/testdata/golang_invalid_sql_package/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "go": { "out": "db", "sql_package": "pgx/5" } } } ] } ================================================ FILE: internal/endtoend/testdata/golang_invalid_sql_package/stderr.txt ================================================ # package error generating code: invalid options: unknown SQL package: pgx/5 ================================================ FILE: internal/endtoend/testdata/having/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/having/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Weather struct { City string TempLo int32 } ================================================ FILE: internal/endtoend/testdata/having/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const coldCities = `-- name: ColdCities :many SELECT city FROM weather GROUP BY city HAVING max(temp_lo) < ? ` func (q *Queries) ColdCities(ctx context.Context, tempLo int32) ([]string, error) { rows, err := q.db.QueryContext(ctx, coldCities, tempLo) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var city string if err := rows.Scan(&city); err != nil { return nil, err } items = append(items, city) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/having/mysql/query.sql ================================================ -- name: ColdCities :many SELECT city FROM weather GROUP BY city HAVING max(temp_lo) < ?; ================================================ FILE: internal/endtoend/testdata/having/mysql/schema.sql ================================================ CREATE TABLE weather ( city text NOT NULL, temp_lo integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/having/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/having/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/having/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Weather struct { City string TempLo int32 } ================================================ FILE: internal/endtoend/testdata/having/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const coldCities = `-- name: ColdCities :many SELECT city FROM weather GROUP BY city HAVING max(temp_lo) < $1 ` func (q *Queries) ColdCities(ctx context.Context, tempLo int32) ([]string, error) { rows, err := q.db.QueryContext(ctx, coldCities, tempLo) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var city string if err := rows.Scan(&city); err != nil { return nil, err } items = append(items, city) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/having/postgresql/query.sql ================================================ -- name: ColdCities :many SELECT city FROM weather GROUP BY city HAVING max(temp_lo) < $1; ================================================ FILE: internal/endtoend/testdata/having/postgresql/schema.sql ================================================ CREATE TABLE weather ( city text NOT NULL, temp_lo integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/having/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/hstore/pgx/v4/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package hstore 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, } } ================================================ FILE: internal/endtoend/testdata/hstore/pgx/v4/go/hstore.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: hstore.sql package hstore import ( "context" "github.com/jackc/pgtype" ) const listBar = `-- name: ListBar :many SELECT bar FROM foo ` func (q *Queries) ListBar(ctx context.Context) ([]pgtype.Hstore, error) { rows, err := q.db.Query(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []pgtype.Hstore for rows.Next() { var bar pgtype.Hstore if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listBaz = `-- name: ListBaz :many SELECT baz FROM foo ` func (q *Queries) ListBaz(ctx context.Context) ([]pgtype.Hstore, error) { rows, err := q.db.Query(ctx, listBaz) if err != nil { return nil, err } defer rows.Close() var items []pgtype.Hstore for rows.Next() { var baz pgtype.Hstore if err := rows.Scan(&baz); err != nil { return nil, err } items = append(items, baz) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/hstore/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package hstore import ( "github.com/jackc/pgtype" ) type Foo struct { Bar pgtype.Hstore Baz pgtype.Hstore } ================================================ FILE: internal/endtoend/testdata/hstore/pgx/v4/hstore.sql ================================================ CREATE EXTENSION IF NOT EXISTS hstore; CREATE TABLE foo ( bar hstore NOT NULL, baz hstore ); -- name: ListBar :many SELECT bar FROM foo; -- name: ListBaz :many SELECT baz FROM foo; ================================================ FILE: internal/endtoend/testdata/hstore/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "hstore", "schema": "hstore.sql", "queries": "hstore.sql" } ] } ================================================ FILE: internal/endtoend/testdata/hstore/pgx/v5/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package hstore 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, } } ================================================ FILE: internal/endtoend/testdata/hstore/pgx/v5/go/hstore.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: hstore.sql package hstore import ( "context" "github.com/jackc/pgx/v5/pgtype" ) const listBar = `-- name: ListBar :many SELECT bar FROM foo ` func (q *Queries) ListBar(ctx context.Context) ([]pgtype.Hstore, error) { rows, err := q.db.Query(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []pgtype.Hstore for rows.Next() { var bar pgtype.Hstore if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listBaz = `-- name: ListBaz :many SELECT baz FROM foo ` func (q *Queries) ListBaz(ctx context.Context) ([]pgtype.Hstore, error) { rows, err := q.db.Query(ctx, listBaz) if err != nil { return nil, err } defer rows.Close() var items []pgtype.Hstore for rows.Next() { var baz pgtype.Hstore if err := rows.Scan(&baz); err != nil { return nil, err } items = append(items, baz) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/hstore/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package hstore import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar pgtype.Hstore Baz pgtype.Hstore } ================================================ FILE: internal/endtoend/testdata/hstore/pgx/v5/hstore.sql ================================================ CREATE EXTENSION IF NOT EXISTS hstore; CREATE TABLE foo ( bar hstore NOT NULL, baz hstore ); -- name: ListBar :many SELECT bar FROM foo; -- name: ListBaz :many SELECT baz FROM foo; ================================================ FILE: internal/endtoend/testdata/hstore/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "hstore", "schema": "hstore.sql", "queries": "hstore.sql" } ] } ================================================ FILE: internal/endtoend/testdata/hstore/stdlib/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package hstore 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, } } ================================================ FILE: internal/endtoend/testdata/hstore/stdlib/go/hstore.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: hstore.sql package hstore import ( "context" ) const listBar = `-- name: ListBar :many SELECT bar FROM foo ` func (q *Queries) ListBar(ctx context.Context) ([]interface{}, error) { rows, err := q.db.QueryContext(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []interface{} for rows.Next() { var bar interface{} 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 listBaz = `-- name: ListBaz :many SELECT baz FROM foo ` func (q *Queries) ListBaz(ctx context.Context) ([]interface{}, error) { rows, err := q.db.QueryContext(ctx, listBaz) if err != nil { return nil, err } defer rows.Close() var items []interface{} for rows.Next() { var baz interface{} if err := rows.Scan(&baz); err != nil { return nil, err } items = append(items, baz) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/hstore/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package hstore type Foo struct { Bar interface{} Baz interface{} } ================================================ FILE: internal/endtoend/testdata/hstore/stdlib/hstore.sql ================================================ CREATE EXTENSION IF NOT EXISTS hstore; CREATE TABLE foo ( bar hstore NOT NULL, baz hstore ); -- name: ListBar :many SELECT bar FROM foo; -- name: ListBaz :many SELECT baz FROM foo; ================================================ FILE: internal/endtoend/testdata/hstore/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "hstore", "schema": "hstore.sql", "queries": "hstore.sql" } ] } ================================================ FILE: internal/endtoend/testdata/identical_tables/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/identical_tables/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID string } type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/identical_tables/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const identicalTable = `-- name: IdenticalTable :many SELECT id FROM foo ` func (q *Queries) IdenticalTable(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, identicalTable) 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 } ================================================ FILE: internal/endtoend/testdata/identical_tables/mysql/query.sql ================================================ -- name: IdenticalTable :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/identical_tables/mysql/schema.sql ================================================ CREATE TABLE foo (id text not null); CREATE TABLE bar (id text not null); ================================================ FILE: internal/endtoend/testdata/identical_tables/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID string } type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const identicalTable = `-- name: IdenticalTable :many SELECT id FROM foo ` func (q *Queries) IdenticalTable(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, identicalTable) 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 } ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/query.sql ================================================ -- name: IdenticalTable :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (id text not null); CREATE TABLE bar (id text not null); ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID string } type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const identicalTable = `-- name: IdenticalTable :many SELECT id FROM foo ` func (q *Queries) IdenticalTable(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, identicalTable) 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 } ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/query.sql ================================================ -- name: IdenticalTable :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (id text not null); CREATE TABLE bar (id text not null); ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID string } type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const identicalTable = `-- name: IdenticalTable :many SELECT id FROM foo ` func (q *Queries) IdenticalTable(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, identicalTable) 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 } ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/stdlib/query.sql ================================================ -- name: IdenticalTable :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (id text not null); CREATE TABLE bar (id text not null); ================================================ FILE: internal/endtoend/testdata/identical_tables/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/identical_tables/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/identical_tables/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID string } type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/identical_tables/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const identicalTable = `-- name: IdenticalTable :many SELECT id FROM foo ` func (q *Queries) IdenticalTable(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, identicalTable) 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 } ================================================ FILE: internal/endtoend/testdata/identical_tables/sqlite/query.sql ================================================ -- name: IdenticalTable :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/identical_tables/sqlite/schema.sql ================================================ CREATE TABLE foo (id text not null); CREATE TABLE bar (id text not null); ================================================ FILE: internal/endtoend/testdata/identical_tables/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/identifier_case_sensitivity/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/identifier_case_sensitivity/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" ) type Author struct { ID int64 Name string Bio sql.NullString } ================================================ FILE: internal/endtoend/testdata/identifier_case_sensitivity/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" "database/sql" ) const createAuthor = `-- name: CreateAuthor :execresult INSERT INTO Authors ( Name, Bio ) VALUES ( ?, ? ) ` type CreateAuthorParams struct { Name string Bio sql.NullString } func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (sql.Result, error) { return q.db.ExecContext(ctx, createAuthor, arg.Name, arg.Bio) } 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 getAuthor = `-- name: GetAuthor :one SELECT id, name, bio FROM Authors WHERE ID = ? 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 } ================================================ FILE: internal/endtoend/testdata/identifier_case_sensitivity/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM Authors WHERE ID = ? LIMIT 1; -- name: ListAuthors :many SELECT * FROM Authors ORDER BY Name; -- name: CreateAuthor :execresult INSERT INTO Authors ( Name, Bio ) VALUES ( ?, ? ); -- name: DeleteAuthor :exec DELETE FROM Authors WHERE ID = ?; ================================================ FILE: internal/endtoend/testdata/identifier_case_sensitivity/schema.sql ================================================ CREATE TABLE Authors ( ID BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, Name text NOT NULL, Bio text ); ================================================ FILE: internal/endtoend/testdata/identifier_case_sensitivity/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "db", "engine": "mysql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/identifier_dollar_sign/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/identifier_dollar_sign/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db ================================================ FILE: internal/endtoend/testdata/identifier_dollar_sign/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const fn = `-- name: Fn :one SELECT f$n() ` func (q *Queries) Fn(ctx context.Context) (int32, error) { row := q.db.QueryRowContext(ctx, fn) var f_n int32 err := row.Scan(&f_n) return f_n, err } ================================================ FILE: internal/endtoend/testdata/identifier_dollar_sign/query.sql ================================================ -- name: Fn :one SELECT f$n(); ================================================ FILE: internal/endtoend/testdata/identifier_dollar_sign/schema.sql ================================================ CREATE FUNCTION f$n() RETURNS integer AS $$ SELECT 1 $$ LANGUAGE SQL; ================================================ FILE: internal/endtoend/testdata/identifier_dollar_sign/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "db", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/in_union/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/in_union/mysql/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/in_union/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/in_union/mysql/query.sql ================================================ -- name: GetAuthors :many SELECT * FROM authors WHERE author_id IN (SELECT author_id FROM book1 UNION SELECT author_id FROM book2); ================================================ FILE: internal/endtoend/testdata/in_union/mysql/schema.sql ================================================ 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 ); ================================================ FILE: internal/endtoend/testdata/in_union/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/inflection/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/inflection/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Calorie struct { ID string } type Campus struct { ID string } type ProductMetadatum struct { ID string } type ProductMetum struct { ID string } type Student struct { ID string } ================================================ FILE: internal/endtoend/testdata/inflection/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest 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 ` func (q *Queries) ListCalories(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listCalories) 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 listCampuses = `-- name: ListCampuses :many SELECT id FROM campus ` func (q *Queries) ListCampuses(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listCampuses) 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 listMetadata = `-- name: ListMetadata :many SELECT id FROM product_meta ` func (q *Queries) ListMetadata(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listMetadata) 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 listStudents = `-- name: ListStudents :many SELECT id FROM students ` func (q *Queries) ListStudents(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listStudents) 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 } ================================================ FILE: internal/endtoend/testdata/inflection/mysql/query.sql ================================================ /* name: ListCampuses :many */ SELECT * FROM campus; /* name: ListStudents :many */ SELECT * FROM students; /* name: ListMetadata :many */ SELECT * FROM product_meta; /* name: ListCalories :many */ SELECT * FROM calories; /* name: GetProductMetadata :many */ SELECT * FROM product_metadata; ================================================ FILE: internal/endtoend/testdata/inflection/mysql/schema.sql ================================================ 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); ================================================ FILE: internal/endtoend/testdata/inflection/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Calorie struct { ID string } type Campus struct { ID string } type ProductMetadatum struct { ID string } type ProductMetum struct { ID string } type Student struct { ID string } ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest 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 ` func (q *Queries) ListCalories(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, listCalories) 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 listCampuses = `-- name: ListCampuses :many SELECT id FROM campus ` func (q *Queries) ListCampuses(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, listCampuses) 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 listMetadata = `-- name: ListMetadata :many SELECT id FROM product_meta ` func (q *Queries) ListMetadata(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, listMetadata) 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 listStudents = `-- name: ListStudents :many SELECT id FROM students ` func (q *Queries) ListStudents(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, listStudents) 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 } ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/pgx/v4/query.sql ================================================ -- name: ListCampuses :many SELECT * FROM campus; -- name: ListStudents :many SELECT * FROM students; -- name: ListMetadata :many SELECT * FROM product_meta; -- name: ListCalories :many SELECT * FROM calories; -- name: GetProductMetadata :many SELECT * FROM product_metadata; ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/pgx/v4/schema.sql ================================================ 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); ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Calorie struct { ID string } type Campus struct { ID string } type ProductMetadatum struct { ID string } type ProductMetum struct { ID string } type Student struct { ID string } ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest 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 ` func (q *Queries) ListCalories(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, listCalories) 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 listCampuses = `-- name: ListCampuses :many SELECT id FROM campus ` func (q *Queries) ListCampuses(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, listCampuses) 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 listMetadata = `-- name: ListMetadata :many SELECT id FROM product_meta ` func (q *Queries) ListMetadata(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, listMetadata) 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 listStudents = `-- name: ListStudents :many SELECT id FROM students ` func (q *Queries) ListStudents(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, listStudents) 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 } ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/pgx/v5/query.sql ================================================ -- name: ListCampuses :many SELECT * FROM campus; -- name: ListStudents :many SELECT * FROM students; -- name: ListMetadata :many SELECT * FROM product_meta; -- name: ListCalories :many SELECT * FROM calories; -- name: GetProductMetadata :many SELECT * FROM product_metadata; ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/pgx/v5/schema.sql ================================================ 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); ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Calorie struct { ID string } type Campus struct { ID string } type ProductMetadatum struct { ID string } type ProductMetum struct { ID string } type Student struct { ID string } ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest 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 ` func (q *Queries) ListCalories(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listCalories) 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 listCampuses = `-- name: ListCampuses :many SELECT id FROM campus ` func (q *Queries) ListCampuses(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listCampuses) 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 listMetadata = `-- name: ListMetadata :many SELECT id FROM product_meta ` func (q *Queries) ListMetadata(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listMetadata) 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 listStudents = `-- name: ListStudents :many SELECT id FROM students ` func (q *Queries) ListStudents(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listStudents) 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 } ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/stdlib/query.sql ================================================ -- name: ListCampuses :many SELECT * FROM campus; -- name: ListStudents :many SELECT * FROM students; -- name: ListMetadata :many SELECT * FROM product_meta; -- name: ListCalories :many SELECT * FROM calories; -- name: GetProductMetadata :many SELECT * FROM product_metadata; ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/stdlib/schema.sql ================================================ 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); ================================================ FILE: internal/endtoend/testdata/inflection/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/inflection/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/inflection/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Calorie struct { ID string } type Campus struct { ID string } type ProductMetadatum struct { ID string } type ProductMetum struct { ID string } type Student struct { ID string } ================================================ FILE: internal/endtoend/testdata/inflection/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest 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 ` func (q *Queries) ListCalories(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listCalories) 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 listCampuses = `-- name: ListCampuses :many SELECT id FROM campus ` func (q *Queries) ListCampuses(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listCampuses) 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 listMetadata = `-- name: ListMetadata :many SELECT id FROM product_meta ` func (q *Queries) ListMetadata(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listMetadata) 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 listStudents = `-- name: ListStudents :many SELECT id FROM students ` func (q *Queries) ListStudents(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listStudents) 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 } ================================================ FILE: internal/endtoend/testdata/inflection/sqlite/query.sql ================================================ /* name: ListCampuses :many */ SELECT * FROM campus; /* name: ListStudents :many */ SELECT * FROM students; /* name: ListMetadata :many */ SELECT * FROM product_meta; /* name: ListCalories :many */ SELECT * FROM calories; /* name: GetProductMetadata :many */ SELECT * FROM product_metadata; ================================================ FILE: internal/endtoend/testdata/inflection/sqlite/schema.sql ================================================ 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); ================================================ FILE: internal/endtoend/testdata/inflection/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 Name string } type Exclusions struct { ID int32 Name string } type MyData struct { ID int32 Name string } ================================================ FILE: internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteBarByID = `-- name: DeleteBarByID :one DELETE FROM bars WHERE id = $1 RETURNING id, name ` func (q *Queries) DeleteBarByID(ctx context.Context, id int32) (Bar, error) { row := q.db.QueryRow(ctx, deleteBarByID, id) var i Bar err := row.Scan(&i.ID, &i.Name) return i, err } const deleteExclusionByID = `-- name: DeleteExclusionByID :one DELETE FROM exclusions WHERE id = $1 RETURNING id, name ` func (q *Queries) DeleteExclusionByID(ctx context.Context, id int32) (Exclusions, error) { row := q.db.QueryRow(ctx, deleteExclusionByID, id) var i Exclusions err := row.Scan(&i.ID, &i.Name) return i, err } const deleteMyDataByID = `-- name: DeleteMyDataByID :one DELETE FROM my_data WHERE id = $1 RETURNING id, name ` func (q *Queries) DeleteMyDataByID(ctx context.Context, id int32) (MyData, error) { row := q.db.QueryRow(ctx, deleteMyDataByID, id) var i MyData err := row.Scan(&i.ID, &i.Name) return i, err } ================================================ FILE: internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/schema.sql ================================================ 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)); ================================================ FILE: internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v4/sqlc.json ================================================ { "version": "2", "sql": [ { "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { "package": "querytest", "sql_package": "pgx/v4", "out": "go", "inflection_exclude_table_names": [ "my_data", "exclusions" ] } } } ] } ================================================ FILE: internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 Name string } type Exclusions struct { ID int32 Name string } type MyData struct { ID int32 Name string } ================================================ FILE: internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteBarByID = `-- name: DeleteBarByID :one DELETE FROM bars WHERE id = $1 RETURNING id, name ` func (q *Queries) DeleteBarByID(ctx context.Context, id int32) (Bar, error) { row := q.db.QueryRow(ctx, deleteBarByID, id) var i Bar err := row.Scan(&i.ID, &i.Name) return i, err } const deleteExclusionByID = `-- name: DeleteExclusionByID :one DELETE FROM exclusions WHERE id = $1 RETURNING id, name ` func (q *Queries) DeleteExclusionByID(ctx context.Context, id int32) (Exclusions, error) { row := q.db.QueryRow(ctx, deleteExclusionByID, id) var i Exclusions err := row.Scan(&i.ID, &i.Name) return i, err } const deleteMyDataByID = `-- name: DeleteMyDataByID :one DELETE FROM my_data WHERE id = $1 RETURNING id, name ` func (q *Queries) DeleteMyDataByID(ctx context.Context, id int32) (MyData, error) { row := q.db.QueryRow(ctx, deleteMyDataByID, id) var i MyData err := row.Scan(&i.ID, &i.Name) return i, err } ================================================ FILE: internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/schema.sql ================================================ 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)); ================================================ FILE: internal/endtoend/testdata/inflection_exclude_table_names/postgresql/pgx/v5/sqlc.json ================================================ { "version": "2", "sql": [ { "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { "package": "querytest", "sql_package": "pgx/v5", "out": "go", "inflection_exclude_table_names": [ "my_data", "exclusions" ] } } } ] } ================================================ FILE: internal/endtoend/testdata/insert_cte/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_cte/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "time" ) type Td3Code struct { ID int32 TsCreated time.Time TsUpdated time.Time CreatedBy string UpdatedBy string Code sql.NullString Hash sql.NullString IsPrivate sql.NullBool } type Td3TestCode struct { ID int32 TsCreated time.Time TsUpdated time.Time CreatedBy string UpdatedBy string TestID int32 CodeHash string } ================================================ FILE: internal/endtoend/testdata/insert_cte/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const insertCode = `-- name: InsertCode :one WITH cc AS ( INSERT INTO td3.codes(created_by, updated_by, code, hash, is_private) VALUES ($1, $1, $2, $3, false) RETURNING hash ) INSERT INTO td3.test_codes(created_by, updated_by, test_id, code_hash) VALUES( $1, $1, $4, (select hash from cc) ) RETURNING id, ts_created, ts_updated, created_by, updated_by, test_id, code_hash ` type InsertCodeParams struct { CreatedBy string Code sql.NullString Hash sql.NullString TestID int32 } func (q *Queries) InsertCode(ctx context.Context, arg InsertCodeParams) (Td3TestCode, error) { row := q.db.QueryRow(ctx, insertCode, arg.CreatedBy, arg.Code, arg.Hash, arg.TestID, ) var i Td3TestCode err := row.Scan( &i.ID, &i.TsCreated, &i.TsUpdated, &i.CreatedBy, &i.UpdatedBy, &i.TestID, &i.CodeHash, ) return i, err } ================================================ FILE: internal/endtoend/testdata/insert_cte/pgx/v4/query.sql ================================================ -- name: InsertCode :one WITH cc AS ( INSERT INTO td3.codes(created_by, updated_by, code, hash, is_private) VALUES ($1, $1, $2, $3, false) RETURNING hash ) INSERT INTO td3.test_codes(created_by, updated_by, test_id, code_hash) VALUES( $1, $1, $4, (select hash from cc) ) RETURNING *; ================================================ FILE: internal/endtoend/testdata/insert_cte/pgx/v4/schema.sql ================================================ -- FILE: schema.sql DROP SCHEMA IF EXISTS td3 CASCADE; CREATE SCHEMA td3; CREATE TABLE td3.codes ( id SERIAL PRIMARY KEY, ts_created timestamptz DEFAULT now() NOT NULL, ts_updated timestamptz DEFAULT now() NOT NULL, created_by text NOT NULL, updated_by text NOT NULL, code text, hash text, is_private boolean ); CREATE TABLE td3.test_codes ( id SERIAL PRIMARY KEY, ts_created timestamptz DEFAULT now() NOT NULL, ts_updated timestamptz DEFAULT now() NOT NULL, created_by text NOT NULL, updated_by text NOT NULL, test_id integer NOT NULL, code_hash text NOT NULL ); -- FILE: query.sql ================================================ FILE: internal/endtoend/testdata/insert_cte/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_cte/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_cte/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Td3Code struct { ID int32 TsCreated pgtype.Timestamptz TsUpdated pgtype.Timestamptz CreatedBy string UpdatedBy string Code pgtype.Text Hash pgtype.Text IsPrivate pgtype.Bool } type Td3TestCode struct { ID int32 TsCreated pgtype.Timestamptz TsUpdated pgtype.Timestamptz CreatedBy string UpdatedBy string TestID int32 CodeHash string } ================================================ FILE: internal/endtoend/testdata/insert_cte/pgx/v5/go/query.sql.go ================================================ // 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 insertCode = `-- name: InsertCode :one WITH cc AS ( INSERT INTO td3.codes(created_by, updated_by, code, hash, is_private) VALUES ($1, $1, $2, $3, false) RETURNING hash ) INSERT INTO td3.test_codes(created_by, updated_by, test_id, code_hash) VALUES( $1, $1, $4, (select hash from cc) ) RETURNING id, ts_created, ts_updated, created_by, updated_by, test_id, code_hash ` type InsertCodeParams struct { CreatedBy string Code pgtype.Text Hash pgtype.Text TestID int32 } func (q *Queries) InsertCode(ctx context.Context, arg InsertCodeParams) (Td3TestCode, error) { row := q.db.QueryRow(ctx, insertCode, arg.CreatedBy, arg.Code, arg.Hash, arg.TestID, ) var i Td3TestCode err := row.Scan( &i.ID, &i.TsCreated, &i.TsUpdated, &i.CreatedBy, &i.UpdatedBy, &i.TestID, &i.CodeHash, ) return i, err } ================================================ FILE: internal/endtoend/testdata/insert_cte/pgx/v5/query.sql ================================================ -- name: InsertCode :one WITH cc AS ( INSERT INTO td3.codes(created_by, updated_by, code, hash, is_private) VALUES ($1, $1, $2, $3, false) RETURNING hash ) INSERT INTO td3.test_codes(created_by, updated_by, test_id, code_hash) VALUES( $1, $1, $4, (select hash from cc) ) RETURNING *; ================================================ FILE: internal/endtoend/testdata/insert_cte/pgx/v5/schema.sql ================================================ -- FILE: schema.sql DROP SCHEMA IF EXISTS td3 CASCADE; CREATE SCHEMA td3; CREATE TABLE td3.codes ( id SERIAL PRIMARY KEY, ts_created timestamptz DEFAULT now() NOT NULL, ts_updated timestamptz DEFAULT now() NOT NULL, created_by text NOT NULL, updated_by text NOT NULL, code text, hash text, is_private boolean ); CREATE TABLE td3.test_codes ( id SERIAL PRIMARY KEY, ts_created timestamptz DEFAULT now() NOT NULL, ts_updated timestamptz DEFAULT now() NOT NULL, created_by text NOT NULL, updated_by text NOT NULL, test_id integer NOT NULL, code_hash text NOT NULL ); -- FILE: query.sql ================================================ FILE: internal/endtoend/testdata/insert_cte/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_cte/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_cte/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "time" ) type Td3Code struct { ID int32 TsCreated time.Time TsUpdated time.Time CreatedBy string UpdatedBy string Code sql.NullString Hash sql.NullString IsPrivate sql.NullBool } type Td3TestCode struct { ID int32 TsCreated time.Time TsUpdated time.Time CreatedBy string UpdatedBy string TestID int32 CodeHash string } ================================================ FILE: internal/endtoend/testdata/insert_cte/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const insertCode = `-- name: InsertCode :one WITH cc AS ( INSERT INTO td3.codes(created_by, updated_by, code, hash, is_private) VALUES ($1, $1, $2, $3, false) RETURNING hash ) INSERT INTO td3.test_codes(created_by, updated_by, test_id, code_hash) VALUES( $1, $1, $4, (select hash from cc) ) RETURNING id, ts_created, ts_updated, created_by, updated_by, test_id, code_hash ` type InsertCodeParams struct { CreatedBy string Code sql.NullString Hash sql.NullString TestID int32 } func (q *Queries) InsertCode(ctx context.Context, arg InsertCodeParams) (Td3TestCode, error) { row := q.db.QueryRowContext(ctx, insertCode, arg.CreatedBy, arg.Code, arg.Hash, arg.TestID, ) var i Td3TestCode err := row.Scan( &i.ID, &i.TsCreated, &i.TsUpdated, &i.CreatedBy, &i.UpdatedBy, &i.TestID, &i.CodeHash, ) return i, err } ================================================ FILE: internal/endtoend/testdata/insert_cte/stdlib/query.sql ================================================ -- name: InsertCode :one WITH cc AS ( INSERT INTO td3.codes(created_by, updated_by, code, hash, is_private) VALUES ($1, $1, $2, $3, false) RETURNING hash ) INSERT INTO td3.test_codes(created_by, updated_by, test_id, code_hash) VALUES( $1, $1, $4, (select hash from cc) ) RETURNING *; ================================================ FILE: internal/endtoend/testdata/insert_cte/stdlib/schema.sql ================================================ -- FILE: schema.sql DROP SCHEMA IF EXISTS td3 CASCADE; CREATE SCHEMA td3; CREATE TABLE td3.codes ( id SERIAL PRIMARY KEY, ts_created timestamptz DEFAULT now() NOT NULL, ts_updated timestamptz DEFAULT now() NOT NULL, created_by text NOT NULL, updated_by text NOT NULL, code text, hash text, is_private boolean ); CREATE TABLE td3.test_codes ( id SERIAL PRIMARY KEY, ts_created timestamptz DEFAULT now() NOT NULL, ts_updated timestamptz DEFAULT now() NOT NULL, created_by text NOT NULL, updated_by text NOT NULL, test_id integer NOT NULL, code_hash text NOT NULL ); -- FILE: query.sql ================================================ FILE: internal/endtoend/testdata/insert_cte/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_default_values/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_default_values/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Workspace struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/insert_default_values/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/insert_default_values/sqlite/query.sql ================================================ -- name: InsertWorkspace :exec INSERT INTO workspace DEFAULT VALUES; ================================================ FILE: internal/endtoend/testdata/insert_default_values/sqlite/schema.sql ================================================ CREATE TABLE workspace ( id INTEGER PRIMARY KEY AUTOINCREMENT ); ================================================ FILE: internal/endtoend/testdata/insert_default_values/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_select/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_select/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Name string Ready bool } type Foo struct { Name string Meta string } ================================================ FILE: internal/endtoend/testdata/insert_select/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const insertSelect = `-- name: InsertSelect :exec INSERT INTO foo (name, meta) SELECT name, ? FROM bar WHERE ready = ? ` type InsertSelectParams struct { Meta string Ready bool } func (q *Queries) InsertSelect(ctx context.Context, arg InsertSelectParams) error { _, err := q.db.ExecContext(ctx, insertSelect, arg.Meta, arg.Ready) return err } ================================================ FILE: internal/endtoend/testdata/insert_select/mysql/query.sql ================================================ /* name: InsertSelect :exec */ INSERT INTO foo (name, meta) SELECT name, ? FROM bar WHERE ready = ?; ================================================ FILE: internal/endtoend/testdata/insert_select/mysql/schema.sql ================================================ CREATE TABLE bar (name text not null, ready bool not null); CREATE TABLE foo (name text not null, meta text not null); ================================================ FILE: internal/endtoend/testdata/insert_select/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Name string Ready bool } type Foo struct { Name string Meta string } ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const insertSelect = `-- name: InsertSelect :exec INSERT INTO foo (name, meta) SELECT name, $1 FROM bar WHERE ready = $2 ` type InsertSelectParams struct { Meta string Ready bool } func (q *Queries) InsertSelect(ctx context.Context, arg InsertSelectParams) error { _, err := q.db.Exec(ctx, insertSelect, arg.Meta, arg.Ready) return err } ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/pgx/v4/query.sql ================================================ -- name: InsertSelect :exec INSERT INTO foo (name, meta) SELECT name, $1 FROM bar WHERE ready = $2; ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE bar (name text not null, ready bool not null); CREATE TABLE foo (name text not null, meta text not null); ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Name string Ready bool } type Foo struct { Name string Meta string } ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const insertSelect = `-- name: InsertSelect :exec INSERT INTO foo (name, meta) SELECT name, $1 FROM bar WHERE ready = $2 ` type InsertSelectParams struct { Meta string Ready bool } func (q *Queries) InsertSelect(ctx context.Context, arg InsertSelectParams) error { _, err := q.db.Exec(ctx, insertSelect, arg.Meta, arg.Ready) return err } ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/pgx/v5/query.sql ================================================ -- name: InsertSelect :exec INSERT INTO foo (name, meta) SELECT name, $1 FROM bar WHERE ready = $2; ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE bar (name text not null, ready bool not null); CREATE TABLE foo (name text not null, meta text not null); ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Name string Ready bool } type Foo struct { Name string Meta string } ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const insertSelect = `-- name: InsertSelect :exec INSERT INTO foo (name, meta) SELECT name, $1 FROM bar WHERE ready = $2 ` type InsertSelectParams struct { Meta string Ready bool } func (q *Queries) InsertSelect(ctx context.Context, arg InsertSelectParams) error { _, err := q.db.ExecContext(ctx, insertSelect, arg.Meta, arg.Ready) return err } ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/stdlib/query.sql ================================================ -- name: InsertSelect :exec INSERT INTO foo (name, meta) SELECT name, $1 FROM bar WHERE ready = $2; ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/stdlib/schema.sql ================================================ CREATE TABLE bar (name text not null, ready bool not null); CREATE TABLE foo (name text not null, meta text not null); ================================================ FILE: internal/endtoend/testdata/insert_select/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_select/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_select/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Name string Ready bool } type Foo struct { Name string Meta string } ================================================ FILE: internal/endtoend/testdata/insert_select/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const insertSelect = `-- name: InsertSelect :exec INSERT INTO foo (name, meta) SELECT name, ? FROM bar WHERE ready = ? ` type InsertSelectParams struct { Meta string Ready bool } func (q *Queries) InsertSelect(ctx context.Context, arg InsertSelectParams) error { _, err := q.db.ExecContext(ctx, insertSelect, arg.Meta, arg.Ready) return err } ================================================ FILE: internal/endtoend/testdata/insert_select/sqlite/query.sql ================================================ /* name: InsertSelect :exec */ INSERT INTO foo (name, meta) SELECT name, ? FROM bar WHERE ready = ?; ================================================ FILE: internal/endtoend/testdata/insert_select/sqlite/schema.sql ================================================ CREATE TABLE bar (name text not null, ready bool not null); CREATE TABLE foo (name text not null, meta text not null); ================================================ FILE: internal/endtoend/testdata/insert_select/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_select_case/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1646 ================================================ FILE: internal/endtoend/testdata/insert_select_case/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Order struct { ID pgtype.Int8 Name pgtype.Text } ================================================ FILE: internal/endtoend/testdata/insert_select_case/postgresql/pgx/go/query.sql.go ================================================ // 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 insertOrders = `-- name: InsertOrders :exec insert into Orders (id,name) select id , CASE WHEN $1::BOOLEAN THEN $2 ELSE s.name END from Orders s ` type InsertOrdersParams struct { NameDoUpdate pgtype.Bool Name pgtype.Text } func (q *Queries) InsertOrders(ctx context.Context, arg InsertOrdersParams) error { _, err := q.db.Exec(ctx, insertOrders, arg.NameDoUpdate, arg.Name) return err } ================================================ FILE: internal/endtoend/testdata/insert_select_case/postgresql/pgx/query.sql ================================================ -- name: InsertOrders :exec insert into Orders (id,name) select id , CASE WHEN @name_do_update::BOOLEAN THEN @name ELSE s.name END from Orders s ; ================================================ FILE: internal/endtoend/testdata/insert_select_case/postgresql/pgx/schema.sql ================================================ CREATE TABLE orders( id bigserial, name text ); ================================================ FILE: internal/endtoend/testdata/insert_select_case/postgresql/pgx/sqlc.yaml ================================================ version: "2" cloud: project: "01HAQMMECEYQYKFJN8MP16QC41" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/mysql/query.sql ================================================ -- name: InsertFoo :exec INSERT INTO foo (bar) SELECT 1, ?, ?; ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/mysql/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/mysql/stderr.txt ================================================ # package querytest query.sql:1:1: INSERT has more expressions than target columns ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/query.sql ================================================ -- name: InsertFoo :exec INSERT INTO foo (bar) SELECT 1, $1, $2; ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/stderr/base.txt ================================================ # package querytest query.sql:1:1: INSERT has more expressions than target columns ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v4/stderr/managed-db.txt ================================================ # package querytest query.sql:3:11: INSERT has more expressions than target columns ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/query.sql ================================================ -- name: InsertFoo :exec INSERT INTO foo (bar) SELECT 1, $1, $2; ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/stderr/base.txt ================================================ # package querytest query.sql:1:1: INSERT has more expressions than target columns ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/postgresql/pgx/v5/stderr/managed-db.txt ================================================ # package querytest query.sql:3:11: INSERT has more expressions than target columns ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/query.sql ================================================ -- name: InsertFoo :exec INSERT INTO foo (bar) SELECT 1, $1, $2; ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/stderr/base.txt ================================================ # package querytest query.sql:1:1: INSERT has more expressions than target columns ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/postgresql/stdlib/stderr/managed-db.txt ================================================ # package querytest query.sql:3:11: INSERT has more expressions than target columns ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/sqlite/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/sqlite/query.sql ================================================ -- name: InsertFoo :exec INSERT INTO foo (bar) SELECT 1, ?, ?; ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/sqlite/schema.sql ================================================ CREATE TABLE foo (bar text); ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_select_invalid/sqlite/stderr.txt ================================================ # package querytest query.sql:1:1: sqlite3: SQL logic error: 3 values for 1 columns ================================================ FILE: internal/endtoend/testdata/insert_select_param/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1328 ================================================ FILE: internal/endtoend/testdata/insert_select_param/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/insert_select_param/postgresql/pgx/go/query.sql.go ================================================ // 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 insertSelect = `-- name: InsertSelect :exec INSERT INTO authors (id, name, bio) SELECT $1, name, bio FROM authors WHERE name = $2 ` type InsertSelectParams struct { ID pgtype.Int8 Name pgtype.Text } func (q *Queries) InsertSelect(ctx context.Context, arg InsertSelectParams) error { _, err := q.db.Exec(ctx, insertSelect, arg.ID, arg.Name) return err } ================================================ FILE: internal/endtoend/testdata/insert_select_param/postgresql/pgx/query.sql ================================================ -- name: InsertSelect :exec INSERT INTO authors (id, name, bio) SELECT @id, name, bio FROM authors WHERE name = @name; ================================================ FILE: internal/endtoend/testdata/insert_select_param/postgresql/pgx/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/insert_select_param/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/insert_values/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_values/mysql/go/models.go ================================================ // 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.NullInt32 } ================================================ FILE: internal/endtoend/testdata/insert_values/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const insertMultipleValues = `-- name: InsertMultipleValues :exec INSERT INTO foo (a, b) VALUES (?, ?), (?, ?) ` type InsertMultipleValuesParams struct { A sql.NullString B sql.NullInt32 A_2 sql.NullString B_2 sql.NullInt32 } func (q *Queries) InsertMultipleValues(ctx context.Context, arg InsertMultipleValuesParams) error { _, err := q.db.ExecContext(ctx, insertMultipleValues, arg.A, arg.B, arg.A_2, arg.B_2, ) return err } const insertValues = `-- name: InsertValues :exec INSERT INTO foo (a, b) VALUES (?, ?) ` type InsertValuesParams struct { A sql.NullString B sql.NullInt32 } func (q *Queries) InsertValues(ctx context.Context, arg InsertValuesParams) error { _, err := q.db.ExecContext(ctx, insertValues, arg.A, arg.B) return err } ================================================ FILE: internal/endtoend/testdata/insert_values/mysql/query.sql ================================================ /* name: InsertValues :exec */ INSERT INTO foo (a, b) VALUES (?, ?); /* name: InsertMultipleValues :exec */ INSERT INTO foo (a, b) VALUES (?, ?), (?, ?); ================================================ FILE: internal/endtoend/testdata/insert_values/mysql/schema.sql ================================================ CREATE TABLE foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/insert_values/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/pgx/v4/go/models.go ================================================ // 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.NullInt32 } ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const insertMultipleValues = `-- name: InsertMultipleValues :exec INSERT INTO foo (a, b) VALUES ($1, $2), ($3, $4) ` type InsertMultipleValuesParams struct { A sql.NullString B sql.NullInt32 A_2 sql.NullString B_2 sql.NullInt32 } func (q *Queries) InsertMultipleValues(ctx context.Context, arg InsertMultipleValuesParams) error { _, err := q.db.Exec(ctx, insertMultipleValues, arg.A, arg.B, arg.A_2, arg.B_2, ) return err } const insertValues = `-- name: InsertValues :exec INSERT INTO foo (a, b) VALUES ($1, $2) ` type InsertValuesParams struct { A sql.NullString B sql.NullInt32 } func (q *Queries) InsertValues(ctx context.Context, arg InsertValuesParams) error { _, err := q.db.Exec(ctx, insertValues, arg.A, arg.B) return err } ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/pgx/v4/query.sql ================================================ -- name: InsertValues :exec INSERT INTO foo (a, b) VALUES ($1, $2); /* name: InsertMultipleValues :exec */ INSERT INTO foo (a, b) VALUES ($1, $2), ($3, $4); ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { A pgtype.Text B pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 insertMultipleValues = `-- name: InsertMultipleValues :exec INSERT INTO foo (a, b) VALUES ($1, $2), ($3, $4) ` type InsertMultipleValuesParams struct { A pgtype.Text B pgtype.Int4 A_2 pgtype.Text B_2 pgtype.Int4 } func (q *Queries) InsertMultipleValues(ctx context.Context, arg InsertMultipleValuesParams) error { _, err := q.db.Exec(ctx, insertMultipleValues, arg.A, arg.B, arg.A_2, arg.B_2, ) return err } const insertValues = `-- name: InsertValues :exec INSERT INTO foo (a, b) VALUES ($1, $2) ` type InsertValuesParams struct { A pgtype.Text B pgtype.Int4 } func (q *Queries) InsertValues(ctx context.Context, arg InsertValuesParams) error { _, err := q.db.Exec(ctx, insertValues, arg.A, arg.B) return err } ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/pgx/v5/query.sql ================================================ -- name: InsertValues :exec INSERT INTO foo (a, b) VALUES ($1, $2); /* name: InsertMultipleValues :exec */ INSERT INTO foo (a, b) VALUES ($1, $2), ($3, $4); ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/stdlib/go/models.go ================================================ // 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.NullInt32 } ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const insertMultipleValues = `-- name: InsertMultipleValues :exec INSERT INTO foo (a, b) VALUES ($1, $2), ($3, $4) ` type InsertMultipleValuesParams struct { A sql.NullString B sql.NullInt32 A_2 sql.NullString B_2 sql.NullInt32 } func (q *Queries) InsertMultipleValues(ctx context.Context, arg InsertMultipleValuesParams) error { _, err := q.db.ExecContext(ctx, insertMultipleValues, arg.A, arg.B, arg.A_2, arg.B_2, ) return err } const insertValues = `-- name: InsertValues :exec INSERT INTO foo (a, b) VALUES ($1, $2) ` type InsertValuesParams struct { A sql.NullString B sql.NullInt32 } func (q *Queries) InsertValues(ctx context.Context, arg InsertValuesParams) error { _, err := q.db.ExecContext(ctx, insertValues, arg.A, arg.B) return err } ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/stdlib/query.sql ================================================ -- name: InsertValues :exec INSERT INTO foo (a, b) VALUES ($1, $2); /* name: InsertMultipleValues :exec */ INSERT INTO foo (a, b) VALUES ($1, $2), ($3, $4); ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/insert_values/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_values/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_values/sqlite/go/models.go ================================================ // 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.NullInt64 } ================================================ FILE: internal/endtoend/testdata/insert_values/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const insertMultipleValues = `-- name: InsertMultipleValues :exec INSERT INTO foo (a, b) VALUES (?, ?), (?, ?) ` type InsertMultipleValuesParams struct { A sql.NullString B sql.NullInt64 A_2 sql.NullString B_2 sql.NullInt64 } func (q *Queries) InsertMultipleValues(ctx context.Context, arg InsertMultipleValuesParams) error { _, err := q.db.ExecContext(ctx, insertMultipleValues, arg.A, arg.B, arg.A_2, arg.B_2, ) return err } const insertValues = `-- name: InsertValues :exec INSERT INTO foo (a, b) VALUES (?, ?) ` type InsertValuesParams struct { A sql.NullString B sql.NullInt64 } func (q *Queries) InsertValues(ctx context.Context, arg InsertValuesParams) error { _, err := q.db.ExecContext(ctx, insertValues, arg.A, arg.B) return err } ================================================ FILE: internal/endtoend/testdata/insert_values/sqlite/query.sql ================================================ /* name: InsertValues :exec */ INSERT INTO foo (a, b) VALUES (?, ?); /* name: InsertMultipleValues :exec */ INSERT INTO foo (a, b) VALUES (?, ?), (?, ?); ================================================ FILE: internal/endtoend/testdata/insert_values/sqlite/schema.sql ================================================ CREATE TABLE foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/insert_values/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_values_only/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/938 ================================================ FILE: internal/endtoend/testdata/insert_values_only/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Status struct { ID int32 Name string } ================================================ FILE: internal/endtoend/testdata/insert_values_only/postgresql/pgx/go/query.sql.go ================================================ // 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 insertStatus = `-- name: InsertStatus :exec INSERT INTO status VALUES ($1, $2) ` type InsertStatusParams struct { Column1 pgtype.Int4 Column2 pgtype.Text } func (q *Queries) InsertStatus(ctx context.Context, arg InsertStatusParams) error { _, err := q.db.Exec(ctx, insertStatus, arg.Column1, arg.Column2) return err } ================================================ FILE: internal/endtoend/testdata/insert_values_only/postgresql/pgx/query.sql ================================================ -- name: InsertStatus :exec INSERT INTO status VALUES ($1, $2); ================================================ FILE: internal/endtoend/testdata/insert_values_only/postgresql/pgx/schema.sql ================================================ CREATE TABLE status ( id integer, name varchar(100) NOT NULL, PRIMARY KEY(id) ); ================================================ FILE: internal/endtoend/testdata/insert_values_only/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/insert_values_public/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_values_public/mysql/go/models.go ================================================ // 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.NullInt32 } ================================================ FILE: internal/endtoend/testdata/insert_values_public/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const insertValues = `-- name: InsertValues :exec INSERT INTO public.foo (a, b) VALUES (?, ?) ` type InsertValuesParams struct { A sql.NullString B sql.NullInt32 } func (q *Queries) InsertValues(ctx context.Context, arg InsertValuesParams) error { _, err := q.db.ExecContext(ctx, insertValues, arg.A, arg.B) return err } ================================================ FILE: internal/endtoend/testdata/insert_values_public/mysql/query.sql ================================================ /* name: InsertValues :exec */ INSERT INTO public.foo (a, b) VALUES (?, ?); ================================================ FILE: internal/endtoend/testdata/insert_values_public/mysql/schema.sql ================================================ CREATE TABLE foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/insert_values_public/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/go/models.go ================================================ // 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.NullInt32 } ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const insertValues = `-- name: InsertValues :exec INSERT INTO public.foo (a, b) VALUES ($1, $2) ` type InsertValuesParams struct { A sql.NullString B sql.NullInt32 } func (q *Queries) InsertValues(ctx context.Context, arg InsertValuesParams) error { _, err := q.db.Exec(ctx, insertValues, arg.A, arg.B) return err } ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/query.sql ================================================ -- name: InsertValues :exec INSERT INTO public.foo (a, b) VALUES ($1, $2); ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { A pgtype.Text B pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 insertValues = `-- name: InsertValues :exec INSERT INTO public.foo (a, b) VALUES ($1, $2) ` type InsertValuesParams struct { A pgtype.Text B pgtype.Int4 } func (q *Queries) InsertValues(ctx context.Context, arg InsertValuesParams) error { _, err := q.db.Exec(ctx, insertValues, arg.A, arg.B) return err } ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/query.sql ================================================ -- name: InsertValues :exec INSERT INTO public.foo (a, b) VALUES ($1, $2); ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/stdlib/go/models.go ================================================ // 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.NullInt32 } ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const insertValues = `-- name: InsertValues :exec INSERT INTO public.foo (a, b) VALUES ($1, $2) ` type InsertValuesParams struct { A sql.NullString B sql.NullInt32 } func (q *Queries) InsertValues(ctx context.Context, arg InsertValuesParams) error { _, err := q.db.ExecContext(ctx, insertValues, arg.A, arg.B) return err } ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/stdlib/query.sql ================================================ -- name: InsertValues :exec INSERT INTO public.foo (a, b) VALUES ($1, $2); ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (a text, b integer); ================================================ FILE: internal/endtoend/testdata/insert_values_public/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/interval/pgx/v4/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/interval/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/interval/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar bool Interval int64 } ================================================ FILE: internal/endtoend/testdata/interval/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const get = `-- name: Get :many SELECT bar, "interval" FROM foo LIMIT $1 ` func (q *Queries) Get(ctx context.Context, limit int32) ([]Foo, error) { rows, err := q.db.Query(ctx, get, limit) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Bar, &i.Interval); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/interval/pgx/v4/query.sql ================================================ -- name: Get :many SELECT bar, "interval" FROM foo LIMIT $1; ================================================ FILE: internal/endtoend/testdata/interval/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar bool not null, "interval" interval not null); ================================================ FILE: internal/endtoend/testdata/interval/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/interval/pgx/v5/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/interval/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/interval/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar bool Interval pgtype.Interval } ================================================ FILE: internal/endtoend/testdata/interval/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const get = `-- name: Get :many SELECT bar, "interval" FROM foo LIMIT $1 ` func (q *Queries) Get(ctx context.Context, limit int32) ([]Foo, error) { rows, err := q.db.Query(ctx, get, limit) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Bar, &i.Interval); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/interval/pgx/v5/query.sql ================================================ -- name: Get :many SELECT bar, "interval" FROM foo LIMIT $1; ================================================ FILE: internal/endtoend/testdata/interval/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar bool not null, "interval" interval not null); ================================================ FILE: internal/endtoend/testdata/interval/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/interval/stdlib/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/interval/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/interval/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar bool Interval int64 } ================================================ FILE: internal/endtoend/testdata/interval/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const get = `-- name: Get :many SELECT bar, "interval" FROM foo LIMIT $1 ` func (q *Queries) Get(ctx context.Context, limit int32) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, get, limit) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Bar, &i.Interval); 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 } ================================================ FILE: internal/endtoend/testdata/interval/stdlib/query.sql ================================================ -- name: Get :many SELECT bar, "interval" FROM foo LIMIT $1; ================================================ FILE: internal/endtoend/testdata/interval/stdlib/schema.sql ================================================ CREATE TABLE foo (bar bool not null, "interval" interval not null); ================================================ FILE: internal/endtoend/testdata/interval/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_func_args/pgx/v4/query.sql ================================================ -- name: Test :one SELECT random(1); ================================================ FILE: internal/endtoend/testdata/invalid_func_args/pgx/v4/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/invalid_func_args/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_func_args/pgx/v4/stderr/base.txt ================================================ # package querytest query.sql:2:8: function random(unknown) does not exist ================================================ FILE: internal/endtoend/testdata/invalid_func_args/pgx/v4/stderr/managed-db.txt ================================================ # package querytest query.sql:2:8: function random(integer) does not exist ================================================ FILE: internal/endtoend/testdata/invalid_func_args/pgx/v5/query.sql ================================================ -- name: Test :one SELECT random(1); ================================================ FILE: internal/endtoend/testdata/invalid_func_args/pgx/v5/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/invalid_func_args/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_func_args/pgx/v5/stderr/base.txt ================================================ # package querytest query.sql:2:8: function random(unknown) does not exist ================================================ FILE: internal/endtoend/testdata/invalid_func_args/pgx/v5/stderr/managed-db.txt ================================================ # package querytest query.sql:2:8: function random(integer) does not exist ================================================ FILE: internal/endtoend/testdata/invalid_func_args/stdlib/query.sql ================================================ -- name: Test :one SELECT random(1); ================================================ FILE: internal/endtoend/testdata/invalid_func_args/stdlib/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/invalid_func_args/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_func_args/stdlib/stderr/base.txt ================================================ # package querytest query.sql:2:8: function random(unknown) does not exist ================================================ FILE: internal/endtoend/testdata/invalid_func_args/stdlib/stderr/managed-db.txt ================================================ # package querytest query.sql:2:8: function random(integer) does not exist ================================================ FILE: internal/endtoend/testdata/invalid_group_by_reference/mysql/exec.json ================================================ { "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/invalid_group_by_reference/mysql/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM authors GROUP BY invalid_reference; ================================================ FILE: internal/endtoend/testdata/invalid_group_by_reference/mysql/schema.sql ================================================ CREATE TABLE authors ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/invalid_group_by_reference/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_group_by_reference/mysql/stderr.txt ================================================ # package querytest query.sql:4:10: column reference "invalid_reference" not found ================================================ FILE: internal/endtoend/testdata/invalid_group_by_reference/postgresql/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM authors GROUP BY invalid_reference; ================================================ FILE: internal/endtoend/testdata/invalid_group_by_reference/postgresql/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/invalid_group_by_reference/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_group_by_reference/postgresql/stderr/base.txt ================================================ # package querytest query.sql:4:10: column reference "invalid_reference" not found ================================================ FILE: internal/endtoend/testdata/invalid_group_by_reference/postgresql/stderr/managed-db.txt ================================================ # package querytest query.sql:4:22: column "invalid_reference" does not exist ================================================ FILE: internal/endtoend/testdata/invalid_group_by_reference/sqlite/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/invalid_group_by_reference/sqlite/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM authors GROUP BY invalid_reference; ================================================ FILE: internal/endtoend/testdata/invalid_group_by_reference/sqlite/schema.sql ================================================ CREATE TABLE authors ( id integer NOT NULL PRIMARY KEY AUTOINCREMENT, name text NOT NULL, bio text, UNIQUE(name) ); ================================================ FILE: internal/endtoend/testdata/invalid_group_by_reference/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_group_by_reference/sqlite/stderr.txt ================================================ # package querytest query.sql:1:1: sqlite3: SQL logic error: no such column: invalid_reference ================================================ FILE: internal/endtoend/testdata/invalid_insert_unknown_column/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/381 ================================================ FILE: internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "context" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgconn" ) type DBTX interface { Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) Query(context.Context, string, ...interface{}) (pgx.Rows, error) QueryRow(context.Context, string, ...interface{}) pgx.Row } func New(db DBTX) *Queries { return &Queries{db: db} } type Queries struct { db DBTX } func (q *Queries) WithTx(tx pgx.Tx) *Queries { return &Queries{ db: tx, } } ================================================ FILE: internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "github.com/jackc/pgx/v5/pgtype" ) type Author struct { ID int64 Name string Bio pgtype.Text } ================================================ FILE: internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" "github.com/jackc/pgx/v5/pgtype" ) const createAuthor = `-- name: CreateAuthor :one INSERT INTO authors ( name, bio, missing_column ) VALUES ( $1, $2, true ) RETURNING id, name, bio ` type CreateAuthorParams struct { Name string Bio pgtype.Text } func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (Author, error) { row := q.db.QueryRow(ctx, createAuthor, arg.Name, arg.Bio) var i Author err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err } ================================================ FILE: internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/query.sql ================================================ -- name: CreateAuthor :one INSERT INTO authors ( name, bio, missing_column ) VALUES ( $1, $2, true ) RETURNING *; ================================================ FILE: internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/sqlc.json ================================================ { "version": "1", "cloud": { "project": "01HAQMMECEYQYKFJN8MP16QC41" }, "packages": [ { "path": "db", "engine": "postgresql", "database": { "managed": true }, "sql_package": "pgx/v5", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_insert_unknown_column/postgresql/pgx/stderr.txt ================================================ # package db query.sql:3:14: column "missing_column" of relation "authors" does not exist ================================================ FILE: internal/endtoend/testdata/invalid_named_params/mysql/query.sql ================================================ -- name: ListAuthors :one SELECT * FROM authors WHERE id = sqlc.arg(my_named_param) OR bio = sqlc.arg(my_named_param) LIMIT 1; ================================================ FILE: internal/endtoend/testdata/invalid_named_params/mysql/schema.sql ================================================ CREATE TABLE authors ( id BIGINT PRIMARY KEY, bio TEXT ); ================================================ FILE: internal/endtoend/testdata/invalid_named_params/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_named_params/mysql/stderr.txt ================================================ # package querytest error generating code: named param MyNamedParam has incompatible types: sql.NullString, int64 ================================================ FILE: internal/endtoend/testdata/invalid_params/pgx/v4/query.sql ================================================ -- name: baz :one SELECT foo FROM bar WHERE baz = $4; -- name: bar :one SELECT foo FROM bar WHERE baz = $1 AND baz = $3; -- name: foo :one SELECT foo FROM bar; -- name: Named :many SELECT id FROM bar WHERE id = $1 AND sqlc.arg(named) = true AND id = $5; ================================================ FILE: internal/endtoend/testdata/invalid_params/pgx/v4/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/invalid_params/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_params/pgx/v4/stderr/base.txt ================================================ # package querytest query.sql:1:1: could not determine data type of parameter $1 query.sql:5:1: could not determine data type of parameter $2 query.sql:8:8: column "foo" does not exist query.sql:11:1: could not determine data type of parameter $2 ================================================ FILE: internal/endtoend/testdata/invalid_params/pgx/v4/stderr/managed-db.txt ================================================ # package querytest query.sql:2:8: column "foo" does not exist query.sql:5:8: column "foo" does not exist query.sql:8:8: column "foo" does not exist query.sql:8:20: could not determine data type of parameter $3 ================================================ FILE: internal/endtoend/testdata/invalid_params/pgx/v5/query.sql ================================================ -- name: baz :one SELECT foo FROM bar WHERE baz = $4; -- name: bar :one SELECT foo FROM bar WHERE baz = $1 AND baz = $3; -- name: foo :one SELECT foo FROM bar; -- name: Named :many SELECT id FROM bar WHERE id = $1 AND sqlc.arg(named) = true AND id = $5; ================================================ FILE: internal/endtoend/testdata/invalid_params/pgx/v5/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/invalid_params/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_params/pgx/v5/stderr/base.txt ================================================ # package querytest query.sql:1:1: could not determine data type of parameter $1 query.sql:5:1: could not determine data type of parameter $2 query.sql:8:8: column "foo" does not exist query.sql:11:1: could not determine data type of parameter $2 ================================================ FILE: internal/endtoend/testdata/invalid_params/pgx/v5/stderr/managed-db.txt ================================================ # package querytest query.sql:2:8: column "foo" does not exist query.sql:5:8: column "foo" does not exist query.sql:8:8: column "foo" does not exist query.sql:8:20: could not determine data type of parameter $3 ================================================ FILE: internal/endtoend/testdata/invalid_params/stdlib/query.sql ================================================ -- name: baz :one SELECT foo FROM bar WHERE baz = $4; -- name: bar :one SELECT foo FROM bar WHERE baz = $1 AND baz = $3; -- name: foo :one SELECT foo FROM bar; -- name: Named :many SELECT id FROM bar WHERE id = $1 AND sqlc.arg(named) = true AND id = $5; ================================================ FILE: internal/endtoend/testdata/invalid_params/stdlib/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/invalid_params/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_params/stdlib/stderr/base.txt ================================================ # package querytest query.sql:1:1: could not determine data type of parameter $1 query.sql:5:1: could not determine data type of parameter $2 query.sql:8:8: column "foo" does not exist query.sql:11:1: could not determine data type of parameter $2 ================================================ FILE: internal/endtoend/testdata/invalid_params/stdlib/stderr/managed-db.txt ================================================ # package querytest query.sql:2:8: column "foo" does not exist query.sql:5:8: column "foo" does not exist query.sql:8:8: column "foo" does not exist query.sql:8:20: could not determine data type of parameter $3 ================================================ FILE: internal/endtoend/testdata/invalid_params_type_mismatch/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/297 ================================================ FILE: internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/query.sql ================================================ -- name: UpdateAuthor :exec UPDATE authors SET name = $1 WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name boolean NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "db", "engine": "postgresql", "sql_package": "pgx/v5", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_params_type_mismatch/postgresql/pgx/stderr.txt ================================================ # package db query.sql:3:12: column "name" is of type boolean but expression is of type bigint ================================================ FILE: internal/endtoend/testdata/invalid_queries_bar/pgx/v4/query.sql ================================================ -- name: InsertBarBaz :exec INSERT INTO foo (bar, baz) VALUES ($1); -- name: InsertBar :exec INSERT INTO foo (bar) VALUES ($1, $2); ================================================ FILE: internal/endtoend/testdata/invalid_queries_bar/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text not null, baz text not null); ================================================ FILE: internal/endtoend/testdata/invalid_queries_bar/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_queries_bar/pgx/v4/stderr/base.txt ================================================ # package querytest query.sql:1:1: INSERT has more target columns than expressions query.sql:5:1: INSERT has more expressions than target columns ================================================ FILE: internal/endtoend/testdata/invalid_queries_bar/pgx/v4/stderr/managed-db.txt ================================================ # package querytest query.sql:2:23: INSERT has more target columns than expressions query.sql:5:35: INSERT has more expressions than target columns ================================================ FILE: internal/endtoend/testdata/invalid_queries_bar/pgx/v5/query.sql ================================================ -- name: InsertBarBaz :exec INSERT INTO foo (bar, baz) VALUES ($1); -- name: InsertBar :exec INSERT INTO foo (bar) VALUES ($1, $2); ================================================ FILE: internal/endtoend/testdata/invalid_queries_bar/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text not null, baz text not null); ================================================ FILE: internal/endtoend/testdata/invalid_queries_bar/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_queries_bar/pgx/v5/stderr/base.txt ================================================ # package querytest query.sql:1:1: INSERT has more target columns than expressions query.sql:5:1: INSERT has more expressions than target columns ================================================ FILE: internal/endtoend/testdata/invalid_queries_bar/pgx/v5/stderr/managed-db.txt ================================================ # package querytest query.sql:2:23: INSERT has more target columns than expressions query.sql:5:35: INSERT has more expressions than target columns ================================================ FILE: internal/endtoend/testdata/invalid_queries_bar/stdlib/query.sql ================================================ -- name: InsertBarBaz :exec INSERT INTO foo (bar, baz) VALUES ($1); -- name: InsertBar :exec INSERT INTO foo (bar) VALUES ($1, $2); ================================================ FILE: internal/endtoend/testdata/invalid_queries_bar/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text not null, baz text not null); ================================================ FILE: internal/endtoend/testdata/invalid_queries_bar/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_queries_bar/stdlib/stderr/base.txt ================================================ # package querytest query.sql:1:1: INSERT has more target columns than expressions query.sql:5:1: INSERT has more expressions than target columns ================================================ FILE: internal/endtoend/testdata/invalid_queries_bar/stdlib/stderr/managed-db.txt ================================================ # package querytest query.sql:2:23: INSERT has more target columns than expressions query.sql:5:35: INSERT has more expressions than target columns ================================================ FILE: internal/endtoend/testdata/invalid_queries_foo/pgx/v4/query.sql ================================================ -- name: ListFoos SELECT id FROM foo; -- name: ListFoos :one :many SELECT id FROM foo; -- name: ListFoos :two SELECT id FROM foo; -- name: DeleteFoo :one DELETE FROM foo WHERE id = $1; -- name: UpdateFoo :one 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); ================================================ FILE: internal/endtoend/testdata/invalid_queries_foo/pgx/v4/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/invalid_queries_foo/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_queries_foo/pgx/v4/stderr.txt ================================================ # package querytest query.sql:1:1: missing query type [':one', ':many', ':exec', ':execrows', ':execlastid', ':execresult', ':copyfrom', 'batchexec', 'batchmany', 'batchone']: -- name: ListFoos query.sql:5:1: invalid query comment: -- name: ListFoos :one :many query.sql:8:1: invalid query type: :two query.sql:11:1: query "DeleteFoo" specifies parameter ":one" without containing a RETURNING clause 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 query.sql:20:1: query "InsertFoo" specifies parameter ":batchone" without containing a RETURNING clause ================================================ FILE: internal/endtoend/testdata/invalid_queries_foo/pgx/v5/query.sql ================================================ -- name: ListFoos SELECT id FROM foo; -- name: ListFoos :one :many SELECT id FROM foo; -- name: ListFoos :two SELECT id FROM foo; -- name: DeleteFoo :one DELETE FROM foo WHERE id = $1; -- name: UpdateFoo :one 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); ================================================ FILE: internal/endtoend/testdata/invalid_queries_foo/pgx/v5/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/invalid_queries_foo/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_queries_foo/pgx/v5/stderr.txt ================================================ # package querytest query.sql:1:1: missing query type [':one', ':many', ':exec', ':execrows', ':execlastid', ':execresult', ':copyfrom', 'batchexec', 'batchmany', 'batchone']: -- name: ListFoos query.sql:5:1: invalid query comment: -- name: ListFoos :one :many query.sql:8:1: invalid query type: :two query.sql:11:1: query "DeleteFoo" specifies parameter ":one" without containing a RETURNING clause 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 query.sql:20:1: query "InsertFoo" specifies parameter ":batchone" without containing a RETURNING clause ================================================ FILE: internal/endtoend/testdata/invalid_queries_foo/stdlib/query.sql ================================================ -- name: ListFoos SELECT id FROM foo; -- name: ListFoos :one :many SELECT id FROM foo; -- name: ListFoos :two SELECT id FROM foo; -- name: DeleteFoo :one DELETE FROM foo WHERE id = $1; -- name: UpdateFoo :one UPDATE foo SET id = $2 WHERE id = $1; -- name: InsertFoo :one INSERT INTO foo (id) VALUES ($1); ================================================ FILE: internal/endtoend/testdata/invalid_queries_foo/stdlib/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/invalid_queries_foo/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_queries_foo/stdlib/stderr.txt ================================================ # package querytest query.sql:1:1: missing query type [':one', ':many', ':exec', ':execrows', ':execlastid', ':execresult', ':copyfrom', 'batchexec', 'batchmany', 'batchone']: -- name: ListFoos query.sql:5:1: invalid query comment: -- name: ListFoos :one :many query.sql:8:1: invalid query type: :two query.sql:11:1: query "DeleteFoo" specifies parameter ":one" without containing a RETURNING clause 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 ================================================ FILE: internal/endtoend/testdata/invalid_table_alias/mysql/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors a WHERE p.id = ? LIMIT 1; ================================================ FILE: internal/endtoend/testdata/invalid_table_alias/mysql/schema.sql ================================================ -- https://github.com/sqlc-dev/sqlc/issues/437 CREATE TABLE authors ( id INT PRIMARY KEY, name VARCHAR(255) NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/invalid_table_alias/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_table_alias/mysql/stderr.txt ================================================ # package querytest query.sql:4:9: table alias "p" does not exist ================================================ FILE: internal/endtoend/testdata/invalid_table_alias/postgresql/exec.json ================================================ { "os": ["darwin", "linux"] } ================================================ FILE: internal/endtoend/testdata/invalid_table_alias/postgresql/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors a WHERE p.id = $1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/invalid_table_alias/postgresql/schema.sql ================================================ -- https://github.com/sqlc-dev/sqlc/issues/437 CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/invalid_table_alias/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_table_alias/postgresql/stderr/base.txt ================================================ # package querytest query.sql:4:9: table alias "p" does not exist ================================================ FILE: internal/endtoend/testdata/invalid_table_alias/postgresql/stderr/managed-db.txt ================================================ # package querytest query.sql:5:3: missing FROM-clause entry for table "p" ================================================ FILE: internal/endtoend/testdata/invalid_table_alias/sqlite/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/invalid_table_alias/sqlite/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors a WHERE p.id = ? LIMIT 1; ================================================ FILE: internal/endtoend/testdata/invalid_table_alias/sqlite/schema.sql ================================================ -- https://github.com/sqlc-dev/sqlc/issues/437 CREATE TABLE authors ( id INTEGER PRIMARY KEY, name VARCHAR(255) NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/invalid_table_alias/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/invalid_table_alias/sqlite/stderr.txt ================================================ # package querytest query.sql:1:1: sqlite3: SQL logic error: no such column: p.id ================================================ FILE: internal/endtoend/testdata/invalid_update_unknown_column/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/884 ================================================ FILE: internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/query.sql ================================================ -- name: UpdateArticles :exec UPDATE public.articles SET is_deleted = TRUE WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/schema.sql ================================================ CREATE TABLE public.articles ( id integer NOT NULL, company integer NOT NULL, name text NOT NULL, sort_order integer DEFAULT 0 NOT NULL, object_type smallint NOT NULL, image text, "group" integer, notes text DEFAULT ''::text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/invalid_update_unknown_column/postgresql/pgx/stderr.txt ================================================ # package querytest query.sql:5:2: column "is_deleted" of relation "articles" does not exist ================================================ FILE: internal/endtoend/testdata/join_alias/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_alias/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID uint64 Title sql.NullString } type Foo struct { ID uint64 } ================================================ FILE: internal/endtoend/testdata/join_alias/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const aliasExpand = `-- name: AliasExpand :many SELECT f.id, b.id, title FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = ? ` type AliasExpandRow struct { ID uint64 ID_2 uint64 Title sql.NullString } func (q *Queries) AliasExpand(ctx context.Context, id uint64) ([]AliasExpandRow, error) { rows, err := q.db.QueryContext(ctx, aliasExpand, id) if err != nil { return nil, err } defer rows.Close() var items []AliasExpandRow for rows.Next() { var i AliasExpandRow if err := rows.Scan(&i.ID, &i.ID_2, &i.Title); 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 aliasJoin = `-- name: AliasJoin :many SELECT f.id, b.title FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = ? ` type AliasJoinRow struct { ID uint64 Title sql.NullString } func (q *Queries) AliasJoin(ctx context.Context, id uint64) ([]AliasJoinRow, error) { rows, err := q.db.QueryContext(ctx, aliasJoin, id) if err != nil { return nil, err } defer rows.Close() var items []AliasJoinRow for rows.Next() { var i AliasJoinRow if err := rows.Scan(&i.ID, &i.Title); 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 } ================================================ FILE: internal/endtoend/testdata/join_alias/mysql/query.sql ================================================ -- name: AliasJoin :many SELECT f.id, b.title FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = ?; -- name: AliasExpand :many SELECT * FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = ?; ================================================ FILE: internal/endtoend/testdata/join_alias/mysql/schema.sql ================================================ CREATE TABLE foo (id serial not null); CREATE TABLE bar (id serial not null references foo(id), title text); ================================================ FILE: internal/endtoend/testdata/join_alias/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 Title sql.NullString } type Foo struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const aliasExpand = `-- name: AliasExpand :many SELECT f.id, b.id, title FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = $1 ` type AliasExpandRow struct { ID int32 ID_2 int32 Title sql.NullString } func (q *Queries) AliasExpand(ctx context.Context, id int32) ([]AliasExpandRow, error) { rows, err := q.db.Query(ctx, aliasExpand, id) if err != nil { return nil, err } defer rows.Close() var items []AliasExpandRow for rows.Next() { var i AliasExpandRow if err := rows.Scan(&i.ID, &i.ID_2, &i.Title); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const aliasJoin = `-- name: AliasJoin :many SELECT f.id, b.title FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = $1 ` type AliasJoinRow struct { ID int32 Title sql.NullString } func (q *Queries) AliasJoin(ctx context.Context, id int32) ([]AliasJoinRow, error) { rows, err := q.db.Query(ctx, aliasJoin, id) if err != nil { return nil, err } defer rows.Close() var items []AliasJoinRow for rows.Next() { var i AliasJoinRow if err := rows.Scan(&i.ID, &i.Title); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/pgx/v4/query.sql ================================================ -- name: AliasJoin :many SELECT f.id, b.title FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = $1; -- name: AliasExpand :many SELECT * FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = $1; ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (id serial not null unique); CREATE TABLE bar (id serial not null references foo(id), title text); ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Bar struct { ID int32 Title pgtype.Text } type Foo struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 aliasExpand = `-- name: AliasExpand :many SELECT f.id, b.id, title FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = $1 ` type AliasExpandRow struct { ID int32 ID_2 int32 Title pgtype.Text } func (q *Queries) AliasExpand(ctx context.Context, id int32) ([]AliasExpandRow, error) { rows, err := q.db.Query(ctx, aliasExpand, id) if err != nil { return nil, err } defer rows.Close() var items []AliasExpandRow for rows.Next() { var i AliasExpandRow if err := rows.Scan(&i.ID, &i.ID_2, &i.Title); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const aliasJoin = `-- name: AliasJoin :many SELECT f.id, b.title FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = $1 ` type AliasJoinRow struct { ID int32 Title pgtype.Text } func (q *Queries) AliasJoin(ctx context.Context, id int32) ([]AliasJoinRow, error) { rows, err := q.db.Query(ctx, aliasJoin, id) if err != nil { return nil, err } defer rows.Close() var items []AliasJoinRow for rows.Next() { var i AliasJoinRow if err := rows.Scan(&i.ID, &i.Title); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/pgx/v5/query.sql ================================================ -- name: AliasJoin :many SELECT f.id, b.title FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = $1; -- name: AliasExpand :many SELECT * FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = $1; ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (id serial not null unique); CREATE TABLE bar (id serial not null references foo(id), title text); ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 Title sql.NullString } type Foo struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const aliasExpand = `-- name: AliasExpand :many SELECT f.id, b.id, title FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = $1 ` type AliasExpandRow struct { ID int32 ID_2 int32 Title sql.NullString } func (q *Queries) AliasExpand(ctx context.Context, id int32) ([]AliasExpandRow, error) { rows, err := q.db.QueryContext(ctx, aliasExpand, id) if err != nil { return nil, err } defer rows.Close() var items []AliasExpandRow for rows.Next() { var i AliasExpandRow if err := rows.Scan(&i.ID, &i.ID_2, &i.Title); 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 aliasJoin = `-- name: AliasJoin :many SELECT f.id, b.title FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = $1 ` type AliasJoinRow struct { ID int32 Title sql.NullString } func (q *Queries) AliasJoin(ctx context.Context, id int32) ([]AliasJoinRow, error) { rows, err := q.db.QueryContext(ctx, aliasJoin, id) if err != nil { return nil, err } defer rows.Close() var items []AliasJoinRow for rows.Next() { var i AliasJoinRow if err := rows.Scan(&i.ID, &i.Title); 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 } ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/stdlib/query.sql ================================================ -- name: AliasJoin :many SELECT f.id, b.title FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = $1; -- name: AliasExpand :many SELECT * FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = $1; ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (id serial not null unique); CREATE TABLE bar (id serial not null references foo(id), title text); ================================================ FILE: internal/endtoend/testdata/join_alias/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_alias/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_alias/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int64 Title sql.NullString } type Foo struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/join_alias/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const aliasExpand = `-- name: AliasExpand :many SELECT f.id, b.id, title FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = ? ` type AliasExpandRow struct { ID int64 ID_2 int64 Title sql.NullString } func (q *Queries) AliasExpand(ctx context.Context, id int64) ([]AliasExpandRow, error) { rows, err := q.db.QueryContext(ctx, aliasExpand, id) if err != nil { return nil, err } defer rows.Close() var items []AliasExpandRow for rows.Next() { var i AliasExpandRow if err := rows.Scan(&i.ID, &i.ID_2, &i.Title); 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 aliasJoin = `-- name: AliasJoin :many SELECT f.id, b.title FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = ? ` type AliasJoinRow struct { ID int64 Title sql.NullString } func (q *Queries) AliasJoin(ctx context.Context, id int64) ([]AliasJoinRow, error) { rows, err := q.db.QueryContext(ctx, aliasJoin, id) if err != nil { return nil, err } defer rows.Close() var items []AliasJoinRow for rows.Next() { var i AliasJoinRow if err := rows.Scan(&i.ID, &i.Title); 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 } ================================================ FILE: internal/endtoend/testdata/join_alias/sqlite/query.sql ================================================ -- name: AliasJoin :many SELECT f.id, b.title FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = ?; -- name: AliasExpand :many SELECT * FROM foo f JOIN bar b ON b.id = f.id WHERE f.id = ?; ================================================ FILE: internal/endtoend/testdata/join_alias/sqlite/schema.sql ================================================ CREATE TABLE foo (id integer not null); CREATE TABLE bar (id integer not null references foo(id), title text); ================================================ FILE: internal/endtoend/testdata/join_alias/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_clauses_order/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_clauses_order/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type A struct { ID int64 A string } type B struct { ID int64 B string AID int64 } type C struct { ID int64 C string AID int64 } type D struct { ID int64 D string AID int64 } type E struct { ID int64 E string AID int64 } ================================================ FILE: internal/endtoend/testdata/join_clauses_order/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const testInnerLeft = `-- name: TestInnerLeft :many SELECT a.a, b.b, c.c FROM a INNER JOIN b ON b.a_id = a.id LEFT JOIN c ON c.a_id = a.id ` type TestInnerLeftRow struct { A string B string C sql.NullString } func (q *Queries) TestInnerLeft(ctx context.Context) ([]TestInnerLeftRow, error) { rows, err := q.db.QueryContext(ctx, testInnerLeft) if err != nil { return nil, err } defer rows.Close() var items []TestInnerLeftRow for rows.Next() { var i TestInnerLeftRow if err := rows.Scan(&i.A, &i.B, &i.C); 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 testInnerLeftInnerLeft = `-- name: TestInnerLeftInnerLeft :many SELECT a.a, b.b, c.c, d.d, e.e FROM a INNER JOIN b ON b.a_id = a.id LEFT JOIN c ON c.a_id = a.id INNER JOIN d ON d.a_id = a.id LEFT JOIN e ON e.a_id = a.id ` type TestInnerLeftInnerLeftRow struct { A string B string C sql.NullString D string E sql.NullString } func (q *Queries) TestInnerLeftInnerLeft(ctx context.Context) ([]TestInnerLeftInnerLeftRow, error) { rows, err := q.db.QueryContext(ctx, testInnerLeftInnerLeft) if err != nil { return nil, err } defer rows.Close() var items []TestInnerLeftInnerLeftRow for rows.Next() { var i TestInnerLeftInnerLeftRow if err := rows.Scan( &i.A, &i.B, &i.C, &i.D, &i.E, ); 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 testLeftInner = `-- name: TestLeftInner :many SELECT a.a, b.b, c.c FROM a LEFT JOIN b ON b.a_id = a.id INNER JOIN c ON c.a_id = a.id ` type TestLeftInnerRow struct { A string B sql.NullString C string } func (q *Queries) TestLeftInner(ctx context.Context) ([]TestLeftInnerRow, error) { rows, err := q.db.QueryContext(ctx, testLeftInner) if err != nil { return nil, err } defer rows.Close() var items []TestLeftInnerRow for rows.Next() { var i TestLeftInnerRow if err := rows.Scan(&i.A, &i.B, &i.C); 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 testLeftInnerLeftInner = `-- name: TestLeftInnerLeftInner :many SELECT a.a, b.b, c.c, d.d, e.e FROM a LEFT JOIN b ON b.a_id = a.id INNER JOIN c ON c.a_id = a.id LEFT JOIN d ON d.a_id = a.id INNER JOIN e ON e.a_id = a.id ` type TestLeftInnerLeftInnerRow struct { A string B sql.NullString C string D sql.NullString E string } func (q *Queries) TestLeftInnerLeftInner(ctx context.Context) ([]TestLeftInnerLeftInnerRow, error) { rows, err := q.db.QueryContext(ctx, testLeftInnerLeftInner) if err != nil { return nil, err } defer rows.Close() var items []TestLeftInnerLeftInnerRow for rows.Next() { var i TestLeftInnerLeftInnerRow if err := rows.Scan( &i.A, &i.B, &i.C, &i.D, &i.E, ); 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 } ================================================ FILE: internal/endtoend/testdata/join_clauses_order/postgresql/query.sql ================================================ -- name: TestLeftInner :many SELECT a.a, b.b, c.c FROM a LEFT JOIN b ON b.a_id = a.id INNER JOIN c ON c.a_id = a.id; -- name: TestInnerLeft :many SELECT a.a, b.b, c.c FROM a INNER JOIN b ON b.a_id = a.id LEFT JOIN c ON c.a_id = a.id; -- name: TestLeftInnerLeftInner :many SELECT a.a, b.b, c.c, d.d, e.e FROM a LEFT JOIN b ON b.a_id = a.id INNER JOIN c ON c.a_id = a.id LEFT JOIN d ON d.a_id = a.id INNER JOIN e ON e.a_id = a.id; -- name: TestInnerLeftInnerLeft :many SELECT a.a, b.b, c.c, d.d, e.e FROM a INNER JOIN b ON b.a_id = a.id LEFT JOIN c ON c.a_id = a.id INNER JOIN d ON d.a_id = a.id LEFT JOIN e ON e.a_id = a.id; ================================================ FILE: internal/endtoend/testdata/join_clauses_order/postgresql/schema.sql ================================================ CREATE TABLE a ( id BIGSERIAL PRIMARY KEY, a TEXT NOT NULL ); CREATE TABLE b ( id BIGSERIAL PRIMARY KEY, b TEXT NOT NULL, a_id BIGINT NOT NULL REFERENCES a (id) ); CREATE TABLE c ( id BIGSERIAL PRIMARY KEY, c TEXT NOT NULL, a_id BIGINT NOT NULL REFERENCES a (id) ); CREATE TABLE d ( id BIGSERIAL PRIMARY KEY, d TEXT NOT NULL, a_id BIGINT NOT NULL REFERENCES a (id) ); CREATE TABLE e ( id BIGSERIAL PRIMARY KEY, e TEXT NOT NULL, a_id BIGINT NOT NULL REFERENCES a (id) ); ================================================ FILE: internal/endtoend/testdata/join_clauses_order/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_from/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_from/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Login string } type Foo struct { Email string } ================================================ FILE: internal/endtoend/testdata/join_from/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const multiFrom = `-- name: MultiFrom :many SELECT email FROM bar, foo WHERE login = ? ` func (q *Queries) MultiFrom(ctx context.Context, login string) ([]string, error) { rows, err := q.db.QueryContext(ctx, multiFrom, login) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var email string if err := rows.Scan(&email); err != nil { return nil, err } items = append(items, email) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_from/mysql/query.sql ================================================ -- name: MultiFrom :many SELECT email FROM bar, foo WHERE login = ?; ================================================ FILE: internal/endtoend/testdata/join_from/mysql/schema.sql ================================================ CREATE TABLE foo (email text not null); CREATE TABLE bar (login text not null); ================================================ FILE: internal/endtoend/testdata/join_from/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Login string } type Foo struct { Email string } ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const multiFrom = `-- name: MultiFrom :many SELECT email FROM bar, foo WHERE login = $1 ` func (q *Queries) MultiFrom(ctx context.Context, login string) ([]string, error) { rows, err := q.db.Query(ctx, multiFrom, login) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var email string if err := rows.Scan(&email); err != nil { return nil, err } items = append(items, email) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/pgx/v4/query.sql ================================================ -- name: MultiFrom :many SELECT email FROM bar, foo WHERE login = $1; ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (email text not null); CREATE TABLE bar (login text not null); ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Login string } type Foo struct { Email string } ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const multiFrom = `-- name: MultiFrom :many SELECT email FROM bar, foo WHERE login = $1 ` func (q *Queries) MultiFrom(ctx context.Context, login string) ([]string, error) { rows, err := q.db.Query(ctx, multiFrom, login) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var email string if err := rows.Scan(&email); err != nil { return nil, err } items = append(items, email) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/pgx/v5/query.sql ================================================ -- name: MultiFrom :many SELECT email FROM bar, foo WHERE login = $1; ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (email text not null); CREATE TABLE bar (login text not null); ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Login string } type Foo struct { Email string } ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const multiFrom = `-- name: MultiFrom :many SELECT email FROM bar, foo WHERE login = $1 ` func (q *Queries) MultiFrom(ctx context.Context, login string) ([]string, error) { rows, err := q.db.QueryContext(ctx, multiFrom, login) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var email string if err := rows.Scan(&email); err != nil { return nil, err } items = append(items, email) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/stdlib/query.sql ================================================ -- name: MultiFrom :many SELECT email FROM bar, foo WHERE login = $1; ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (email text not null); CREATE TABLE bar (login text not null); ================================================ FILE: internal/endtoend/testdata/join_from/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_from/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_from/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Login string } type Foo struct { Email string } ================================================ FILE: internal/endtoend/testdata/join_from/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const multiFrom = `-- name: MultiFrom :many SELECT email FROM bar, foo WHERE login = ? ` func (q *Queries) MultiFrom(ctx context.Context, login string) ([]string, error) { rows, err := q.db.QueryContext(ctx, multiFrom, login) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var email string if err := rows.Scan(&email); err != nil { return nil, err } items = append(items, email) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_from/sqlite/query.sql ================================================ -- name: MultiFrom :many SELECT email FROM bar, foo WHERE login = ?; ================================================ FILE: internal/endtoend/testdata/join_from/sqlite/schema.sql ================================================ CREATE TABLE foo (email text not null); CREATE TABLE bar (login text not null); ================================================ FILE: internal/endtoend/testdata/join_from/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_full/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_full/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 } type Foo struct { ID int32 BarID sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/join_full/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const fullJoin = `-- name: FullJoin :many SELECT f.id, f.bar_id, b.id FROM foo f FULL OUTER JOIN bar b ON b.id = f.bar_id WHERE f.id = $1 ` type FullJoinRow struct { ID sql.NullInt32 BarID sql.NullInt32 ID_2 sql.NullInt32 } func (q *Queries) FullJoin(ctx context.Context, id int32) ([]FullJoinRow, error) { rows, err := q.db.QueryContext(ctx, fullJoin, id) if err != nil { return nil, err } defer rows.Close() var items []FullJoinRow for rows.Next() { var i FullJoinRow if err := rows.Scan(&i.ID, &i.BarID, &i.ID_2); 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 } ================================================ FILE: internal/endtoend/testdata/join_full/postgresql/query.sql ================================================ -- name: FullJoin :many SELECT f.id, f.bar_id, b.id FROM foo f FULL OUTER JOIN bar b ON b.id = f.bar_id WHERE f.id = $1; ================================================ FILE: internal/endtoend/testdata/join_full/postgresql/schema.sql ================================================ CREATE TABLE bar (id serial not null unique); CREATE TABLE foo (id serial not null, bar_id int references bar(id)); ================================================ FILE: internal/endtoend/testdata/join_full/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Email string } ================================================ FILE: internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const columnAsGroupBy = `-- name: ColumnAsGroupBy :many SELECT a.email AS id FROM foo a JOIN foo b ON a.email = b.email GROUP BY id ` func (q *Queries) ColumnAsGroupBy(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, columnAsGroupBy) 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 } ================================================ FILE: internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/query.sql ================================================ -- name: ColumnAsGroupBy :many SELECT a.email AS id FROM foo a JOIN foo b ON a.email = b.email GROUP BY id; ================================================ FILE: internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (email text not null); ================================================ FILE: internal/endtoend/testdata/join_group_by_alias/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_inner/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_inner/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Event struct { ID sql.NullInt32 } type HandledEvent struct { LastHandledID sql.NullInt32 Handler sql.NullString } ================================================ FILE: internal/endtoend/testdata/join_inner/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const selectAllJoined = `-- name: SelectAllJoined :many select events.id from events inner join handled_events on events.ID > handled_events.last_handled_id where handled_events.handler = $1 for update of handled_events skip locked ` func (q *Queries) SelectAllJoined(ctx context.Context, handler sql.NullString) ([]sql.NullInt32, error) { rows, err := q.db.QueryContext(ctx, selectAllJoined, handler) if err != nil { return nil, err } defer rows.Close() var items []sql.NullInt32 for rows.Next() { var id sql.NullInt32 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 selectAllJoinedAlias = `-- name: SelectAllJoinedAlias :many select e.id from events e inner join handled_events he on e.ID > he.last_handled_id where he.handler = $1 for update of he skip locked ` func (q *Queries) SelectAllJoinedAlias(ctx context.Context, handler sql.NullString) ([]sql.NullInt32, error) { rows, err := q.db.QueryContext(ctx, selectAllJoinedAlias, handler) if err != nil { return nil, err } defer rows.Close() var items []sql.NullInt32 for rows.Next() { var id sql.NullInt32 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 } ================================================ FILE: internal/endtoend/testdata/join_inner/postgresql/query.sql ================================================ -- name: SelectAllJoinedAlias :many select e.* from events e inner join handled_events he on e.ID > he.last_handled_id where he.handler = $1 for update of he skip locked; -- name: SelectAllJoined :many select events.* from events inner join handled_events on events.ID > handled_events.last_handled_id where handled_events.handler = $1 for update of handled_events skip locked; ================================================ FILE: internal/endtoend/testdata/join_inner/postgresql/schema.sql ================================================ create table events ( ID int ); create table handled_events ( last_handled_id int, handler text ); ================================================ FILE: internal/endtoend/testdata/join_inner/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_left/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_left/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "time" ) type Author struct { ID int32 Name string ParentID sql.NullInt32 } type City struct { CityID int32 MayorID int32 } type Mayor struct { MayorID int32 FullName string } type Medium struct { MediaID int32 MediaCreatedAt time.Time MediaHash string MediaDirectory string MediaAuthorID int32 MediaWidth int32 MediaHeight int32 } type SuperAuthor struct { SuperID int32 SuperName string SuperParentID sql.NullInt32 } type User struct { UserID int32 CityID sql.NullInt32 } type Users2 struct { UserID int32 UserNickname string UserEmail string UserDisplayName string UserPassword sql.NullString UserGoogleID sql.NullString UserAppleID sql.NullString UserBio string UserCreatedAt time.Time UserAvatarID sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/join_left/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "time" ) const allAuthors = `-- name: AllAuthors :many SELECT a.id, a.name, a.parent_id, p.id, p.name, p.parent_id FROM authors a LEFT JOIN authors p ON a.parent_id = p.id ` type AllAuthorsRow struct { ID int32 Name string ParentID sql.NullInt32 ID_2 sql.NullInt32 Name_2 sql.NullString ParentID_2 sql.NullInt32 } func (q *Queries) AllAuthors(ctx context.Context) ([]AllAuthorsRow, error) { rows, err := q.db.QueryContext(ctx, allAuthors) if err != nil { return nil, err } defer rows.Close() var items []AllAuthorsRow for rows.Next() { var i AllAuthorsRow if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.ID_2, &i.Name_2, &i.ParentID_2, ); 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 allAuthorsAliases = `-- name: AllAuthorsAliases :many SELECT a.id, a.name, a.parent_id, p.id, p.name, p.parent_id FROM authors a LEFT JOIN authors p ON a.parent_id = p.id ` type AllAuthorsAliasesRow struct { ID int32 Name string ParentID sql.NullInt32 ID_2 sql.NullInt32 Name_2 sql.NullString ParentID_2 sql.NullInt32 } func (q *Queries) AllAuthorsAliases(ctx context.Context) ([]AllAuthorsAliasesRow, error) { rows, err := q.db.QueryContext(ctx, allAuthorsAliases) if err != nil { return nil, err } defer rows.Close() var items []AllAuthorsAliasesRow for rows.Next() { var i AllAuthorsAliasesRow if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.ID_2, &i.Name_2, &i.ParentID_2, ); 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 allAuthorsAliases2 = `-- name: AllAuthorsAliases2 :many SELECT a.id, a.name, a.parent_id, p.id, p.name, p.parent_id FROM authors a LEFT JOIN authors p ON a.parent_id = p.id ` type AllAuthorsAliases2Row struct { ID int32 Name string ParentID sql.NullInt32 ID_2 sql.NullInt32 Name_2 sql.NullString ParentID_2 sql.NullInt32 } func (q *Queries) AllAuthorsAliases2(ctx context.Context) ([]AllAuthorsAliases2Row, error) { rows, err := q.db.QueryContext(ctx, allAuthorsAliases2) if err != nil { return nil, err } defer rows.Close() var items []AllAuthorsAliases2Row for rows.Next() { var i AllAuthorsAliases2Row if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.ID_2, &i.Name_2, &i.ParentID_2, ); 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 allSuperAuthors = `-- name: AllSuperAuthors :many SELECT id, name, parent_id, super_id, super_name, super_parent_id FROM authors LEFT JOIN super_authors ON authors.parent_id = super_authors.super_id ` type AllSuperAuthorsRow struct { ID int32 Name string ParentID sql.NullInt32 SuperID sql.NullInt32 SuperName sql.NullString SuperParentID sql.NullInt32 } func (q *Queries) AllSuperAuthors(ctx context.Context) ([]AllSuperAuthorsRow, error) { rows, err := q.db.QueryContext(ctx, allSuperAuthors) if err != nil { return nil, err } defer rows.Close() var items []AllSuperAuthorsRow for rows.Next() { var i AllSuperAuthorsRow if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.SuperID, &i.SuperName, &i.SuperParentID, ); 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 allSuperAuthorsAliases = `-- name: AllSuperAuthorsAliases :many SELECT id, name, parent_id, super_id, super_name, super_parent_id FROM authors a LEFT JOIN super_authors sa ON a.parent_id = sa.super_id ` type AllSuperAuthorsAliasesRow struct { ID int32 Name string ParentID sql.NullInt32 SuperID sql.NullInt32 SuperName sql.NullString SuperParentID sql.NullInt32 } func (q *Queries) AllSuperAuthorsAliases(ctx context.Context) ([]AllSuperAuthorsAliasesRow, error) { rows, err := q.db.QueryContext(ctx, allSuperAuthorsAliases) if err != nil { return nil, err } defer rows.Close() var items []AllSuperAuthorsAliasesRow for rows.Next() { var i AllSuperAuthorsAliasesRow if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.SuperID, &i.SuperName, &i.SuperParentID, ); 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 allSuperAuthorsAliases2 = `-- name: AllSuperAuthorsAliases2 :many SELECT a.id, a.name, a.parent_id, sa.super_id, sa.super_name, sa.super_parent_id FROM authors a LEFT JOIN super_authors sa ON a.parent_id = sa.super_id ` type AllSuperAuthorsAliases2Row struct { ID int32 Name string ParentID sql.NullInt32 SuperID sql.NullInt32 SuperName sql.NullString SuperParentID sql.NullInt32 } func (q *Queries) AllSuperAuthorsAliases2(ctx context.Context) ([]AllSuperAuthorsAliases2Row, error) { rows, err := q.db.QueryContext(ctx, allSuperAuthorsAliases2) if err != nil { return nil, err } defer rows.Close() var items []AllSuperAuthorsAliases2Row for rows.Next() { var i AllSuperAuthorsAliases2Row if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.SuperID, &i.SuperName, &i.SuperParentID, ); 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 getMayors = `-- name: GetMayors :many SELECT user_id, mayors.full_name FROM users LEFT JOIN cities USING (city_id) INNER JOIN mayors USING (mayor_id) ` type GetMayorsRow struct { UserID int32 FullName string } func (q *Queries) GetMayors(ctx context.Context) ([]GetMayorsRow, error) { rows, err := q.db.QueryContext(ctx, getMayors) if err != nil { return nil, err } defer rows.Close() var items []GetMayorsRow for rows.Next() { var i GetMayorsRow if err := rows.Scan(&i.UserID, &i.FullName); 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 getMayorsOptional = `-- name: GetMayorsOptional :many SELECT user_id, cities.city_id, mayors.full_name FROM users LEFT JOIN cities USING (city_id) LEFT JOIN mayors USING (mayor_id) ` type GetMayorsOptionalRow struct { UserID int32 CityID sql.NullInt32 FullName sql.NullString } func (q *Queries) GetMayorsOptional(ctx context.Context) ([]GetMayorsOptionalRow, error) { rows, err := q.db.QueryContext(ctx, getMayorsOptional) if err != nil { return nil, err } defer rows.Close() var items []GetMayorsOptionalRow for rows.Next() { var i GetMayorsOptionalRow if err := rows.Scan(&i.UserID, &i.CityID, &i.FullName); 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 getSuggestedUsersByID = `-- name: GetSuggestedUsersByID :many SELECT DISTINCT u.user_id, u.user_nickname, u.user_email, u.user_display_name, u.user_password, u.user_google_id, u.user_apple_id, u.user_bio, u.user_created_at, u.user_avatar_id, m.media_id, m.media_created_at, m.media_hash, m.media_directory, m.media_author_id, m.media_width, m.media_height FROM users_2 u LEFT JOIN media m ON u.user_avatar_id = m.media_id WHERE u.user_id != @user_id ` type GetSuggestedUsersByIDRow struct { UserID int32 UserNickname string UserEmail string UserDisplayName string UserPassword sql.NullString UserGoogleID sql.NullString UserAppleID sql.NullString UserBio string UserCreatedAt time.Time UserAvatarID sql.NullInt32 MediaID sql.NullInt32 MediaCreatedAt sql.NullTime MediaHash sql.NullString MediaDirectory sql.NullString MediaAuthorID sql.NullInt32 MediaWidth sql.NullInt32 MediaHeight sql.NullInt32 } func (q *Queries) GetSuggestedUsersByID(ctx context.Context) ([]GetSuggestedUsersByIDRow, error) { rows, err := q.db.QueryContext(ctx, getSuggestedUsersByID) if err != nil { return nil, err } defer rows.Close() var items []GetSuggestedUsersByIDRow for rows.Next() { var i GetSuggestedUsersByIDRow if err := rows.Scan( &i.UserID, &i.UserNickname, &i.UserEmail, &i.UserDisplayName, &i.UserPassword, &i.UserGoogleID, &i.UserAppleID, &i.UserBio, &i.UserCreatedAt, &i.UserAvatarID, &i.MediaID, &i.MediaCreatedAt, &i.MediaHash, &i.MediaDirectory, &i.MediaAuthorID, &i.MediaWidth, &i.MediaHeight, ); 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 } ================================================ FILE: internal/endtoend/testdata/join_left/mysql/query.sql ================================================ -- name: GetMayors :many SELECT user_id, mayors.full_name FROM users LEFT JOIN cities USING (city_id) INNER JOIN mayors USING (mayor_id); -- name: GetMayorsOptional :many SELECT user_id, cities.city_id, mayors.full_name FROM users LEFT JOIN cities USING (city_id) LEFT JOIN mayors USING (mayor_id); -- name: AllAuthors :many SELECT * FROM authors a LEFT JOIN authors p ON a.parent_id = p.id; -- name: AllAuthorsAliases :many SELECT * FROM authors a LEFT JOIN authors p ON a.parent_id = p.id; -- name: AllAuthorsAliases2 :many SELECT a.*, p.* FROM authors a LEFT JOIN authors p ON a.parent_id = p.id; -- name: AllSuperAuthors :many SELECT * FROM authors LEFT JOIN super_authors ON authors.parent_id = super_authors.super_id; -- name: AllSuperAuthorsAliases :many SELECT * FROM authors a LEFT JOIN super_authors sa ON a.parent_id = sa.super_id; -- name: AllSuperAuthorsAliases2 :many SELECT a.*, sa.* FROM authors a LEFT JOIN super_authors sa ON a.parent_id = sa.super_id; -- name: GetSuggestedUsersByID :many SELECT DISTINCT u.*, m.* FROM users_2 u LEFT JOIN media m ON u.user_avatar_id = m.media_id WHERE u.user_id != @user_id; ================================================ FILE: internal/endtoend/testdata/join_left/mysql/schema.sql ================================================ -- https://github.com/sqlc-dev/sqlc/issues/604 CREATE TABLE users ( user_id INT PRIMARY KEY, city_id INT -- nullable ); CREATE TABLE cities ( city_id INT PRIMARY KEY, mayor_id INT NOT NULL ); CREATE TABLE mayors ( mayor_id INT PRIMARY KEY, full_name TEXT NOT NULL ); -- https://github.com/sqlc-dev/sqlc/issues/1334 CREATE TABLE authors ( id INT PRIMARY KEY, name TEXT NOT NULL, parent_id INT -- nullable ); CREATE TABLE super_authors ( super_id INT PRIMARY KEY, super_name TEXT NOT NULL, super_parent_id INT -- nullable ); -- https://github.com/sqlc-dev/sqlc/issues/1334 CREATE TABLE users_2 ( user_id INT PRIMARY KEY, user_nickname VARCHAR(30) UNIQUE NOT NULL, user_email VARCHAR(20) UNIQUE NOT NULL, user_display_name TEXT NOT NULL, user_password TEXT 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 ); CREATE TABLE media ( media_id INT PRIMARY KEY, media_created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, media_hash TEXT NOT NULL, media_directory TEXT NOT NULL, media_author_id INT NOT NULL, media_width INT NOT NULL, media_height INT NOT NULL ); ALTER TABLE users_2 ADD FOREIGN KEY (user_avatar_id) REFERENCES media(media_id) ON DELETE SET DEFAULT ON UPDATE CASCADE; ================================================ FILE: internal/endtoend/testdata/join_left/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_left/postgresql/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/join_left/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_left/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "time" "github.com/google/uuid" ) type Author struct { ID int32 Name string ParentID sql.NullInt32 } type City struct { CityID int32 MayorID int32 } type Mayor struct { MayorID int32 FullName string } type Medium struct { MediaID uuid.UUID MediaCreatedAt time.Time MediaHash string MediaDirectory string MediaAuthorID uuid.UUID MediaWidth int32 MediaHeight int32 } type SuperAuthor struct { SuperID int32 SuperName string SuperParentID sql.NullInt32 } type User struct { UserID int32 CityID sql.NullInt32 } type Users2 struct { UserID uuid.UUID UserNickname string UserEmail string UserDisplayName string UserPassword sql.NullString UserGoogleID sql.NullString UserAppleID sql.NullString UserBio string UserCreatedAt time.Time UserAvatarID uuid.NullUUID } ================================================ FILE: internal/endtoend/testdata/join_left/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "time" "github.com/google/uuid" ) const allAuthors = `-- name: AllAuthors :many SELECT a.id, a.name, a.parent_id, p.id, p.name, p.parent_id FROM authors a LEFT JOIN authors p ON a.parent_id = p.id ` type AllAuthorsRow struct { ID int32 Name string ParentID sql.NullInt32 ID_2 sql.NullInt32 Name_2 sql.NullString ParentID_2 sql.NullInt32 } func (q *Queries) AllAuthors(ctx context.Context) ([]AllAuthorsRow, error) { rows, err := q.db.QueryContext(ctx, allAuthors) if err != nil { return nil, err } defer rows.Close() var items []AllAuthorsRow for rows.Next() { var i AllAuthorsRow if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.ID_2, &i.Name_2, &i.ParentID_2, ); 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 allAuthorsAliases = `-- name: AllAuthorsAliases :many SELECT a.id, a.name, a.parent_id, p.id, p.name, p.parent_id FROM authors a LEFT JOIN authors p ON a.parent_id = p.id ` type AllAuthorsAliasesRow struct { ID int32 Name string ParentID sql.NullInt32 ID_2 sql.NullInt32 Name_2 sql.NullString ParentID_2 sql.NullInt32 } func (q *Queries) AllAuthorsAliases(ctx context.Context) ([]AllAuthorsAliasesRow, error) { rows, err := q.db.QueryContext(ctx, allAuthorsAliases) if err != nil { return nil, err } defer rows.Close() var items []AllAuthorsAliasesRow for rows.Next() { var i AllAuthorsAliasesRow if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.ID_2, &i.Name_2, &i.ParentID_2, ); 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 allAuthorsAliases2 = `-- name: AllAuthorsAliases2 :many SELECT a.id, a.name, a.parent_id, p.id, p.name, p.parent_id FROM authors a LEFT JOIN authors p ON a.parent_id = p.id ` type AllAuthorsAliases2Row struct { ID int32 Name string ParentID sql.NullInt32 ID_2 sql.NullInt32 Name_2 sql.NullString ParentID_2 sql.NullInt32 } func (q *Queries) AllAuthorsAliases2(ctx context.Context) ([]AllAuthorsAliases2Row, error) { rows, err := q.db.QueryContext(ctx, allAuthorsAliases2) if err != nil { return nil, err } defer rows.Close() var items []AllAuthorsAliases2Row for rows.Next() { var i AllAuthorsAliases2Row if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.ID_2, &i.Name_2, &i.ParentID_2, ); 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 allSuperAuthors = `-- name: AllSuperAuthors :many SELECT id, name, parent_id, super_id, super_name, super_parent_id FROM authors LEFT JOIN super_authors ON authors.parent_id = super_authors.super_id ` type AllSuperAuthorsRow struct { ID int32 Name string ParentID sql.NullInt32 SuperID sql.NullInt32 SuperName sql.NullString SuperParentID sql.NullInt32 } func (q *Queries) AllSuperAuthors(ctx context.Context) ([]AllSuperAuthorsRow, error) { rows, err := q.db.QueryContext(ctx, allSuperAuthors) if err != nil { return nil, err } defer rows.Close() var items []AllSuperAuthorsRow for rows.Next() { var i AllSuperAuthorsRow if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.SuperID, &i.SuperName, &i.SuperParentID, ); 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 allSuperAuthorsAliases = `-- name: AllSuperAuthorsAliases :many SELECT id, name, parent_id, super_id, super_name, super_parent_id FROM authors a LEFT JOIN super_authors sa ON a.parent_id = sa.super_id ` type AllSuperAuthorsAliasesRow struct { ID int32 Name string ParentID sql.NullInt32 SuperID sql.NullInt32 SuperName sql.NullString SuperParentID sql.NullInt32 } func (q *Queries) AllSuperAuthorsAliases(ctx context.Context) ([]AllSuperAuthorsAliasesRow, error) { rows, err := q.db.QueryContext(ctx, allSuperAuthorsAliases) if err != nil { return nil, err } defer rows.Close() var items []AllSuperAuthorsAliasesRow for rows.Next() { var i AllSuperAuthorsAliasesRow if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.SuperID, &i.SuperName, &i.SuperParentID, ); 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 allSuperAuthorsAliases2 = `-- name: AllSuperAuthorsAliases2 :many SELECT a.id, a.name, a.parent_id, sa.super_id, sa.super_name, sa.super_parent_id FROM authors a LEFT JOIN super_authors sa ON a.parent_id = sa.super_id ` type AllSuperAuthorsAliases2Row struct { ID int32 Name string ParentID sql.NullInt32 SuperID sql.NullInt32 SuperName sql.NullString SuperParentID sql.NullInt32 } func (q *Queries) AllSuperAuthorsAliases2(ctx context.Context) ([]AllSuperAuthorsAliases2Row, error) { rows, err := q.db.QueryContext(ctx, allSuperAuthorsAliases2) if err != nil { return nil, err } defer rows.Close() var items []AllSuperAuthorsAliases2Row for rows.Next() { var i AllSuperAuthorsAliases2Row if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.SuperID, &i.SuperName, &i.SuperParentID, ); 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 getMayors = `-- name: GetMayors :many SELECT user_id, mayors.full_name FROM users LEFT JOIN cities USING (city_id) INNER JOIN mayors USING (mayor_id) ` type GetMayorsRow struct { UserID int32 FullName string } func (q *Queries) GetMayors(ctx context.Context) ([]GetMayorsRow, error) { rows, err := q.db.QueryContext(ctx, getMayors) if err != nil { return nil, err } defer rows.Close() var items []GetMayorsRow for rows.Next() { var i GetMayorsRow if err := rows.Scan(&i.UserID, &i.FullName); 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 getMayorsOptional = `-- name: GetMayorsOptional :many SELECT user_id, mayors.full_name FROM users LEFT JOIN cities USING (city_id) LEFT JOIN mayors USING (mayor_id) ` type GetMayorsOptionalRow struct { UserID int32 FullName sql.NullString } func (q *Queries) GetMayorsOptional(ctx context.Context) ([]GetMayorsOptionalRow, error) { rows, err := q.db.QueryContext(ctx, getMayorsOptional) if err != nil { return nil, err } defer rows.Close() var items []GetMayorsOptionalRow for rows.Next() { var i GetMayorsOptionalRow if err := rows.Scan(&i.UserID, &i.FullName); 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 getSuggestedUsersByID = `-- name: GetSuggestedUsersByID :many SELECT DISTINCT u.user_id, u.user_nickname, u.user_email, u.user_display_name, u.user_password, u.user_google_id, u.user_apple_id, u.user_bio, u.user_created_at, u.user_avatar_id, m.media_id, m.media_created_at, m.media_hash, m.media_directory, m.media_author_id, m.media_width, m.media_height FROM users_2 u LEFT JOIN media m ON u.user_avatar_id = m.media_id WHERE u.user_id != $1 LIMIT $2 ` type GetSuggestedUsersByIDParams struct { UserID uuid.UUID UserImit int32 } type GetSuggestedUsersByIDRow struct { UserID uuid.UUID UserNickname string UserEmail string UserDisplayName string UserPassword sql.NullString UserGoogleID sql.NullString UserAppleID sql.NullString UserBio string UserCreatedAt time.Time UserAvatarID uuid.NullUUID MediaID uuid.NullUUID MediaCreatedAt sql.NullTime MediaHash sql.NullString MediaDirectory sql.NullString MediaAuthorID uuid.NullUUID MediaWidth sql.NullInt32 MediaHeight sql.NullInt32 } func (q *Queries) GetSuggestedUsersByID(ctx context.Context, arg GetSuggestedUsersByIDParams) ([]GetSuggestedUsersByIDRow, error) { rows, err := q.db.QueryContext(ctx, getSuggestedUsersByID, arg.UserID, arg.UserImit) if err != nil { return nil, err } defer rows.Close() var items []GetSuggestedUsersByIDRow for rows.Next() { var i GetSuggestedUsersByIDRow if err := rows.Scan( &i.UserID, &i.UserNickname, &i.UserEmail, &i.UserDisplayName, &i.UserPassword, &i.UserGoogleID, &i.UserAppleID, &i.UserBio, &i.UserCreatedAt, &i.UserAvatarID, &i.MediaID, &i.MediaCreatedAt, &i.MediaHash, &i.MediaDirectory, &i.MediaAuthorID, &i.MediaWidth, &i.MediaHeight, ); 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 } ================================================ FILE: internal/endtoend/testdata/join_left/postgresql/query.sql ================================================ -- name: GetMayors :many SELECT user_id, mayors.full_name FROM users LEFT JOIN cities USING (city_id) INNER JOIN mayors USING (mayor_id); -- name: GetMayorsOptional :many SELECT user_id, mayors.full_name FROM users LEFT JOIN cities USING (city_id) LEFT JOIN mayors USING (mayor_id); -- name: AllAuthors :many SELECT * FROM authors a LEFT JOIN authors p ON a.parent_id = p.id; -- name: AllAuthorsAliases :many SELECT * FROM authors a LEFT JOIN authors p ON a.parent_id = p.id; -- name: AllAuthorsAliases2 :many SELECT a.*, p.* FROM authors a LEFT JOIN authors p ON a.parent_id = p.id; -- name: AllSuperAuthors :many SELECT * FROM authors LEFT JOIN super_authors ON authors.parent_id = super_authors.super_id; -- name: AllSuperAuthorsAliases :many SELECT * FROM authors a LEFT JOIN super_authors sa ON a.parent_id = sa.super_id; -- name: AllSuperAuthorsAliases2 :many SELECT a.*, sa.* FROM authors a LEFT JOIN super_authors sa ON a.parent_id = sa.super_id; -- name: GetSuggestedUsersByID :many SELECT DISTINCT u.*, m.* FROM users_2 u LEFT JOIN media m ON u.user_avatar_id = m.media_id WHERE u.user_id != @user_id LIMIT @user_imit; ================================================ FILE: internal/endtoend/testdata/join_left/postgresql/schema.sql ================================================ --- https://github.com/sqlc-dev/sqlc/issues/604 CREATE TABLE users ( user_id INT PRIMARY KEY, city_id INT -- nullable ); CREATE TABLE cities ( city_id INT PRIMARY KEY, mayor_id INT NOT NULL ); CREATE TABLE mayors ( mayor_id INT PRIMARY KEY, full_name TEXT NOT NULL ); -- https://github.com/sqlc-dev/sqlc/issues/1334 CREATE TABLE authors ( id INT PRIMARY KEY, name TEXT NOT NULL, parent_id INT -- nullable ); CREATE TABLE super_authors ( super_id INT PRIMARY KEY, super_name TEXT NOT NULL, super_parent_id INT -- nullable ); -- https://github.com/sqlc-dev/sqlc/issues/1334 CREATE TABLE "users_2" ( "user_id" uuid PRIMARY KEY, "user_nickname" VARCHAR(30) UNIQUE NOT NULL, "user_email" TEXT UNIQUE NOT NULL, "user_display_name" TEXT NOT NULL, "user_password" TEXT NULL, "user_google_id" TEXT UNIQUE NULL, "user_apple_id" TEXT UNIQUE NULL, "user_bio" VARCHAR(160) NOT NULL DEFAULT '', "user_created_at" TIMESTAMP NOT NULL DEFAULT (NOW()), "user_avatar_id" uuid UNIQUE NULL ); CREATE TABLE "media" ( "media_id" uuid PRIMARY KEY, "media_created_at" TIMESTAMP NOT NULL DEFAULT (NOW()), "media_hash" TEXT NOT NULL, "media_directory" TEXT NOT NULL, "media_author_id" uuid NOT NULL, "media_width" INT NOT NULL, "media_height" INT NOT NULL ); ALTER TABLE "users_2" ADD FOREIGN KEY ("user_avatar_id") REFERENCES "media" ("media_id") ON DELETE SET DEFAULT ON UPDATE CASCADE; ================================================ FILE: internal/endtoend/testdata/join_left/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_left/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_left/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "time" ) type Author struct { ID int64 Name string ParentID sql.NullInt64 } type City struct { CityID int64 MayorID int64 } type Mayor struct { MayorID int64 FullName string } type Medium struct { MediaID int64 MediaCreatedAt time.Time MediaHash string MediaDirectory string MediaAuthorID int64 MediaWidth int64 MediaHeight int64 } type SuperAuthor struct { SuperID int64 SuperName string SuperParentID sql.NullInt64 } type User struct { UserID int64 CityID sql.NullInt64 } type Users2 struct { UserID int64 UserNickname string UserEmail string UserDisplayName string UserPassword sql.NullString UserGoogleID sql.NullString UserAppleID sql.NullString UserBio string UserCreatedAt time.Time UserAvatarID sql.NullInt64 } ================================================ FILE: internal/endtoend/testdata/join_left/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "time" ) const allAuthors = `-- name: AllAuthors :many SELECT a.id, a.name, a.parent_id, p.id, p.name, p.parent_id FROM authors AS a LEFT JOIN authors AS p ON a.parent_id = p.id ` type AllAuthorsRow struct { ID int64 Name string ParentID sql.NullInt64 ID_2 sql.NullInt64 Name_2 sql.NullString ParentID_2 sql.NullInt64 } func (q *Queries) AllAuthors(ctx context.Context) ([]AllAuthorsRow, error) { rows, err := q.db.QueryContext(ctx, allAuthors) if err != nil { return nil, err } defer rows.Close() var items []AllAuthorsRow for rows.Next() { var i AllAuthorsRow if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.ID_2, &i.Name_2, &i.ParentID_2, ); 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 allAuthorsAliases = `-- name: AllAuthorsAliases :many SELECT a.id, a.name, a.parent_id, p.id, p.name, p.parent_id FROM authors AS a LEFT JOIN authors AS p ON a.parent_id = p.id ` type AllAuthorsAliasesRow struct { ID int64 Name string ParentID sql.NullInt64 ID_2 sql.NullInt64 Name_2 sql.NullString ParentID_2 sql.NullInt64 } func (q *Queries) AllAuthorsAliases(ctx context.Context) ([]AllAuthorsAliasesRow, error) { rows, err := q.db.QueryContext(ctx, allAuthorsAliases) if err != nil { return nil, err } defer rows.Close() var items []AllAuthorsAliasesRow for rows.Next() { var i AllAuthorsAliasesRow if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.ID_2, &i.Name_2, &i.ParentID_2, ); 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 allAuthorsAliases2 = `-- name: AllAuthorsAliases2 :many SELECT a.id, a.name, a.parent_id, p.id, p.name, p.parent_id FROM authors AS a LEFT JOIN authors AS p ON a.parent_id = p.id ` type AllAuthorsAliases2Row struct { ID int64 Name string ParentID sql.NullInt64 ID_2 sql.NullInt64 Name_2 sql.NullString ParentID_2 sql.NullInt64 } func (q *Queries) AllAuthorsAliases2(ctx context.Context) ([]AllAuthorsAliases2Row, error) { rows, err := q.db.QueryContext(ctx, allAuthorsAliases2) if err != nil { return nil, err } defer rows.Close() var items []AllAuthorsAliases2Row for rows.Next() { var i AllAuthorsAliases2Row if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.ID_2, &i.Name_2, &i.ParentID_2, ); 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 allSuperAuthors = `-- name: AllSuperAuthors :many SELECT id, name, parent_id, super_id, super_name, super_parent_id FROM authors LEFT JOIN super_authors ON authors.parent_id = super_authors.super_id ` type AllSuperAuthorsRow struct { ID int64 Name string ParentID sql.NullInt64 SuperID sql.NullInt64 SuperName sql.NullString SuperParentID sql.NullInt64 } func (q *Queries) AllSuperAuthors(ctx context.Context) ([]AllSuperAuthorsRow, error) { rows, err := q.db.QueryContext(ctx, allSuperAuthors) if err != nil { return nil, err } defer rows.Close() var items []AllSuperAuthorsRow for rows.Next() { var i AllSuperAuthorsRow if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.SuperID, &i.SuperName, &i.SuperParentID, ); 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 allSuperAuthorsAliases = `-- name: AllSuperAuthorsAliases :many SELECT id, name, parent_id, super_id, super_name, super_parent_id FROM authors AS a LEFT JOIN super_authors AS sa ON a.parent_id = sa.super_id ` type AllSuperAuthorsAliasesRow struct { ID int64 Name string ParentID sql.NullInt64 SuperID sql.NullInt64 SuperName sql.NullString SuperParentID sql.NullInt64 } func (q *Queries) AllSuperAuthorsAliases(ctx context.Context) ([]AllSuperAuthorsAliasesRow, error) { rows, err := q.db.QueryContext(ctx, allSuperAuthorsAliases) if err != nil { return nil, err } defer rows.Close() var items []AllSuperAuthorsAliasesRow for rows.Next() { var i AllSuperAuthorsAliasesRow if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.SuperID, &i.SuperName, &i.SuperParentID, ); 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 allSuperAuthorsAliases2 = `-- name: AllSuperAuthorsAliases2 :many SELECT a.id, a.name, a.parent_id, sa.super_id, sa.super_name, sa.super_parent_id FROM authors AS a LEFT JOIN super_authors AS sa ON a.parent_id = sa.super_id ` type AllSuperAuthorsAliases2Row struct { ID int64 Name string ParentID sql.NullInt64 SuperID sql.NullInt64 SuperName sql.NullString SuperParentID sql.NullInt64 } func (q *Queries) AllSuperAuthorsAliases2(ctx context.Context) ([]AllSuperAuthorsAliases2Row, error) { rows, err := q.db.QueryContext(ctx, allSuperAuthorsAliases2) if err != nil { return nil, err } defer rows.Close() var items []AllSuperAuthorsAliases2Row for rows.Next() { var i AllSuperAuthorsAliases2Row if err := rows.Scan( &i.ID, &i.Name, &i.ParentID, &i.SuperID, &i.SuperName, &i.SuperParentID, ); 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 getMayors = `-- name: GetMayors :many SELECT user_id, mayors.full_name FROM users LEFT JOIN cities USING (city_id) INNER JOIN mayors USING (mayor_id) ` type GetMayorsRow struct { UserID int64 FullName string } func (q *Queries) GetMayors(ctx context.Context) ([]GetMayorsRow, error) { rows, err := q.db.QueryContext(ctx, getMayors) if err != nil { return nil, err } defer rows.Close() var items []GetMayorsRow for rows.Next() { var i GetMayorsRow if err := rows.Scan(&i.UserID, &i.FullName); 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 getMayorsOptional = `-- name: GetMayorsOptional :many SELECT user_id, cities.city_id, mayors.full_name FROM users LEFT JOIN cities USING (city_id) LEFT JOIN mayors USING (mayor_id) ` type GetMayorsOptionalRow struct { UserID int64 CityID sql.NullInt64 FullName sql.NullString } func (q *Queries) GetMayorsOptional(ctx context.Context) ([]GetMayorsOptionalRow, error) { rows, err := q.db.QueryContext(ctx, getMayorsOptional) if err != nil { return nil, err } defer rows.Close() var items []GetMayorsOptionalRow for rows.Next() { var i GetMayorsOptionalRow if err := rows.Scan(&i.UserID, &i.CityID, &i.FullName); 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 getSuggestedUsersByID = `-- name: GetSuggestedUsersByID :many SELECT DISTINCT u.user_id, u.user_nickname, u.user_email, u.user_display_name, u.user_password, u.user_google_id, u.user_apple_id, u.user_bio, u.user_created_at, u.user_avatar_id, m.media_id, m.media_created_at, m.media_hash, m.media_directory, m.media_author_id, m.media_width, m.media_height FROM users_2 AS u LEFT JOIN media AS m ON u.user_avatar_id = m.media_id WHERE u.user_id != ?1 ` type GetSuggestedUsersByIDRow struct { UserID int64 UserNickname string UserEmail string UserDisplayName string UserPassword sql.NullString UserGoogleID sql.NullString UserAppleID sql.NullString UserBio string UserCreatedAt time.Time UserAvatarID sql.NullInt64 MediaID sql.NullInt64 MediaCreatedAt sql.NullTime MediaHash sql.NullString MediaDirectory sql.NullString MediaAuthorID sql.NullInt64 MediaWidth sql.NullInt64 MediaHeight sql.NullInt64 } func (q *Queries) GetSuggestedUsersByID(ctx context.Context, userID int64) ([]GetSuggestedUsersByIDRow, error) { rows, err := q.db.QueryContext(ctx, getSuggestedUsersByID, userID) if err != nil { return nil, err } defer rows.Close() var items []GetSuggestedUsersByIDRow for rows.Next() { var i GetSuggestedUsersByIDRow if err := rows.Scan( &i.UserID, &i.UserNickname, &i.UserEmail, &i.UserDisplayName, &i.UserPassword, &i.UserGoogleID, &i.UserAppleID, &i.UserBio, &i.UserCreatedAt, &i.UserAvatarID, &i.MediaID, &i.MediaCreatedAt, &i.MediaHash, &i.MediaDirectory, &i.MediaAuthorID, &i.MediaWidth, &i.MediaHeight, ); 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 getSuggestedUsersByID2 = `-- name: GetSuggestedUsersByID2 :many SELECT users_2.user_id FROM users_2 LEFT JOIN media AS m ON user_avatar_id = m.media_id WHERE user_id != ?1 ` func (q *Queries) GetSuggestedUsersByID2(ctx context.Context, userID int64) ([]int64, error) { rows, err := q.db.QueryContext(ctx, getSuggestedUsersByID2, userID) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var user_id int64 if err := rows.Scan(&user_id); err != nil { return nil, err } items = append(items, user_id) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_left/sqlite/query.sql ================================================ -- name: GetMayors :many SELECT user_id, mayors.full_name FROM users LEFT JOIN cities USING (city_id) INNER JOIN mayors USING (mayor_id); -- name: GetMayorsOptional :many SELECT user_id, cities.city_id, mayors.full_name FROM users LEFT JOIN cities USING (city_id) LEFT JOIN mayors USING (mayor_id); -- name: AllAuthors :many SELECT * FROM authors AS a LEFT JOIN authors AS p ON a.parent_id = p.id; -- name: AllAuthorsAliases :many SELECT * FROM authors AS a LEFT JOIN authors AS p ON a.parent_id = p.id; -- name: AllSuperAuthors :many SELECT * FROM authors LEFT JOIN super_authors ON authors.parent_id = super_authors.super_id; -- name: AllAuthorsAliases2 :many SELECT a.*, p.* FROM authors AS a LEFT JOIN authors AS p ON a.parent_id = p.id; -- name: AllSuperAuthorsAliases :many SELECT * FROM authors AS a LEFT JOIN super_authors AS sa ON a.parent_id = sa.super_id; -- name: AllSuperAuthorsAliases2 :many SELECT a.*, sa.* FROM authors AS a LEFT JOIN super_authors AS sa ON a.parent_id = sa.super_id; -- name: GetSuggestedUsersByID :many SELECT DISTINCT u.*, m.* FROM users_2 AS u LEFT JOIN media AS m ON u.user_avatar_id = m.media_id WHERE u.user_id != @user_id; -- name: GetSuggestedUsersByID2 :many SELECT users_2.user_id FROM users_2 LEFT JOIN media AS m ON user_avatar_id = m.media_id WHERE user_id != @user_id; ================================================ FILE: internal/endtoend/testdata/join_left/sqlite/schema.sql ================================================ -- https://github.com/sqlc-dev/sqlc/issues/604 CREATE TABLE users ( user_id INT PRIMARY KEY, city_id INT -- nullable ); CREATE TABLE cities ( city_id INT PRIMARY KEY, mayor_id INT NOT NULL ); CREATE TABLE mayors ( mayor_id INT PRIMARY KEY, full_name TEXT NOT NULL ); -- https://github.com/sqlc-dev/sqlc/issues/1334 CREATE TABLE authors ( id INT PRIMARY KEY, name TEXT NOT NULL, parent_id INT -- nullable ); CREATE TABLE super_authors ( super_id INT PRIMARY KEY, super_name TEXT NOT NULL, super_parent_id INT -- nullable ); -- https://github.com/sqlc-dev/sqlc/issues/1334 CREATE TABLE users_2 ( user_id INT PRIMARY KEY, user_nickname VARCHAR(30) UNIQUE NOT NULL, user_email TEXT UNIQUE NOT NULL, user_display_name TEXT NOT NULL, user_password TEXT , user_google_id TEXT UNIQUE , user_apple_id TEXT UNIQUE , user_bio VARCHAR(160) NOT NULL DEFAULT '', user_created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, user_avatar_id INT UNIQUE ); CREATE TABLE media ( media_id INT PRIMARY KEY, media_created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, media_hash TEXT NOT NULL, media_directory TEXT NOT NULL, media_author_id INT NOT NULL, media_width INT NOT NULL, media_height INT NOT NULL ); ================================================ FILE: internal/endtoend/testdata/join_left/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_left_same_table/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_left_same_table/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Author struct { ID int32 Name string ParentID sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/join_left_same_table/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const allAuthors = `-- name: AllAuthors :many SELECT a.id, a.name, p.id as alias_id, p.name as alias_name FROM authors a LEFT JOIN authors p ON (authors.parent_id = p.id) ` type AllAuthorsRow struct { ID int32 Name string AliasID sql.NullInt32 AliasName sql.NullString } func (q *Queries) AllAuthors(ctx context.Context) ([]AllAuthorsRow, error) { rows, err := q.db.QueryContext(ctx, allAuthors) if err != nil { return nil, err } defer rows.Close() var items []AllAuthorsRow for rows.Next() { var i AllAuthorsRow if err := rows.Scan( &i.ID, &i.Name, &i.AliasID, &i.AliasName, ); 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 } ================================================ FILE: internal/endtoend/testdata/join_left_same_table/mysql/query.sql ================================================ -- name: AllAuthors :many SELECT a.id, a.name, p.id as alias_id, p.name as alias_name FROM authors a LEFT JOIN authors p ON (authors.parent_id = p.id); ================================================ FILE: internal/endtoend/testdata/join_left_same_table/mysql/schema.sql ================================================ CREATE TABLE authors ( id INT(10) NOT NULL, name VARCHAR(255) NOT NULL, parent_id INT(10), PRIMARY KEY (id) ); ================================================ FILE: internal/endtoend/testdata/join_left_same_table/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_left_same_table/postgres/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_left_same_table/postgres/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Author struct { ID int32 Name string ParentID sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/join_left_same_table/postgres/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const allAuthors = `-- name: AllAuthors :many SELECT a.id, a.name, p.id as alias_id, p.name as alias_name FROM authors a LEFT JOIN authors p USING (parent_id) ` type AllAuthorsRow struct { ID int32 Name string AliasID sql.NullInt32 AliasName sql.NullString } func (q *Queries) AllAuthors(ctx context.Context) ([]AllAuthorsRow, error) { rows, err := q.db.QueryContext(ctx, allAuthors) if err != nil { return nil, err } defer rows.Close() var items []AllAuthorsRow for rows.Next() { var i AllAuthorsRow if err := rows.Scan( &i.ID, &i.Name, &i.AliasID, &i.AliasName, ); 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 } ================================================ FILE: internal/endtoend/testdata/join_left_same_table/postgres/query.sql ================================================ -- name: AllAuthors :many SELECT a.id, a.name, p.id as alias_id, p.name as alias_name FROM authors a LEFT JOIN authors p USING (parent_id); ================================================ FILE: internal/endtoend/testdata/join_left_same_table/postgres/schema.sql ================================================ CREATE TABLE authors ( id INT PRIMARY KEY, name TEXT NOT NULL, parent_id INT -- nullable ); ================================================ FILE: internal/endtoend/testdata/join_left_same_table/postgres/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_left_same_table/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_left_same_table/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Author struct { ID int64 Name string ParentID sql.NullInt64 } ================================================ FILE: internal/endtoend/testdata/join_left_same_table/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const allAuthors = `-- name: AllAuthors :many SELECT a.id, a.name, p.id as alias_id, p.name as alias_name FROM authors AS a LEFT JOIN authors AS p ON (a.parent_id = p.id) ` type AllAuthorsRow struct { ID int64 Name string AliasID sql.NullInt64 AliasName sql.NullString } func (q *Queries) AllAuthors(ctx context.Context) ([]AllAuthorsRow, error) { rows, err := q.db.QueryContext(ctx, allAuthors) if err != nil { return nil, err } defer rows.Close() var items []AllAuthorsRow for rows.Next() { var i AllAuthorsRow if err := rows.Scan( &i.ID, &i.Name, &i.AliasID, &i.AliasName, ); 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 } ================================================ FILE: internal/endtoend/testdata/join_left_same_table/sqlite/query.sql ================================================ -- name: AllAuthors :many SELECT a.id, a.name, p.id as alias_id, p.name as alias_name FROM authors AS a LEFT JOIN authors AS p ON (a.parent_id = p.id); ================================================ FILE: internal/endtoend/testdata/join_left_same_table/sqlite/schema.sql ================================================ CREATE TABLE authors ( id INT NOT NULL PRIMARY KEY, name TEXT NOT NULL, parent_id INT ); ================================================ FILE: internal/endtoend/testdata/join_left_same_table/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_left_table_alias/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1897 ================================================ FILE: internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { FooID int64 Info string } type Foo struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/go/query.sql.go ================================================ // 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 joinBar = `-- name: JoinBar :one SELECT f.id, info FROM foo f LEFT JOIN bar b ON b.foo_id = f.id ` type JoinBarRow struct { ID int64 Info pgtype.Text } func (q *Queries) JoinBar(ctx context.Context) (JoinBarRow, error) { row := q.db.QueryRow(ctx, joinBar) var i JoinBarRow err := row.Scan(&i.ID, &i.Info) return i, err } const joinBarAlias = `-- name: JoinBarAlias :one SELECT f.id, b.info FROM foo f LEFT JOIN bar b ON b.foo_id = f.id ` type JoinBarAliasRow struct { ID int64 Info pgtype.Text } func (q *Queries) JoinBarAlias(ctx context.Context) (JoinBarAliasRow, error) { row := q.db.QueryRow(ctx, joinBarAlias) var i JoinBarAliasRow err := row.Scan(&i.ID, &i.Info) return i, err } ================================================ FILE: internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/query.sql ================================================ -- name: JoinBar :one SELECT f.id, info FROM foo f LEFT JOIN bar b ON b.foo_id = f.id; -- name: JoinBarAlias :one SELECT f.id, b.info FROM foo f LEFT JOIN bar b ON b.foo_id = f.id; ================================================ FILE: internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/schema.sql ================================================ CREATE TABLE foo ( id BIGINT PRIMARY KEY ); CREATE TABLE bar ( foo_id BIGINT NOT NULL, info TEXT NOT NULL ); ================================================ FILE: internal/endtoend/testdata/join_left_table_alias/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/join_order_by/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/2538 ================================================ FILE: internal/endtoend/testdata/join_order_by/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/join_order_by/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_order_by/postgresql/pgx/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/join_order_by/postgresql/pgx/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAuthor = `-- name: GetAuthor :one SELECT a.name FROM authors a JOIN authors b ON a.id = b.id ORDER BY name ` func (q *Queries) GetAuthor(ctx context.Context) (string, error) { row := q.db.QueryRow(ctx, getAuthor) var name string err := row.Scan(&name) return name, err } ================================================ FILE: internal/endtoend/testdata/join_order_by/postgresql/pgx/query.sql ================================================ -- name: GetAuthor :one SELECT a.name FROM authors a JOIN authors b ON a.id = b.id ORDER BY name; ================================================ FILE: internal/endtoend/testdata/join_order_by/postgresql/pgx/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/join_order_by/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Email string } ================================================ FILE: internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const columnAsOrderBy = `-- name: ColumnAsOrderBy :many SELECT a.email AS id FROM foo a JOIN foo b ON a.email = b.email ORDER BY id ` func (q *Queries) ColumnAsOrderBy(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, columnAsOrderBy) 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 } ================================================ FILE: internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/query.sql ================================================ -- name: ColumnAsOrderBy :many SELECT a.email AS id FROM foo a JOIN foo b ON a.email = b.email ORDER BY id; ================================================ FILE: internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (email text not null); ================================================ FILE: internal/endtoend/testdata/join_order_by_alias/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_right/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_right/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 } type Foo struct { ID int32 BarID sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/join_right/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const rightJoin = `-- name: RightJoin :many SELECT f.id, f.bar_id, b.id FROM foo f RIGHT JOIN bar b ON b.id = f.bar_id WHERE f.id = ? ` type RightJoinRow struct { ID sql.NullInt32 BarID sql.NullInt32 ID_2 int32 } 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 } defer rows.Close() var items []RightJoinRow for rows.Next() { var i RightJoinRow if err := rows.Scan(&i.ID, &i.BarID, &i.ID_2); 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 } ================================================ FILE: internal/endtoend/testdata/join_right/mysql/query.sql ================================================ -- name: RightJoin :many SELECT f.id, f.bar_id, b.id FROM foo f RIGHT JOIN bar b ON b.id = f.bar_id WHERE f.id = ?; ================================================ FILE: internal/endtoend/testdata/join_right/mysql/schema.sql ================================================ CREATE TABLE bar ( id integer not null, UNIQUE(id) ); CREATE TABLE foo (id integer not null, bar_id integer references bar(id)); ================================================ FILE: internal/endtoend/testdata/join_right/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_right/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_right/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 } type Foo struct { ID int32 BarID sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/join_right/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const rightJoin = `-- name: RightJoin :many SELECT f.id, f.bar_id, b.id FROM foo f RIGHT JOIN bar b ON b.id = f.bar_id WHERE f.id = $1 ` type RightJoinRow struct { ID sql.NullInt32 BarID sql.NullInt32 ID_2 int32 } 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 } defer rows.Close() var items []RightJoinRow for rows.Next() { var i RightJoinRow if err := rows.Scan(&i.ID, &i.BarID, &i.ID_2); 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 } ================================================ FILE: internal/endtoend/testdata/join_right/postgresql/query.sql ================================================ -- name: RightJoin :many SELECT f.id, f.bar_id, b.id FROM foo f RIGHT JOIN bar b ON b.id = f.bar_id WHERE f.id = $1; ================================================ FILE: internal/endtoend/testdata/join_right/postgresql/schema.sql ================================================ CREATE TABLE bar (id serial not null unique); CREATE TABLE foo (id serial not null, bar_id int references bar(id)); ================================================ FILE: internal/endtoend/testdata/join_right/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_table_name/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_table_name/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 } type Foo struct { ID int32 Bar sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/join_table_name/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const tableName = `-- name: TableName :one SELECT foo.id FROM foo JOIN bar ON foo.bar = bar.id WHERE bar.id = ? AND foo.id = ? ` type TableNameParams struct { ID int32 ID_2 int32 } func (q *Queries) TableName(ctx context.Context, arg TableNameParams) (int32, error) { row := q.db.QueryRowContext(ctx, tableName, arg.ID, arg.ID_2) var id int32 err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/join_table_name/mysql/query.sql ================================================ -- name: TableName :one SELECT foo.id FROM foo JOIN bar ON foo.bar = bar.id WHERE bar.id = ? AND foo.id = ?; ================================================ FILE: internal/endtoend/testdata/join_table_name/mysql/schema.sql ================================================ CREATE TABLE bar ( id integer not null, UNIQUE (id) ); CREATE TABLE foo (id integer not null, bar integer references bar(id)); ================================================ FILE: internal/endtoend/testdata/join_table_name/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 } type Foo struct { ID int32 Bar sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const tableName = `-- name: TableName :one SELECT foo.id FROM foo JOIN bar ON foo.bar = bar.id WHERE bar.id = $1 AND foo.id = $2 ` type TableNameParams struct { ID int32 ID_2 int32 } func (q *Queries) TableName(ctx context.Context, arg TableNameParams) (int32, error) { row := q.db.QueryRow(ctx, tableName, arg.ID, arg.ID_2) var id int32 err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/query.sql ================================================ -- name: TableName :one SELECT foo.id FROM foo JOIN bar ON foo.bar = bar.id WHERE bar.id = $1 AND foo.id = $2; ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE bar (id serial not null); CREATE TABLE foo (id serial not null, bar serial); ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Bar struct { ID int32 } type Foo struct { ID int32 Bar pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const tableName = `-- name: TableName :one SELECT foo.id FROM foo JOIN bar ON foo.bar = bar.id WHERE bar.id = $1 AND foo.id = $2 ` type TableNameParams struct { ID int32 ID_2 int32 } func (q *Queries) TableName(ctx context.Context, arg TableNameParams) (int32, error) { row := q.db.QueryRow(ctx, tableName, arg.ID, arg.ID_2) var id int32 err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/query.sql ================================================ -- name: TableName :one SELECT foo.id FROM foo JOIN bar ON foo.bar = bar.id WHERE bar.id = $1 AND foo.id = $2; ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE bar (id serial not null); CREATE TABLE foo (id serial not null, bar serial); ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 } type Foo struct { ID int32 Bar sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const tableName = `-- name: TableName :one SELECT foo.id FROM foo JOIN bar ON foo.bar = bar.id WHERE bar.id = $1 AND foo.id = $2 ` type TableNameParams struct { ID int32 ID_2 int32 } func (q *Queries) TableName(ctx context.Context, arg TableNameParams) (int32, error) { row := q.db.QueryRowContext(ctx, tableName, arg.ID, arg.ID_2) var id int32 err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/stdlib/query.sql ================================================ -- name: TableName :one SELECT foo.id FROM foo JOIN bar ON foo.bar = bar.id WHERE bar.id = $1 AND foo.id = $2; ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/stdlib/schema.sql ================================================ CREATE TABLE bar (id serial not null); CREATE TABLE foo (id serial not null, bar serial); ================================================ FILE: internal/endtoend/testdata/join_table_name/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_table_name/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_table_name/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int64 } type Foo struct { ID int64 Bar sql.NullInt64 } ================================================ FILE: internal/endtoend/testdata/join_table_name/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const tableName = `-- name: TableName :one SELECT foo.id FROM foo JOIN bar ON foo.bar = bar.id WHERE bar.id = ? AND foo.id = ? ` type TableNameParams struct { ID int64 ID_2 int64 } func (q *Queries) TableName(ctx context.Context, arg TableNameParams) (int64, error) { row := q.db.QueryRowContext(ctx, tableName, arg.ID, arg.ID_2) var id int64 err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/join_table_name/sqlite/query.sql ================================================ -- name: TableName :one SELECT foo.id FROM foo JOIN bar ON foo.bar = bar.id WHERE bar.id = ? AND foo.id = ?; ================================================ FILE: internal/endtoend/testdata/join_table_name/sqlite/schema.sql ================================================ CREATE TABLE bar (id integer not null); CREATE TABLE foo (id integer not null, bar integer references bar(id)); ================================================ FILE: internal/endtoend/testdata/join_table_name/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_two_tables/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_two_tables/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID uint64 } type Baz struct { ID uint64 } type Foo struct { BarID uint64 BazID int32 } ================================================ FILE: internal/endtoend/testdata/join_two_tables/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const twoJoins = `-- name: TwoJoins :many SELECT foo.bar_id, foo.baz_id FROM foo JOIN bar ON bar.id = bar_id JOIN baz ON baz.id = baz_id ` func (q *Queries) TwoJoins(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, twoJoins) 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.BazID); 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 } ================================================ FILE: internal/endtoend/testdata/join_two_tables/mysql/query.sql ================================================ -- name: TwoJoins :many SELECT foo.* FROM foo JOIN bar ON bar.id = bar_id JOIN baz ON baz.id = baz_id; ================================================ FILE: internal/endtoend/testdata/join_two_tables/mysql/schema.sql ================================================ 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); ================================================ FILE: internal/endtoend/testdata/join_two_tables/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } type Baz struct { ID int32 } type Foo struct { BarID int32 BazID int32 } ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const twoJoins = `-- name: TwoJoins :many SELECT foo.bar_id, foo.baz_id FROM foo JOIN bar ON bar.id = bar_id JOIN baz ON baz.id = baz_id ` func (q *Queries) TwoJoins(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, twoJoins) 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.BazID); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/query.sql ================================================ -- name: TwoJoins :many SELECT foo.* FROM foo JOIN bar ON bar.id = bar_id JOIN baz ON baz.id = baz_id; ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar_id serial not null, baz_id serial not null); CREATE TABLE bar (id serial not null); CREATE TABLE baz (id serial not null); ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } type Baz struct { ID int32 } type Foo struct { BarID int32 BazID int32 } ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const twoJoins = `-- name: TwoJoins :many SELECT foo.bar_id, foo.baz_id FROM foo JOIN bar ON bar.id = bar_id JOIN baz ON baz.id = baz_id ` func (q *Queries) TwoJoins(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, twoJoins) 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.BazID); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/query.sql ================================================ -- name: TwoJoins :many SELECT foo.* FROM foo JOIN bar ON bar.id = bar_id JOIN baz ON baz.id = baz_id; ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar_id serial not null, baz_id serial not null); CREATE TABLE bar (id serial not null); CREATE TABLE baz (id serial not null); ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } type Baz struct { ID int32 } type Foo struct { BarID int32 BazID int32 } ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const twoJoins = `-- name: TwoJoins :many SELECT foo.bar_id, foo.baz_id FROM foo JOIN bar ON bar.id = bar_id JOIN baz ON baz.id = baz_id ` func (q *Queries) TwoJoins(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, twoJoins) 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.BazID); 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 } ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/stdlib/query.sql ================================================ -- name: TwoJoins :many SELECT foo.* FROM foo JOIN bar ON bar.id = bar_id JOIN baz ON baz.id = baz_id; ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (bar_id serial not null, baz_id serial not null); CREATE TABLE bar (id serial not null); CREATE TABLE baz (id serial not null); ================================================ FILE: internal/endtoend/testdata/join_two_tables/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_two_tables/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_two_tables/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int64 } type Baz struct { ID int64 } type Foo struct { BarID int64 BazID int64 } ================================================ FILE: internal/endtoend/testdata/join_two_tables/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const twoJoins = `-- name: TwoJoins :many SELECT foo.bar_id, foo.baz_id FROM foo JOIN bar ON bar.id = bar_id JOIN baz ON baz.id = baz_id ` func (q *Queries) TwoJoins(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, twoJoins) 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.BazID); 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 } ================================================ FILE: internal/endtoend/testdata/join_two_tables/sqlite/query.sql ================================================ -- name: TwoJoins :many SELECT foo.* FROM foo JOIN bar ON bar.id = bar_id JOIN baz ON baz.id = baz_id; ================================================ FILE: internal/endtoend/testdata/join_two_tables/sqlite/schema.sql ================================================ CREATE TABLE foo (bar_id integer not null, baz_id integer not null); CREATE TABLE bar (id integer not null); CREATE TABLE baz (id integer not null); ================================================ FILE: internal/endtoend/testdata/join_two_tables/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_update/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1100 ================================================ FILE: internal/endtoend/testdata/join_update/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_update/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type GroupCalcTotal struct { Npn pgtype.Text GroupID pgtype.Text } type NpnExternalMap struct { ID pgtype.Text Npn pgtype.Text } type ProducerGroupAttribute struct { NpnExternalMapID pgtype.Text GroupID pgtype.Text } ================================================ FILE: internal/endtoend/testdata/join_update/postgresql/pgx/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const percentile = `-- name: Percentile :exec UPDATE group_calc_totals gct SET npn = nem.npn FROM producer_group_attribute ga JOIN npn_external_map nem ON ga.npn_external_map_id = nem.id WHERE gct.group_id = ga.group_id ` func (q *Queries) Percentile(ctx context.Context) error { _, err := q.db.Exec(ctx, percentile) return err } ================================================ FILE: internal/endtoend/testdata/join_update/postgresql/pgx/query.sql ================================================ -- name: Percentile :exec UPDATE group_calc_totals gct SET npn = nem.npn FROM producer_group_attribute ga JOIN npn_external_map nem ON ga.npn_external_map_id = nem.id WHERE gct.group_id = ga.group_id; ================================================ FILE: internal/endtoend/testdata/join_update/postgresql/pgx/schema.sql ================================================ CREATE TABLE group_calc_totals ( npn text, group_id text ); CREATE TABLE producer_group_attribute ( npn_external_map_id text, group_id text ); CREATE TABLE npn_external_map ( id text, npn text ); ================================================ FILE: internal/endtoend/testdata/join_update/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/join_using/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1425 ================================================ FILE: internal/endtoend/testdata/join_using/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/join_using/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_using/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type T1 struct { Fk int32 } type T2 struct { Fk int32 } ================================================ FILE: internal/endtoend/testdata/join_using/postgresql/pgx/go/query.sql.go ================================================ // 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 selectJoinUsing = `-- name: SelectJoinUsing :many select t1.fk, sum(t2.fk) from t1 join t2 using (fk) group by fk ` type SelectJoinUsingRow struct { Fk int32 Sum pgtype.Int8 } func (q *Queries) SelectJoinUsing(ctx context.Context) ([]SelectJoinUsingRow, error) { rows, err := q.db.Query(ctx, selectJoinUsing) if err != nil { return nil, err } defer rows.Close() var items []SelectJoinUsingRow for rows.Next() { var i SelectJoinUsingRow if err := rows.Scan(&i.Fk, &i.Sum); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_using/postgresql/pgx/query.sql ================================================ -- name: SelectJoinUsing :many select t1.fk, sum(t2.fk) from t1 join t2 using (fk) group by fk; ================================================ FILE: internal/endtoend/testdata/join_using/postgresql/pgx/schema.sql ================================================ create table t1 ( fk integer not null unique ); create table t2 ( fk integer not null references t1(fk) ); ================================================ FILE: internal/endtoend/testdata/join_using/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/join_validate_columns/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1239 ================================================ FILE: internal/endtoend/testdata/join_validate_columns/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/join_validate_columns/postgresql/pgx/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM authors JOIN books ON authors.id = book.author_id1; ================================================ FILE: internal/endtoend/testdata/join_validate_columns/postgresql/pgx/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL ); CREATE TABLE books ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, author_id BIGSERIAL REFERENCES authors(id) ); ================================================ FILE: internal/endtoend/testdata/join_validate_columns/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/join_validate_columns/postgresql/pgx/stderr.txt ================================================ # package querytest query.sql:2:65: missing FROM-clause entry for table "book" ================================================ FILE: internal/endtoend/testdata/join_where_clause/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_where_clause/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID uint64 Owner string } type Foo struct { Barid uint64 } ================================================ FILE: internal/endtoend/testdata/join_where_clause/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const joinNoConstraints = `-- name: JoinNoConstraints :many SELECT foo.barid FROM foo CROSS JOIN bar WHERE bar.id = ? AND owner = ? ` type JoinNoConstraintsParams struct { ID uint64 Owner string } func (q *Queries) JoinNoConstraints(ctx context.Context, arg JoinNoConstraintsParams) ([]uint64, error) { rows, err := q.db.QueryContext(ctx, joinNoConstraints, arg.ID, arg.Owner) if err != nil { return nil, err } defer rows.Close() var items []uint64 for rows.Next() { var barid uint64 if err := rows.Scan(&barid); err != nil { return nil, err } items = append(items, barid) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const joinParamWhereClause = `-- name: JoinParamWhereClause :many SELECT foo.barid FROM foo JOIN bar ON bar.id = ? WHERE owner = ? ` type JoinParamWhereClauseParams struct { ID uint64 Owner string } func (q *Queries) JoinParamWhereClause(ctx context.Context, arg JoinParamWhereClauseParams) ([]uint64, error) { rows, err := q.db.QueryContext(ctx, joinParamWhereClause, arg.ID, arg.Owner) if err != nil { return nil, err } defer rows.Close() var items []uint64 for rows.Next() { var barid uint64 if err := rows.Scan(&barid); err != nil { return nil, err } items = append(items, barid) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const joinWhereClause = `-- name: JoinWhereClause :many SELECT foo.barid FROM foo JOIN bar ON bar.id = barid WHERE owner = ? ` func (q *Queries) JoinWhereClause(ctx context.Context, owner string) ([]uint64, error) { rows, err := q.db.QueryContext(ctx, joinWhereClause, owner) if err != nil { return nil, err } defer rows.Close() var items []uint64 for rows.Next() { var barid uint64 if err := rows.Scan(&barid); err != nil { return nil, err } items = append(items, barid) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_where_clause/mysql/query.sql ================================================ -- name: JoinWhereClause :many SELECT foo.* FROM foo JOIN bar ON bar.id = barid WHERE owner = ?; -- name: JoinParamWhereClause :many SELECT foo.* FROM foo JOIN bar ON bar.id = ? WHERE owner = ?; -- name: JoinNoConstraints :many SELECT foo.* FROM foo CROSS JOIN bar WHERE bar.id = ? AND owner = ?; ================================================ FILE: internal/endtoend/testdata/join_where_clause/mysql/schema.sql ================================================ CREATE TABLE foo (barid serial not null); CREATE TABLE bar (id serial not null, owner text not null); ================================================ FILE: internal/endtoend/testdata/join_where_clause/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 Owner string } type Foo struct { Barid int32 } ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const joinNoConstraints = `-- name: JoinNoConstraints :many SELECT foo.barid FROM foo CROSS JOIN bar WHERE bar.id = $2 AND owner = $1 ` type JoinNoConstraintsParams struct { Owner string ID int32 } func (q *Queries) JoinNoConstraints(ctx context.Context, arg JoinNoConstraintsParams) ([]int32, error) { rows, err := q.db.Query(ctx, joinNoConstraints, arg.Owner, arg.ID) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var barid int32 if err := rows.Scan(&barid); err != nil { return nil, err } items = append(items, barid) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const joinParamWhereClause = `-- name: JoinParamWhereClause :many SELECT foo.barid FROM foo JOIN bar ON bar.id = $2 WHERE owner = $1 ` type JoinParamWhereClauseParams struct { Owner string ID int32 } func (q *Queries) JoinParamWhereClause(ctx context.Context, arg JoinParamWhereClauseParams) ([]int32, error) { rows, err := q.db.Query(ctx, joinParamWhereClause, arg.Owner, arg.ID) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var barid int32 if err := rows.Scan(&barid); err != nil { return nil, err } items = append(items, barid) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const joinWhereClause = `-- name: JoinWhereClause :many SELECT foo.barid FROM foo JOIN bar ON bar.id = barid WHERE owner = $1 ` func (q *Queries) JoinWhereClause(ctx context.Context, owner string) ([]int32, error) { rows, err := q.db.Query(ctx, joinWhereClause, owner) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var barid int32 if err := rows.Scan(&barid); err != nil { return nil, err } items = append(items, barid) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/query.sql ================================================ -- name: JoinWhereClause :many SELECT foo.* FROM foo JOIN bar ON bar.id = barid WHERE owner = $1; -- name: JoinParamWhereClause :many SELECT foo.* FROM foo JOIN bar ON bar.id = $2 WHERE owner = $1; -- name: JoinNoConstraints :many SELECT foo.* FROM foo CROSS JOIN bar WHERE bar.id = $2 AND owner = $1; ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (barid serial not null); CREATE TABLE bar (id serial not null, owner text not null); ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 Owner string } type Foo struct { Barid int32 } ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const joinNoConstraints = `-- name: JoinNoConstraints :many SELECT foo.barid FROM foo CROSS JOIN bar WHERE bar.id = $2 AND owner = $1 ` type JoinNoConstraintsParams struct { Owner string ID int32 } func (q *Queries) JoinNoConstraints(ctx context.Context, arg JoinNoConstraintsParams) ([]int32, error) { rows, err := q.db.Query(ctx, joinNoConstraints, arg.Owner, arg.ID) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var barid int32 if err := rows.Scan(&barid); err != nil { return nil, err } items = append(items, barid) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const joinParamWhereClause = `-- name: JoinParamWhereClause :many SELECT foo.barid FROM foo JOIN bar ON bar.id = $2 WHERE owner = $1 ` type JoinParamWhereClauseParams struct { Owner string ID int32 } func (q *Queries) JoinParamWhereClause(ctx context.Context, arg JoinParamWhereClauseParams) ([]int32, error) { rows, err := q.db.Query(ctx, joinParamWhereClause, arg.Owner, arg.ID) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var barid int32 if err := rows.Scan(&barid); err != nil { return nil, err } items = append(items, barid) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const joinWhereClause = `-- name: JoinWhereClause :many SELECT foo.barid FROM foo JOIN bar ON bar.id = barid WHERE owner = $1 ` func (q *Queries) JoinWhereClause(ctx context.Context, owner string) ([]int32, error) { rows, err := q.db.Query(ctx, joinWhereClause, owner) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var barid int32 if err := rows.Scan(&barid); err != nil { return nil, err } items = append(items, barid) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/query.sql ================================================ -- name: JoinWhereClause :many SELECT foo.* FROM foo JOIN bar ON bar.id = barid WHERE owner = $1; -- name: JoinParamWhereClause :many SELECT foo.* FROM foo JOIN bar ON bar.id = $2 WHERE owner = $1; -- name: JoinNoConstraints :many SELECT foo.* FROM foo CROSS JOIN bar WHERE bar.id = $2 AND owner = $1; ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (barid serial not null); CREATE TABLE bar (id serial not null, owner text not null); ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 Owner string } type Foo struct { Barid int32 } ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const joinNoConstraints = `-- name: JoinNoConstraints :many SELECT foo.barid FROM foo CROSS JOIN bar WHERE bar.id = $2 AND owner = $1 ` type JoinNoConstraintsParams struct { Owner string ID int32 } func (q *Queries) JoinNoConstraints(ctx context.Context, arg JoinNoConstraintsParams) ([]int32, error) { rows, err := q.db.QueryContext(ctx, joinNoConstraints, arg.Owner, arg.ID) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var barid int32 if err := rows.Scan(&barid); err != nil { return nil, err } items = append(items, barid) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const joinParamWhereClause = `-- name: JoinParamWhereClause :many SELECT foo.barid FROM foo JOIN bar ON bar.id = $2 WHERE owner = $1 ` type JoinParamWhereClauseParams struct { Owner string ID int32 } func (q *Queries) JoinParamWhereClause(ctx context.Context, arg JoinParamWhereClauseParams) ([]int32, error) { rows, err := q.db.QueryContext(ctx, joinParamWhereClause, arg.Owner, arg.ID) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var barid int32 if err := rows.Scan(&barid); err != nil { return nil, err } items = append(items, barid) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const joinWhereClause = `-- name: JoinWhereClause :many SELECT foo.barid FROM foo JOIN bar ON bar.id = barid WHERE owner = $1 ` func (q *Queries) JoinWhereClause(ctx context.Context, owner string) ([]int32, error) { rows, err := q.db.QueryContext(ctx, joinWhereClause, owner) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var barid int32 if err := rows.Scan(&barid); err != nil { return nil, err } items = append(items, barid) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/stdlib/query.sql ================================================ -- name: JoinWhereClause :many SELECT foo.* FROM foo JOIN bar ON bar.id = barid WHERE owner = $1; -- name: JoinParamWhereClause :many SELECT foo.* FROM foo JOIN bar ON bar.id = $2 WHERE owner = $1; -- name: JoinNoConstraints :many SELECT foo.* FROM foo CROSS JOIN bar WHERE bar.id = $2 AND owner = $1; ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (barid serial not null); CREATE TABLE bar (id serial not null, owner text not null); ================================================ FILE: internal/endtoend/testdata/join_where_clause/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/join_where_clause/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/join_where_clause/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int64 Owner string } type Foo struct { Barid int64 } ================================================ FILE: internal/endtoend/testdata/join_where_clause/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const joinNoConstraints = `-- name: JoinNoConstraints :many SELECT foo.barid FROM foo CROSS JOIN bar WHERE bar.id = ? AND owner = ? ` type JoinNoConstraintsParams struct { ID int64 Owner string } func (q *Queries) JoinNoConstraints(ctx context.Context, arg JoinNoConstraintsParams) ([]int64, error) { rows, err := q.db.QueryContext(ctx, joinNoConstraints, arg.ID, arg.Owner) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var barid int64 if err := rows.Scan(&barid); err != nil { return nil, err } items = append(items, barid) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const joinParamWhereClause = `-- name: JoinParamWhereClause :many SELECT foo.barid FROM foo JOIN bar ON bar.id = ? WHERE owner = ? ` type JoinParamWhereClauseParams struct { ID int64 Owner string } func (q *Queries) JoinParamWhereClause(ctx context.Context, arg JoinParamWhereClauseParams) ([]int64, error) { rows, err := q.db.QueryContext(ctx, joinParamWhereClause, arg.ID, arg.Owner) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var barid int64 if err := rows.Scan(&barid); err != nil { return nil, err } items = append(items, barid) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const joinWhereClause = `-- name: JoinWhereClause :many SELECT foo.barid FROM foo JOIN bar ON bar.id = barid WHERE owner = ? ` func (q *Queries) JoinWhereClause(ctx context.Context, owner string) ([]int64, error) { rows, err := q.db.QueryContext(ctx, joinWhereClause, owner) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var barid int64 if err := rows.Scan(&barid); err != nil { return nil, err } items = append(items, barid) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/join_where_clause/sqlite/query.sql ================================================ -- name: JoinWhereClause :many SELECT foo.* FROM foo JOIN bar ON bar.id = barid WHERE owner = ?; -- name: JoinParamWhereClause :many SELECT foo.* FROM foo JOIN bar ON bar.id = ? WHERE owner = ?; -- name: JoinNoConstraints :many SELECT foo.* FROM foo CROSS JOIN bar WHERE bar.id = ? AND owner = ?; ================================================ FILE: internal/endtoend/testdata/join_where_clause/sqlite/schema.sql ================================================ CREATE TABLE foo (barid integer not null); CREATE TABLE bar (id integer not null, owner text not null); ================================================ FILE: internal/endtoend/testdata/join_where_clause/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/json/mysql/go/copyfrom.go ================================================ // 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() } ================================================ FILE: internal/endtoend/testdata/json/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json/mysql/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/json/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // 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 ` func (q *Queries) SelectFoo(ctx context.Context) error { _, err := q.db.ExecContext(ctx, selectFoo) return err } ================================================ FILE: internal/endtoend/testdata/json/mysql/query.sql ================================================ -- name: SelectFoo :exec SELECT * FROM foo; -- name: BulkInsert :copyfrom INSERT INTO foo (a, b) VALUES (?, ?); ================================================ FILE: internal/endtoend/testdata/json/mysql/schema.sql ================================================ CREATE TABLE foo ( a json not null, b json ); ================================================ FILE: internal/endtoend/testdata/json/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "sql_driver": "github.com/go-sql-driver/mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/json/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgtype" ) type Foo struct { A pgtype.JSON B pgtype.JSONB C pgtype.JSON D pgtype.JSONB } ================================================ FILE: internal/endtoend/testdata/json/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) 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 } ================================================ FILE: internal/endtoend/testdata/json/postgresql/pgx/v4/query.sql ================================================ -- name: SelectFoo :exec SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/json/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo ( a json not null, b jsonb not null, c json, d jsonb ); ================================================ FILE: internal/endtoend/testdata/json/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/json/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json/postgresql/pgx/v5/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/json/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) 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 } ================================================ FILE: internal/endtoend/testdata/json/postgresql/pgx/v5/query.sql ================================================ -- name: SelectFoo :exec SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/json/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo ( a json not null, b jsonb not null, c json, d jsonb ); ================================================ FILE: internal/endtoend/testdata/json/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/json/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "encoding/json" "github.com/sqlc-dev/pqtype" ) type Foo struct { A json.RawMessage B json.RawMessage C pqtype.NullRawMessage D pqtype.NullRawMessage } ================================================ FILE: internal/endtoend/testdata/json/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectFoo = `-- name: SelectFoo :exec SELECT a, b, c, d FROM foo ` func (q *Queries) SelectFoo(ctx context.Context) error { _, err := q.db.ExecContext(ctx, selectFoo) return err } ================================================ FILE: internal/endtoend/testdata/json/postgresql/stdlib/query.sql ================================================ -- name: SelectFoo :exec SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/json/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo ( a json not null, b jsonb not null, c json, d jsonb ); ================================================ FILE: internal/endtoend/testdata/json/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/json_array_elements/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/2731 ================================================ FILE: internal/endtoend/testdata/json_array_elements/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type SysAction struct { ID int64 Code string Menu string Title string Resources []byte } ================================================ FILE: internal/endtoend/testdata/json_array_elements/postgresql/pgx/go/query.sql.go ================================================ // 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 getActionCodeByResource = `-- name: GetActionCodeByResource :one SELECT code, arr.item_object ->> 'code' as resource_code FROM sys_actions, jsonb_array_elements(resources) with ordinality arr(item_object, resource) WHERE item_object->>'resource' = $1 LIMIT 1 ` type GetActionCodeByResourceRow struct { Code string ResourceCode pgtype.Text } func (q *Queries) GetActionCodeByResource(ctx context.Context, resource pgtype.Text) (GetActionCodeByResourceRow, error) { row := q.db.QueryRow(ctx, getActionCodeByResource, resource) var i GetActionCodeByResourceRow err := row.Scan(&i.Code, &i.ResourceCode) return i, err } ================================================ FILE: internal/endtoend/testdata/json_array_elements/postgresql/pgx/query.sql ================================================ -- name: GetActionCodeByResource :one SELECT code, arr.item_object ->> 'code' as resource_code FROM sys_actions, jsonb_array_elements(resources) with ordinality arr(item_object, resource) WHERE item_object->>'resource' = sqlc.arg('resource') LIMIT 1; ================================================ FILE: internal/endtoend/testdata/json_array_elements/postgresql/pgx/schema.sql ================================================ CREATE TABLE "sys_actions" ( "id" int8 NOT NULL, "code" varchar(20) NOT NULL, "menu" varchar(255) NOT NULL, "title" varchar(20) NOT NULL, "resources" jsonb, PRIMARY KEY ("id") ); ================================================ FILE: internal/endtoend/testdata/json_array_elements/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/jackc/pgtype" ) const selectJSONBBuildArray = `-- name: SelectJSONBBuildArray :one SELECT jsonb_build_array(), jsonb_build_array(1), jsonb_build_array(1, 2), jsonb_build_array(1, 2, 'foo'), jsonb_build_array(1, 2, 'foo', 4) ` type SelectJSONBBuildArrayRow struct { JsonbBuildArray pgtype.JSONB JsonbBuildArray_2 pgtype.JSONB JsonbBuildArray_3 pgtype.JSONB JsonbBuildArray_4 pgtype.JSONB JsonbBuildArray_5 pgtype.JSONB } func (q *Queries) SelectJSONBBuildArray(ctx context.Context) (SelectJSONBBuildArrayRow, error) { row := q.db.QueryRow(ctx, selectJSONBBuildArray) var i SelectJSONBBuildArrayRow err := row.Scan( &i.JsonbBuildArray, &i.JsonbBuildArray_2, &i.JsonbBuildArray_3, &i.JsonbBuildArray_4, &i.JsonbBuildArray_5, ) return i, err } const selectJSONBBuildObject = `-- name: SelectJSONBBuildObject :one SELECT jsonb_build_object(), jsonb_build_object('foo'), jsonb_build_object('foo', 1), jsonb_build_object('foo', 1, 2), jsonb_build_object('foo', 1, 2, 'bar') ` type SelectJSONBBuildObjectRow struct { JsonbBuildObject pgtype.JSONB JsonbBuildObject_2 pgtype.JSONB JsonbBuildObject_3 pgtype.JSONB JsonbBuildObject_4 pgtype.JSONB JsonbBuildObject_5 pgtype.JSONB } func (q *Queries) SelectJSONBBuildObject(ctx context.Context) (SelectJSONBBuildObjectRow, error) { row := q.db.QueryRow(ctx, selectJSONBBuildObject) var i SelectJSONBBuildObjectRow err := row.Scan( &i.JsonbBuildObject, &i.JsonbBuildObject_2, &i.JsonbBuildObject_3, &i.JsonbBuildObject_4, &i.JsonbBuildObject_5, ) return i, err } const selectJSONBuildArray = `-- name: SelectJSONBuildArray :one SELECT json_build_array(), json_build_array(1), json_build_array(1, 2), json_build_array(1, 2, 'foo'), json_build_array(1, 2, 'foo', 4) ` type SelectJSONBuildArrayRow struct { JsonBuildArray pgtype.JSON JsonBuildArray_2 pgtype.JSON JsonBuildArray_3 pgtype.JSON JsonBuildArray_4 pgtype.JSON JsonBuildArray_5 pgtype.JSON } func (q *Queries) SelectJSONBuildArray(ctx context.Context) (SelectJSONBuildArrayRow, error) { row := q.db.QueryRow(ctx, selectJSONBuildArray) var i SelectJSONBuildArrayRow err := row.Scan( &i.JsonBuildArray, &i.JsonBuildArray_2, &i.JsonBuildArray_3, &i.JsonBuildArray_4, &i.JsonBuildArray_5, ) return i, err } const selectJSONBuildObject = `-- name: SelectJSONBuildObject :one SELECT json_build_object(), json_build_object('foo'), json_build_object('foo', 1), json_build_object('foo', 1, 2), json_build_object('foo', 1, 2, 'bar') ` type SelectJSONBuildObjectRow struct { JsonBuildObject pgtype.JSON JsonBuildObject_2 pgtype.JSON JsonBuildObject_3 pgtype.JSON JsonBuildObject_4 pgtype.JSON JsonBuildObject_5 pgtype.JSON } func (q *Queries) SelectJSONBuildObject(ctx context.Context) (SelectJSONBuildObjectRow, error) { row := q.db.QueryRow(ctx, selectJSONBuildObject) var i SelectJSONBuildObjectRow err := row.Scan( &i.JsonBuildObject, &i.JsonBuildObject_2, &i.JsonBuildObject_3, &i.JsonBuildObject_4, &i.JsonBuildObject_5, ) return i, err } ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/pgx/v4/query.sql ================================================ -- name: SelectJSONBuildObject :one SELECT json_build_object(), json_build_object('foo'), json_build_object('foo', 1), json_build_object('foo', 1, 2), json_build_object('foo', 1, 2, 'bar'); -- name: SelectJSONBuildArray :one SELECT json_build_array(), json_build_array(1), json_build_array(1, 2), json_build_array(1, 2, 'foo'), json_build_array(1, 2, 'foo', 4); -- name: SelectJSONBBuildObject :one SELECT jsonb_build_object(), jsonb_build_object('foo'), jsonb_build_object('foo', 1), jsonb_build_object('foo', 1, 2), jsonb_build_object('foo', 1, 2, 'bar'); -- name: SelectJSONBBuildArray :one SELECT jsonb_build_array(), jsonb_build_array(1), jsonb_build_array(1, 2), jsonb_build_array(1, 2, 'foo'), jsonb_build_array(1, 2, 'foo', 4); ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/pgx/v4/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectJSONBBuildArray = `-- name: SelectJSONBBuildArray :one SELECT jsonb_build_array(), jsonb_build_array(1), jsonb_build_array(1, 2), jsonb_build_array(1, 2, 'foo'), jsonb_build_array(1, 2, 'foo', 4) ` type SelectJSONBBuildArrayRow struct { JsonbBuildArray []byte JsonbBuildArray_2 []byte JsonbBuildArray_3 []byte JsonbBuildArray_4 []byte JsonbBuildArray_5 []byte } func (q *Queries) SelectJSONBBuildArray(ctx context.Context) (SelectJSONBBuildArrayRow, error) { row := q.db.QueryRow(ctx, selectJSONBBuildArray) var i SelectJSONBBuildArrayRow err := row.Scan( &i.JsonbBuildArray, &i.JsonbBuildArray_2, &i.JsonbBuildArray_3, &i.JsonbBuildArray_4, &i.JsonbBuildArray_5, ) return i, err } const selectJSONBBuildObject = `-- name: SelectJSONBBuildObject :one SELECT jsonb_build_object(), jsonb_build_object('foo'), jsonb_build_object('foo', 1), jsonb_build_object('foo', 1, 2), jsonb_build_object('foo', 1, 2, 'bar') ` type SelectJSONBBuildObjectRow struct { JsonbBuildObject []byte JsonbBuildObject_2 []byte JsonbBuildObject_3 []byte JsonbBuildObject_4 []byte JsonbBuildObject_5 []byte } func (q *Queries) SelectJSONBBuildObject(ctx context.Context) (SelectJSONBBuildObjectRow, error) { row := q.db.QueryRow(ctx, selectJSONBBuildObject) var i SelectJSONBBuildObjectRow err := row.Scan( &i.JsonbBuildObject, &i.JsonbBuildObject_2, &i.JsonbBuildObject_3, &i.JsonbBuildObject_4, &i.JsonbBuildObject_5, ) return i, err } const selectJSONBuildArray = `-- name: SelectJSONBuildArray :one SELECT json_build_array(), json_build_array(1), json_build_array(1, 2), json_build_array(1, 2, 'foo'), json_build_array(1, 2, 'foo', 4) ` type SelectJSONBuildArrayRow struct { JsonBuildArray []byte JsonBuildArray_2 []byte JsonBuildArray_3 []byte JsonBuildArray_4 []byte JsonBuildArray_5 []byte } func (q *Queries) SelectJSONBuildArray(ctx context.Context) (SelectJSONBuildArrayRow, error) { row := q.db.QueryRow(ctx, selectJSONBuildArray) var i SelectJSONBuildArrayRow err := row.Scan( &i.JsonBuildArray, &i.JsonBuildArray_2, &i.JsonBuildArray_3, &i.JsonBuildArray_4, &i.JsonBuildArray_5, ) return i, err } const selectJSONBuildObject = `-- name: SelectJSONBuildObject :one SELECT json_build_object(), json_build_object('foo'), json_build_object('foo', 1), json_build_object('foo', 1, 2), json_build_object('foo', 1, 2, 'bar') ` type SelectJSONBuildObjectRow struct { JsonBuildObject []byte JsonBuildObject_2 []byte JsonBuildObject_3 []byte JsonBuildObject_4 []byte JsonBuildObject_5 []byte } func (q *Queries) SelectJSONBuildObject(ctx context.Context) (SelectJSONBuildObjectRow, error) { row := q.db.QueryRow(ctx, selectJSONBuildObject) var i SelectJSONBuildObjectRow err := row.Scan( &i.JsonBuildObject, &i.JsonBuildObject_2, &i.JsonBuildObject_3, &i.JsonBuildObject_4, &i.JsonBuildObject_5, ) return i, err } ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/pgx/v5/query.sql ================================================ -- name: SelectJSONBuildObject :one SELECT json_build_object(), json_build_object('foo'), json_build_object('foo', 1), json_build_object('foo', 1, 2), json_build_object('foo', 1, 2, 'bar'); -- name: SelectJSONBuildArray :one SELECT json_build_array(), json_build_array(1), json_build_array(1, 2), json_build_array(1, 2, 'foo'), json_build_array(1, 2, 'foo', 4); -- name: SelectJSONBBuildObject :one SELECT jsonb_build_object(), jsonb_build_object('foo'), jsonb_build_object('foo', 1), jsonb_build_object('foo', 1, 2), jsonb_build_object('foo', 1, 2, 'bar'); -- name: SelectJSONBBuildArray :one SELECT jsonb_build_array(), jsonb_build_array(1), jsonb_build_array(1, 2), jsonb_build_array(1, 2, 'foo'), jsonb_build_array(1, 2, 'foo', 4); ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/pgx/v5/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "encoding/json" ) const selectJSONBBuildArray = `-- name: SelectJSONBBuildArray :one SELECT jsonb_build_array(), jsonb_build_array(1), jsonb_build_array(1, 2), jsonb_build_array(1, 2, 'foo'), jsonb_build_array(1, 2, 'foo', 4) ` type SelectJSONBBuildArrayRow struct { JsonbBuildArray json.RawMessage JsonbBuildArray_2 json.RawMessage JsonbBuildArray_3 json.RawMessage JsonbBuildArray_4 json.RawMessage JsonbBuildArray_5 json.RawMessage } func (q *Queries) SelectJSONBBuildArray(ctx context.Context) (SelectJSONBBuildArrayRow, error) { row := q.db.QueryRowContext(ctx, selectJSONBBuildArray) var i SelectJSONBBuildArrayRow err := row.Scan( &i.JsonbBuildArray, &i.JsonbBuildArray_2, &i.JsonbBuildArray_3, &i.JsonbBuildArray_4, &i.JsonbBuildArray_5, ) return i, err } const selectJSONBBuildObject = `-- name: SelectJSONBBuildObject :one SELECT jsonb_build_object(), jsonb_build_object('foo'), jsonb_build_object('foo', 1), jsonb_build_object('foo', 1, 2), jsonb_build_object('foo', 1, 2, 'bar') ` type SelectJSONBBuildObjectRow struct { JsonbBuildObject json.RawMessage JsonbBuildObject_2 json.RawMessage JsonbBuildObject_3 json.RawMessage JsonbBuildObject_4 json.RawMessage JsonbBuildObject_5 json.RawMessage } func (q *Queries) SelectJSONBBuildObject(ctx context.Context) (SelectJSONBBuildObjectRow, error) { row := q.db.QueryRowContext(ctx, selectJSONBBuildObject) var i SelectJSONBBuildObjectRow err := row.Scan( &i.JsonbBuildObject, &i.JsonbBuildObject_2, &i.JsonbBuildObject_3, &i.JsonbBuildObject_4, &i.JsonbBuildObject_5, ) return i, err } const selectJSONBuildArray = `-- name: SelectJSONBuildArray :one SELECT json_build_array(), json_build_array(1), json_build_array(1, 2), json_build_array(1, 2, 'foo'), json_build_array(1, 2, 'foo', 4) ` type SelectJSONBuildArrayRow struct { JsonBuildArray json.RawMessage JsonBuildArray_2 json.RawMessage JsonBuildArray_3 json.RawMessage JsonBuildArray_4 json.RawMessage JsonBuildArray_5 json.RawMessage } func (q *Queries) SelectJSONBuildArray(ctx context.Context) (SelectJSONBuildArrayRow, error) { row := q.db.QueryRowContext(ctx, selectJSONBuildArray) var i SelectJSONBuildArrayRow err := row.Scan( &i.JsonBuildArray, &i.JsonBuildArray_2, &i.JsonBuildArray_3, &i.JsonBuildArray_4, &i.JsonBuildArray_5, ) return i, err } const selectJSONBuildObject = `-- name: SelectJSONBuildObject :one SELECT json_build_object(), json_build_object('foo'), json_build_object('foo', 1), json_build_object('foo', 1, 2), json_build_object('foo', 1, 2, 'bar') ` type SelectJSONBuildObjectRow struct { JsonBuildObject json.RawMessage JsonBuildObject_2 json.RawMessage JsonBuildObject_3 json.RawMessage JsonBuildObject_4 json.RawMessage JsonBuildObject_5 json.RawMessage } func (q *Queries) SelectJSONBuildObject(ctx context.Context) (SelectJSONBuildObjectRow, error) { row := q.db.QueryRowContext(ctx, selectJSONBuildObject) var i SelectJSONBuildObjectRow err := row.Scan( &i.JsonBuildObject, &i.JsonBuildObject_2, &i.JsonBuildObject_3, &i.JsonBuildObject_4, &i.JsonBuildObject_5, ) return i, err } ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/stdlib/query.sql ================================================ -- name: SelectJSONBuildObject :one SELECT json_build_object(), json_build_object('foo'), json_build_object('foo', 1), json_build_object('foo', 1, 2), json_build_object('foo', 1, 2, 'bar'); -- name: SelectJSONBuildArray :one SELECT json_build_array(), json_build_array(1), json_build_array(1, 2), json_build_array(1, 2, 'foo'), json_build_array(1, 2, 'foo', 4); -- name: SelectJSONBBuildObject :one SELECT jsonb_build_object(), jsonb_build_object('foo'), jsonb_build_object('foo', 1), jsonb_build_object('foo', 1, 2), jsonb_build_object('foo', 1, 2, 'bar'); -- name: SelectJSONBBuildArray :one SELECT jsonb_build_array(), jsonb_build_array(1), jsonb_build_array(1, 2), jsonb_build_array(1, 2, 'foo'), jsonb_build_array(1, 2, 'foo', 4); ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/stdlib/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/json_build/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/json_param_type/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/743 ================================================ FILE: internal/endtoend/testdata/json_param_type/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/json_param_type/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_param_type/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type User struct { ID int32 Metadata []byte } ================================================ FILE: internal/endtoend/testdata/json_param_type/postgresql/pgx/go/query.sql.go ================================================ // 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 findByAddress = `-- name: FindByAddress :one SELECT id, metadata FROM "user" WHERE "metadata"->>'address1' = $1 LIMIT 1 ` func (q *Queries) FindByAddress(ctx context.Context, metadata pgtype.Text) (User, error) { row := q.db.QueryRow(ctx, findByAddress, metadata) var i User err := row.Scan(&i.ID, &i.Metadata) return i, err } ================================================ FILE: internal/endtoend/testdata/json_param_type/postgresql/pgx/query.sql ================================================ -- name: FindByAddress :one SELECT * FROM "user" WHERE "metadata"->>'address1' = $1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/json_param_type/postgresql/pgx/schema.sql ================================================ CREATE TABLE "user" ( "id" INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, "metadata" JSONB ); ================================================ FILE: internal/endtoend/testdata/json_param_type/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/json_param_type/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_param_type/sqlite/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/json_param_type/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/json_param_type/sqlite/query.sql ================================================ -- name: FindByAddress :one SELECT * FROM "user" WHERE "metadata"->>'address1' = ?1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/json_param_type/sqlite/schema.sql ================================================ CREATE TABLE "user" ( "id" INT, "metadata" TEXT ); ================================================ FILE: internal/endtoend/testdata/json_param_type/sqlite/sqlc.yaml ================================================ version: "2" sql: - engine: "sqlite" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { FirstName sql.NullString `json:"firstName"` LastName sql.NullString `json:"lastName"` Age sql.NullInt16 `json:"age"` } ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan(&i.FirstName, &i.LastName, &i.Age); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE users ( first_name varchar(255), last_name varchar(255), age smallint ); ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "camel" } ] } ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type User struct { FirstName pgtype.Text `json:"firstName"` LastName pgtype.Text `json:"lastName"` Age pgtype.Int2 `json:"age"` } ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan(&i.FirstName, &i.LastName, &i.Age); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE users ( first_name varchar(255), last_name varchar(255), age smallint ); ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "camel" } ] } ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { FirstName sql.NullString `json:"firstName"` LastName sql.NullString `json:"lastName"` Age sql.NullInt16 `json:"age"` } ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan(&i.FirstName, &i.LastName, &i.Age); 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 } ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/schema.sql ================================================ CREATE TABLE users ( first_name varchar(255), last_name varchar(255), age smallint ); ================================================ FILE: internal/endtoend/testdata/json_tags/camel_case/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "camel" } ] } ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { FirstName sql.NullString `json:"FirstName"` LastName sql.NullString `json:"LastName"` Age sql.NullInt16 `json:"Age"` } ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan(&i.FirstName, &i.LastName, &i.Age); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE users ( first_name varchar(255), last_name varchar(255), age smallint ); ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "pascal" } ] } ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type User struct { FirstName pgtype.Text `json:"FirstName"` LastName pgtype.Text `json:"LastName"` Age pgtype.Int2 `json:"Age"` } ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan(&i.FirstName, &i.LastName, &i.Age); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE users ( first_name varchar(255), last_name varchar(255), age smallint ); ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "pascal" } ] } ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { FirstName sql.NullString `json:"FirstName"` LastName sql.NullString `json:"LastName"` Age sql.NullInt16 `json:"Age"` } ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan(&i.FirstName, &i.LastName, &i.Age); 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 } ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/schema.sql ================================================ CREATE TABLE users ( first_name varchar(255), last_name varchar(255), age smallint ); ================================================ FILE: internal/endtoend/testdata/json_tags/pascal_case/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "pascal" } ] } ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { FirstName sql.NullString `json:"first_name"` LastName sql.NullString `json:"last_name"` Age sql.NullInt16 `json:"age"` } ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan(&i.FirstName, &i.LastName, &i.Age); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE users ( first_name varchar(255), last_name varchar(255), age smallint ); ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "snake" } ] } ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type User struct { FirstName pgtype.Text `json:"first_name"` LastName pgtype.Text `json:"last_name"` Age pgtype.Int2 `json:"age"` } ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan(&i.FirstName, &i.LastName, &i.Age); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE users ( first_name varchar(255), last_name varchar(255), age smallint ); ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "snake" } ] } ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { FirstName sql.NullString `json:"first_name"` LastName sql.NullString `json:"last_name"` Age sql.NullInt16 `json:"age"` } ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan(&i.FirstName, &i.LastName, &i.Age); 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 } ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/schema.sql ================================================ CREATE TABLE users ( first_name varchar(255), last_name varchar(255), age smallint ); ================================================ FILE: internal/endtoend/testdata/json_tags/snake_case/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "snake" } ] } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" "database/sql/driver" "fmt" ) type JobPostLocationType string const ( JobPostLocationTypeRemote JobPostLocationType = "remote" JobPostLocationTypeInOffice JobPostLocationType = "in_office" JobPostLocationTypeHybrid JobPostLocationType = "hybrid" ) func (e *JobPostLocationType) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = JobPostLocationType(s) case string: *e = JobPostLocationType(s) default: return fmt.Errorf("unsupported scan type for JobPostLocationType: %T", src) } return nil } type NullJobPostLocationType struct { JobPostLocationType JobPostLocationType `json:"jobPostLocationType"` Valid bool `json:"valid"` // Valid is true if JobPostLocationType is not NULL } // Scan implements the Scanner interface. func (ns *NullJobPostLocationType) Scan(value interface{}) error { if value == nil { ns.JobPostLocationType, ns.Valid = "", false return nil } ns.Valid = true return ns.JobPostLocationType.Scan(value) } // Value implements the driver Valuer interface. func (ns NullJobPostLocationType) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.JobPostLocationType), nil } type Author struct { ID int64 `json:"id"` Type NullJobPostLocationType `json:"type"` Name string `json:"name"` Bio sql.NullString `json:"bio"` } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const getAuthor = `-- name: GetAuthor :one SELECT id, type, 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.Type, &i.Name, &i.Bio, ) return i, err } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/schema.sql ================================================ CREATE TYPE job_post_location_type AS ENUM('remote', 'in_office', 'hybrid'); CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, type job_post_location_type, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/camel_case/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "db", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "camel" } ] } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" "database/sql/driver" "fmt" ) type JobPostLocationType string const ( JobPostLocationTypeRemote JobPostLocationType = "remote" JobPostLocationTypeInOffice JobPostLocationType = "in_office" JobPostLocationTypeHybrid JobPostLocationType = "hybrid" ) func (e *JobPostLocationType) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = JobPostLocationType(s) case string: *e = JobPostLocationType(s) default: return fmt.Errorf("unsupported scan type for JobPostLocationType: %T", src) } return nil } type NullJobPostLocationType struct { JobPostLocationType JobPostLocationType `json:"job_post_location_type"` Valid bool `json:"valid"` // Valid is true if JobPostLocationType is not NULL } // Scan implements the Scanner interface. func (ns *NullJobPostLocationType) Scan(value interface{}) error { if value == nil { ns.JobPostLocationType, ns.Valid = "", false return nil } ns.Valid = true return ns.JobPostLocationType.Scan(value) } // Value implements the driver Valuer interface. func (ns NullJobPostLocationType) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.JobPostLocationType), nil } type Author struct { ID int64 `json:"id"` Type NullJobPostLocationType `json:"type"` Name string `json:"name"` Bio sql.NullString `json:"bio"` } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const getAuthor = `-- name: GetAuthor :one SELECT id, type, 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.Type, &i.Name, &i.Bio, ) return i, err } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/schema.sql ================================================ CREATE TYPE job_post_location_type AS ENUM('remote', 'in_office', 'hybrid'); CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, type job_post_location_type, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/none/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "db", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "none" } ] } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" "database/sql/driver" "fmt" ) type JobPostLocationType string const ( JobPostLocationTypeRemote JobPostLocationType = "remote" JobPostLocationTypeInOffice JobPostLocationType = "in_office" JobPostLocationTypeHybrid JobPostLocationType = "hybrid" ) func (e *JobPostLocationType) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = JobPostLocationType(s) case string: *e = JobPostLocationType(s) default: return fmt.Errorf("unsupported scan type for JobPostLocationType: %T", src) } return nil } type NullJobPostLocationType struct { JobPostLocationType JobPostLocationType `json:"JobPostLocationType"` Valid bool `json:"Valid"` // Valid is true if JobPostLocationType is not NULL } // Scan implements the Scanner interface. func (ns *NullJobPostLocationType) Scan(value interface{}) error { if value == nil { ns.JobPostLocationType, ns.Valid = "", false return nil } ns.Valid = true return ns.JobPostLocationType.Scan(value) } // Value implements the driver Valuer interface. func (ns NullJobPostLocationType) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.JobPostLocationType), nil } type Author struct { ID int64 `json:"ID"` Type NullJobPostLocationType `json:"Type"` Name string `json:"Name"` Bio sql.NullString `json:"Bio"` } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const getAuthor = `-- name: GetAuthor :one SELECT id, type, 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.Type, &i.Name, &i.Bio, ) return i, err } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/schema.sql ================================================ CREATE TYPE job_post_location_type AS ENUM('remote', 'in_office', 'hybrid'); CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, type job_post_location_type, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/pascal_case/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "db", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "pascal" } ] } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" "database/sql/driver" "fmt" ) type JobPostLocationType string const ( JobPostLocationTypeRemote JobPostLocationType = "remote" JobPostLocationTypeInOffice JobPostLocationType = "in_office" JobPostLocationTypeHybrid JobPostLocationType = "hybrid" ) func (e *JobPostLocationType) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = JobPostLocationType(s) case string: *e = JobPostLocationType(s) default: return fmt.Errorf("unsupported scan type for JobPostLocationType: %T", src) } return nil } type NullJobPostLocationType struct { JobPostLocationType JobPostLocationType `json:"job_post_location_type"` Valid bool `json:"valid"` // Valid is true if JobPostLocationType is not NULL } // Scan implements the Scanner interface. func (ns *NullJobPostLocationType) Scan(value interface{}) error { if value == nil { ns.JobPostLocationType, ns.Valid = "", false return nil } ns.Valid = true return ns.JobPostLocationType.Scan(value) } // Value implements the driver Valuer interface. func (ns NullJobPostLocationType) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.JobPostLocationType), nil } type Author struct { ID int64 `json:"id"` Type NullJobPostLocationType `json:"type"` Name string `json:"name"` Bio sql.NullString `json:"bio"` } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const getAuthor = `-- name: GetAuthor :one SELECT id, type, 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.Type, &i.Name, &i.Bio, ) return i, err } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/schema.sql ================================================ CREATE TYPE job_post_location_type AS ENUM('remote', 'in_office', 'hybrid'); CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, type job_post_location_type, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/snake_case/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "db", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "json_tags_case_style": "snake" } ] } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" "database/sql/driver" "fmt" ) type JobPostLocationType string const ( JobPostLocationTypeRemote JobPostLocationType = "remote" JobPostLocationTypeInOffice JobPostLocationType = "in_office" JobPostLocationTypeHybrid JobPostLocationType = "hybrid" ) func (e *JobPostLocationType) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = JobPostLocationType(s) case string: *e = JobPostLocationType(s) default: return fmt.Errorf("unsupported scan type for JobPostLocationType: %T", src) } return nil } type NullJobPostLocationType struct { JobPostLocationType JobPostLocationType `json:"job_post_location_type"` Valid bool `json:"valid"` // Valid is true if JobPostLocationType is not NULL } // Scan implements the Scanner interface. func (ns *NullJobPostLocationType) Scan(value interface{}) error { if value == nil { ns.JobPostLocationType, ns.Valid = "", false return nil } ns.Valid = true return ns.JobPostLocationType.Scan(value) } // Value implements the driver Valuer interface. func (ns NullJobPostLocationType) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.JobPostLocationType), nil } type Author struct { ID int64 `json:"id"` Type NullJobPostLocationType `json:"type"` Name string `json:"name"` Bio sql.NullString `json:"bio"` } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const getAuthor = `-- name: GetAuthor :one SELECT id, type, 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.Type, &i.Name, &i.Bio, ) return i, err } ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/schema.sql ================================================ CREATE TYPE job_post_location_type AS ENUM('remote', 'in_office', 'hybrid'); CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, type job_post_location_type, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/json_tags_null_enum/v2_config/postgresql/stdlib/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "go": { "out": "go", "package": "db", "emit_json_tags": true } } } ] } ================================================ FILE: internal/endtoend/testdata/jsonb/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/jsonb/pgx/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/jsonb/pgx/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/jsonb/pgx/query.sql ================================================ -- name: InsertFoo :exec INSERT INTO foo ( a, b, c, d ) VALUES ( @a, @b, @c, @d ) RETURNING *; -- name: SelectFoo :exec SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/jsonb/pgx/schema.sql ================================================ CREATE TABLE foo ( a json not null, b jsonb not null, c json, d jsonb ); ================================================ FILE: internal/endtoend/testdata/jsonb/pgx/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/jsonb/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/jsonb/sqlite/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/jsonb/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/jsonb/sqlite/query.sql ================================================ -- name: InsertFoo :exec INSERT INTO foo ( a, b, c, d ) VALUES ( @a, @b, @c, @d ) RETURNING *; -- name: SelectFoo :exec SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/jsonb/sqlite/schema.sql ================================================ CREATE TABLE foo ( a json not null, b jsonb not null, c json, d jsonb ); ================================================ FILE: internal/endtoend/testdata/jsonb/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/limit/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/limit/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar bool } ================================================ FILE: internal/endtoend/testdata/limit/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const limitMe = `-- name: LimitMe :exec UPDATE foo SET bar='baz' LIMIT ? ` func (q *Queries) LimitMe(ctx context.Context, limit int32) error { _, err := q.db.ExecContext(ctx, limitMe, limit) return err } const limitMeToo = `-- name: LimitMeToo :exec DELETE FROM foo LIMIT ? ` func (q *Queries) LimitMeToo(ctx context.Context, limit int32) error { _, err := q.db.ExecContext(ctx, limitMeToo, limit) return err } ================================================ FILE: internal/endtoend/testdata/limit/mysql/query.sql ================================================ -- name: LimitMe :exec UPDATE foo SET bar='baz' LIMIT ?; -- name: LimitMeToo :exec DELETE FROM foo LIMIT ?; ================================================ FILE: internal/endtoend/testdata/limit/mysql/schema.sql ================================================ CREATE TABLE foo (bar bool not null); ================================================ FILE: internal/endtoend/testdata/limit/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/limit/pgx/v4/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/limit/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/limit/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar bool } ================================================ FILE: internal/endtoend/testdata/limit/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const limitMe = `-- name: LimitMe :many SELECT bar FROM foo LIMIT $1 ` func (q *Queries) LimitMe(ctx context.Context, limit int32) ([]bool, error) { rows, err := q.db.Query(ctx, limitMe, limit) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var bar bool if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/limit/pgx/v4/query.sql ================================================ -- name: LimitMe :many SELECT bar FROM foo LIMIT $1; ================================================ FILE: internal/endtoend/testdata/limit/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar bool not null); ================================================ FILE: internal/endtoend/testdata/limit/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/limit/pgx/v5/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/limit/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/limit/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar bool } ================================================ FILE: internal/endtoend/testdata/limit/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const limitMe = `-- name: LimitMe :many SELECT bar FROM foo LIMIT $1 ` func (q *Queries) LimitMe(ctx context.Context, limit int32) ([]bool, error) { rows, err := q.db.Query(ctx, limitMe, limit) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var bar bool if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/limit/pgx/v5/query.sql ================================================ -- name: LimitMe :many SELECT bar FROM foo LIMIT $1; ================================================ FILE: internal/endtoend/testdata/limit/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar bool not null); ================================================ FILE: internal/endtoend/testdata/limit/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/limit/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/limit/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar bool } ================================================ FILE: internal/endtoend/testdata/limit/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const limitMe = `-- name: LimitMe :many SELECT bar FROM foo LIMIT ? ` func (q *Queries) LimitMe(ctx context.Context, limit int64) ([]bool, error) { rows, err := q.db.QueryContext(ctx, limitMe, limit) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var bar bool 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 } ================================================ FILE: internal/endtoend/testdata/limit/sqlite/query.sql ================================================ -- name: LimitMe :many SELECT bar FROM foo LIMIT ?; ================================================ FILE: internal/endtoend/testdata/limit/sqlite/schema.sql ================================================ CREATE TABLE foo (bar bool not null); ================================================ FILE: internal/endtoend/testdata/limit/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/limit/stdlib/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/limit/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/limit/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar bool } ================================================ FILE: internal/endtoend/testdata/limit/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const limitMe = `-- name: LimitMe :many SELECT bar FROM foo LIMIT $1 ` func (q *Queries) LimitMe(ctx context.Context, limit int32) ([]bool, error) { rows, err := q.db.QueryContext(ctx, limitMe, limit) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var bar bool 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 } ================================================ FILE: internal/endtoend/testdata/limit/stdlib/query.sql ================================================ -- name: LimitMe :many SELECT bar FROM foo LIMIT $1; ================================================ FILE: internal/endtoend/testdata/limit/stdlib/schema.sql ================================================ CREATE TABLE foo (bar bool not null); ================================================ FILE: internal/endtoend/testdata/limit/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/lower/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/lower/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar string Bat string } ================================================ FILE: internal/endtoend/testdata/lower/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const lower = `-- name: Lower :many SELECT bar FROM foo WHERE bar = $1 AND LOWER(bat) = $2 ` type LowerParams struct { Bar string Bat string } func (q *Queries) Lower(ctx context.Context, arg LowerParams) ([]string, error) { rows, err := q.db.Query(ctx, lower, arg.Bar, arg.Bat) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/lower/pgx/v4/query.sql ================================================ -- name: Lower :many SELECT bar FROM foo WHERE bar = $1 AND LOWER(bat) = $2; ================================================ FILE: internal/endtoend/testdata/lower/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text not null, bat text not null); ================================================ FILE: internal/endtoend/testdata/lower/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/lower/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/lower/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar string Bat string } ================================================ FILE: internal/endtoend/testdata/lower/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const lower = `-- name: Lower :many SELECT bar FROM foo WHERE bar = $1 AND LOWER(bat) = $2 ` type LowerParams struct { Bar string Bat string } func (q *Queries) Lower(ctx context.Context, arg LowerParams) ([]string, error) { rows, err := q.db.Query(ctx, lower, arg.Bar, arg.Bat) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/lower/pgx/v5/query.sql ================================================ -- name: Lower :many SELECT bar FROM foo WHERE bar = $1 AND LOWER(bat) = $2; ================================================ FILE: internal/endtoend/testdata/lower/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text not null, bat text not null); ================================================ FILE: internal/endtoend/testdata/lower/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/lower/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/lower/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar string Bat string } ================================================ FILE: internal/endtoend/testdata/lower/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const lower = `-- name: Lower :many SELECT bar FROM foo WHERE bar = $1 AND LOWER(bat) = $2 ` type LowerParams struct { Bar string Bat string } func (q *Queries) Lower(ctx context.Context, arg LowerParams) ([]string, error) { rows, err := q.db.QueryContext(ctx, lower, arg.Bar, arg.Bat) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string 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 } ================================================ FILE: internal/endtoend/testdata/lower/stdlib/query.sql ================================================ -- name: Lower :many SELECT bar FROM foo WHERE bar = $1 AND LOWER(bat) = $2; ================================================ FILE: internal/endtoend/testdata/lower/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text not null, bat text not null); ================================================ FILE: internal/endtoend/testdata/lower/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/lower_switched_order/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/lower_switched_order/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar string Bat string } ================================================ FILE: internal/endtoend/testdata/lower_switched_order/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const lowerSwitchedOrder = `-- name: LowerSwitchedOrder :many SELECT bar FROM foo WHERE bar = $1 AND bat = LOWER($2) ` type LowerSwitchedOrderParams struct { Bar string Lower string } func (q *Queries) LowerSwitchedOrder(ctx context.Context, arg LowerSwitchedOrderParams) ([]string, error) { rows, err := q.db.Query(ctx, lowerSwitchedOrder, arg.Bar, arg.Lower) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/lower_switched_order/pgx/v4/query.sql ================================================ -- name: LowerSwitchedOrder :many SELECT bar FROM foo WHERE bar = $1 AND bat = LOWER($2); ================================================ FILE: internal/endtoend/testdata/lower_switched_order/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text not null, bat text not null); ================================================ FILE: internal/endtoend/testdata/lower_switched_order/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/lower_switched_order/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/lower_switched_order/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar string Bat string } ================================================ FILE: internal/endtoend/testdata/lower_switched_order/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const lowerSwitchedOrder = `-- name: LowerSwitchedOrder :many SELECT bar FROM foo WHERE bar = $1 AND bat = LOWER($2) ` type LowerSwitchedOrderParams struct { Bar string Lower string } func (q *Queries) LowerSwitchedOrder(ctx context.Context, arg LowerSwitchedOrderParams) ([]string, error) { rows, err := q.db.Query(ctx, lowerSwitchedOrder, arg.Bar, arg.Lower) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/lower_switched_order/pgx/v5/query.sql ================================================ -- name: LowerSwitchedOrder :many SELECT bar FROM foo WHERE bar = $1 AND bat = LOWER($2); ================================================ FILE: internal/endtoend/testdata/lower_switched_order/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text not null, bat text not null); ================================================ FILE: internal/endtoend/testdata/lower_switched_order/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/lower_switched_order/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/lower_switched_order/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar string Bat string } ================================================ FILE: internal/endtoend/testdata/lower_switched_order/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const lowerSwitchedOrder = `-- name: LowerSwitchedOrder :many SELECT bar FROM foo WHERE bar = $1 AND bat = LOWER($2) ` type LowerSwitchedOrderParams struct { Bar string Lower string } func (q *Queries) LowerSwitchedOrder(ctx context.Context, arg LowerSwitchedOrderParams) ([]string, error) { rows, err := q.db.QueryContext(ctx, lowerSwitchedOrder, arg.Bar, arg.Lower) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string 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 } ================================================ FILE: internal/endtoend/testdata/lower_switched_order/stdlib/query.sql ================================================ -- name: LowerSwitchedOrder :many SELECT bar FROM foo WHERE bar = $1 AND bat = LOWER($2); ================================================ FILE: internal/endtoend/testdata/lower_switched_order/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text not null, bat text not null); ================================================ FILE: internal/endtoend/testdata/lower_switched_order/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/models.go ================================================ // 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 Gender sql.NullInt32 } type AuthorsName struct { Name string } ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthors = `-- name: ListAuthors :many SELECT id, name, bio, gender FROM authors ` func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { rows, err := q.db.Query(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan( &i.ID, &i.Name, &i.Bio, &i.Gender, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM authors; ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name TEXT NOT NULL, bio TEXT ); ALTER TABLE authors ADD COLUMN gender INTEGER NULL; CREATE MATERIALIZED VIEW authors_names as SELECT name from authors; ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/models.go ================================================ // 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 Gender pgtype.Int4 } type AuthorsName struct { Name string } ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthors = `-- name: ListAuthors :many SELECT id, name, bio, gender FROM authors ` func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { rows, err := q.db.Query(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan( &i.ID, &i.Name, &i.Bio, &i.Gender, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM authors; ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name TEXT NOT NULL, bio TEXT ); ALTER TABLE authors ADD COLUMN gender INTEGER NULL; CREATE MATERIALIZED VIEW authors_names as SELECT name from authors; ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/models.go ================================================ // 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 Gender sql.NullInt32 } type AuthorsName struct { Name string } ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthors = `-- name: ListAuthors :many SELECT id, name, bio, gender FROM authors ` func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan( &i.ID, &i.Name, &i.Bio, &i.Gender, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/stdlib/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM authors; ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/stdlib/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name TEXT NOT NULL, bio TEXT ); ALTER TABLE authors ADD COLUMN gender INTEGER NULL; CREATE MATERIALIZED VIEW authors_names as SELECT name from authors; ================================================ FILE: internal/endtoend/testdata/materialized_views/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Num int32 } ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const math = `-- name: Math :many SELECT num, num / 1024 as division FROM foo ` type MathRow struct { Num int32 Division int32 } func (q *Queries) Math(ctx context.Context) ([]MathRow, error) { rows, err := q.db.Query(ctx, math) if err != nil { return nil, err } defer rows.Close() var items []MathRow for rows.Next() { var i MathRow if err := rows.Scan(&i.Num, &i.Division); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/pgx/v4/query.sql ================================================ -- name: Math :many SELECT *, num / 1024 as division FROM foo; ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/pgx/v4/schema.sql ================================================ CREATE TABLE foo (num integer not null); ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Num int32 } ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const math = `-- name: Math :many SELECT num, num / 1024 as division FROM foo ` type MathRow struct { Num int32 Division int32 } func (q *Queries) Math(ctx context.Context) ([]MathRow, error) { rows, err := q.db.Query(ctx, math) if err != nil { return nil, err } defer rows.Close() var items []MathRow for rows.Next() { var i MathRow if err := rows.Scan(&i.Num, &i.Division); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/pgx/v5/query.sql ================================================ -- name: Math :many SELECT *, num / 1024 as division FROM foo; ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/pgx/v5/schema.sql ================================================ CREATE TABLE foo (num integer not null); ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Num int32 } ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const math = `-- name: Math :many SELECT num, num / 1024 as division FROM foo ` type MathRow struct { Num int32 Division int32 } func (q *Queries) Math(ctx context.Context) ([]MathRow, error) { rows, err := q.db.QueryContext(ctx, math) if err != nil { return nil, err } defer rows.Close() var items []MathRow for rows.Next() { var i MathRow if err := rows.Scan(&i.Num, &i.Division); 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 } ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/stdlib/query.sql ================================================ -- name: Math :many SELECT *, num / 1024 as division FROM foo; ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/stdlib/schema.sql ================================================ CREATE TABLE foo (num integer not null); ================================================ FILE: internal/endtoend/testdata/mathmatical_operator/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/min_max_date/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1574 ================================================ FILE: internal/endtoend/testdata/min_max_date/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/min_max_date/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/min_max_date/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Activity struct { AccountID int64 EventTime pgtype.Timestamptz } ================================================ FILE: internal/endtoend/testdata/min_max_date/postgresql/pgx/go/query.sql.go ================================================ // 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 activityStats = `-- name: ActivityStats :one SELECT COUNT(*) as NumOfActivities, MIN(event_time) as MinDate, MAX(event_time) as MaxDate FROM activities WHERE account_id = $1 ` type ActivityStatsRow struct { Numofactivities int64 Mindate pgtype.Timestamptz Maxdate pgtype.Timestamptz } func (q *Queries) ActivityStats(ctx context.Context, accountID int64) (ActivityStatsRow, error) { row := q.db.QueryRow(ctx, activityStats, accountID) var i ActivityStatsRow err := row.Scan(&i.Numofactivities, &i.Mindate, &i.Maxdate) return i, err } ================================================ FILE: internal/endtoend/testdata/min_max_date/postgresql/pgx/query.sql ================================================ -- name: ActivityStats :one SELECT COUNT(*) as NumOfActivities, MIN(event_time) as MinDate, MAX(event_time) as MaxDate FROM activities WHERE account_id = $1; ================================================ FILE: internal/endtoend/testdata/min_max_date/postgresql/pgx/schema.sql ================================================ CREATE TABLE activities ( account_id BIGINT NOT NULL, event_time TIMESTAMP WITH TIME ZONE NOT NULL ); ================================================ FILE: internal/endtoend/testdata/min_max_date/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/missing_semicolon/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/missing_semicolon/mysql/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/missing_semicolon/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const setAuthor = `-- name: SetAuthor :exec UPDATE authors SET name = ? WHERE id = ? ` type SetAuthorParams struct { Name string ID int32 } func (q *Queries) SetAuthor(ctx context.Context, arg SetAuthorParams) error { _, err := q.db.ExecContext(ctx, setAuthor, arg.Name, arg.ID) return err } ================================================ FILE: internal/endtoend/testdata/missing_semicolon/mysql/query.sql ================================================ -- name: SetAuthor :exec UPDATE authors SET name = ? WHERE id = ? ================================================ FILE: internal/endtoend/testdata/missing_semicolon/mysql/schema.sql ================================================ -- https://github.com/sqlc-dev/sqlc/issues/1198 CREATE TABLE authors ( id INT PRIMARY KEY, name VARCHAR(255) NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/missing_semicolon/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/missing_semicolon/pgx/v4/query.sql ================================================ -- name: FirstQuery :many SELECT * FROM foo; -- name: SecondQuery :many SELECT * FROM foo WHERE email = $1 ================================================ FILE: internal/endtoend/testdata/missing_semicolon/pgx/v4/schema.sql ================================================ CREATE TABLE foo (email text not null); ================================================ FILE: internal/endtoend/testdata/missing_semicolon/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/missing_semicolon/pgx/v4/stderr.txt ================================================ # package querytest query.sql:5:1: missing semicolon at end of file ================================================ FILE: internal/endtoend/testdata/missing_semicolon/pgx/v5/query.sql ================================================ -- name: FirstQuery :many SELECT * FROM foo; -- name: SecondQuery :many SELECT * FROM foo WHERE email = $1 ================================================ FILE: internal/endtoend/testdata/missing_semicolon/pgx/v5/schema.sql ================================================ CREATE TABLE foo (email text not null); ================================================ FILE: internal/endtoend/testdata/missing_semicolon/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/missing_semicolon/pgx/v5/stderr.txt ================================================ # package querytest query.sql:5:1: missing semicolon at end of file ================================================ FILE: internal/endtoend/testdata/missing_semicolon/stdlib/query.sql ================================================ -- name: FirstQuery :many SELECT * FROM foo; -- name: SecondQuery :many SELECT * FROM foo WHERE email = $1 ================================================ FILE: internal/endtoend/testdata/missing_semicolon/stdlib/schema.sql ================================================ CREATE TABLE foo (email text not null); ================================================ FILE: internal/endtoend/testdata/missing_semicolon/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/missing_semicolon/stdlib/stderr.txt ================================================ # package querytest query.sql:5:1: missing semicolon at end of file ================================================ FILE: internal/endtoend/testdata/mix_param_types/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/mix_param_types/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID uint64 Name string Phone string } ================================================ FILE: internal/endtoend/testdata/mix_param_types/mysql/go/test.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: test.sql package querytest import ( "context" ) const countOne = `-- name: CountOne :one SELECT count(1) FROM bar WHERE id = ? AND name <> ? ` type CountOneParams struct { ID uint64 Name string } func (q *Queries) CountOne(ctx context.Context, arg CountOneParams) (int64, error) { row := q.db.QueryRowContext(ctx, countOne, arg.ID, arg.Name) var count int64 err := row.Scan(&count) return count, err } const countThree = `-- name: CountThree :one SELECT count(1) FROM bar WHERE id > ? AND phone <> ? AND name <> ? ` type CountThreeParams struct { ID uint64 Phone string Name string } func (q *Queries) CountThree(ctx context.Context, arg CountThreeParams) (int64, error) { row := q.db.QueryRowContext(ctx, countThree, arg.ID, arg.Phone, arg.Name) var count int64 err := row.Scan(&count) return count, err } const countTwo = `-- name: CountTwo :one SELECT count(1) FROM bar WHERE id = ? AND name <> ? ` type CountTwoParams struct { ID uint64 Name string } func (q *Queries) CountTwo(ctx context.Context, arg CountTwoParams) (int64, error) { row := q.db.QueryRowContext(ctx, countTwo, arg.ID, arg.Name) var count int64 err := row.Scan(&count) return count, err } ================================================ FILE: internal/endtoend/testdata/mix_param_types/mysql/schema.sql ================================================ CREATE TABLE bar ( id serial not null, name text not null, phone text not null ); ================================================ FILE: internal/endtoend/testdata/mix_param_types/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "test.sql", "engine": "mysql" } ] } ================================================ FILE: internal/endtoend/testdata/mix_param_types/mysql/test.sql ================================================ -- name: CountOne :one SELECT count(1) FROM bar WHERE id = sqlc.arg(id) AND name <> ?; -- name: CountTwo :one SELECT count(1) FROM bar WHERE id = ? AND name <> sqlc.arg(name); -- name: CountThree :one SELECT count(1) FROM bar WHERE id > ? AND phone <> sqlc.arg(phone) AND name <> ?; ================================================ FILE: internal/endtoend/testdata/mix_param_types/postgresql/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/mix_param_types/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/mix_param_types/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 Name string Phone string } ================================================ FILE: internal/endtoend/testdata/mix_param_types/postgresql/go/test.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: test.sql package querytest import ( "context" ) const countOne = `-- name: CountOne :one SELECT count(1) FROM bar WHERE id = $2 AND name <> $1 LIMIT $3 ` type CountOneParams struct { Name string ID int32 Limit int32 } func (q *Queries) CountOne(ctx context.Context, arg CountOneParams) (int64, error) { row := q.db.QueryRowContext(ctx, countOne, arg.Name, arg.ID, arg.Limit) var count int64 err := row.Scan(&count) return count, err } const countThree = `-- name: CountThree :one SELECT count(1) FROM bar WHERE id > $2 AND phone <> $3 AND name <> $1 ` type CountThreeParams struct { Name string ID int32 Phone string } func (q *Queries) CountThree(ctx context.Context, arg CountThreeParams) (int64, error) { row := q.db.QueryRowContext(ctx, countThree, arg.Name, arg.ID, arg.Phone) var count int64 err := row.Scan(&count) return count, err } const countTwo = `-- name: CountTwo :one SELECT count(1) FROM bar WHERE id = $1 AND name <> $2 ` type CountTwoParams struct { ID int32 Name string } func (q *Queries) CountTwo(ctx context.Context, arg CountTwoParams) (int64, error) { row := q.db.QueryRowContext(ctx, countTwo, arg.ID, arg.Name) var count int64 err := row.Scan(&count) return count, err } ================================================ FILE: internal/endtoend/testdata/mix_param_types/postgresql/schema.sql ================================================ CREATE TABLE bar ( id serial not null, name text not null, phone text not null ); ================================================ FILE: internal/endtoend/testdata/mix_param_types/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "test.sql", "engine": "postgresql" } ] } ================================================ FILE: internal/endtoend/testdata/mix_param_types/postgresql/test.sql ================================================ -- name: CountOne :one SELECT count(1) FROM bar WHERE id = sqlc.arg(id) AND name <> $1 LIMIT sqlc.arg('limit'); -- name: CountTwo :one SELECT count(1) FROM bar WHERE id = $1 AND name <> sqlc.arg(name); -- name: CountThree :one SELECT count(1) FROM bar WHERE id > $2 AND phone <> sqlc.arg(phone) AND name <> $1; ================================================ FILE: internal/endtoend/testdata/multidimension_array/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/multidimension_array/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Tags [][]string } ================================================ FILE: internal/endtoend/testdata/multidimension_array/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const textArray = `-- name: TextArray :many SELECT tags FROM bar ` func (q *Queries) TextArray(ctx context.Context) ([][][]string, error) { rows, err := q.db.Query(ctx, textArray) if err != nil { return nil, err } defer rows.Close() var items [][][]string for rows.Next() { var tags [][]string if err := rows.Scan(&tags); err != nil { return nil, err } items = append(items, tags) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/multidimension_array/pgx/v4/query.sql ================================================ -- name: TextArray :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/multidimension_array/pgx/v4/schema.sql ================================================ CREATE TABLE bar (tags text[][] not null); ================================================ FILE: internal/endtoend/testdata/multidimension_array/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/multidimension_array/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/multidimension_array/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Tags [][]string } ================================================ FILE: internal/endtoend/testdata/multidimension_array/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const textArray = `-- name: TextArray :many SELECT tags FROM bar ` func (q *Queries) TextArray(ctx context.Context) ([][][]string, error) { rows, err := q.db.Query(ctx, textArray) if err != nil { return nil, err } defer rows.Close() var items [][][]string for rows.Next() { var tags [][]string if err := rows.Scan(&tags); err != nil { return nil, err } items = append(items, tags) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/multidimension_array/pgx/v5/query.sql ================================================ -- name: TextArray :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/multidimension_array/pgx/v5/schema.sql ================================================ CREATE TABLE bar (tags text[][] not null); ================================================ FILE: internal/endtoend/testdata/multidimension_array/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/multidimension_array/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/multidimension_array/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { Tags [][]string } ================================================ FILE: internal/endtoend/testdata/multidimension_array/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/lib/pq" ) const textArray = `-- name: TextArray :many SELECT tags FROM bar ` func (q *Queries) TextArray(ctx context.Context) ([][][]string, error) { rows, err := q.db.QueryContext(ctx, textArray) if err != nil { return nil, err } defer rows.Close() var items [][][]string for rows.Next() { var tags [][]string if err := rows.Scan(pq.Array(&tags)); err != nil { return nil, err } items = append(items, tags) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/multidimension_array/stdlib/query.sql ================================================ -- name: TextArray :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/multidimension_array/stdlib/schema.sql ================================================ CREATE TABLE bar (tags text[][] not null); ================================================ FILE: internal/endtoend/testdata/multidimension_array/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/multischema/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/multischema/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 } type Foo struct { ID int32 Bar sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/multischema/pgx/v4/go/query.sql.go ================================================ // 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 bar ` func (q *Queries) ListBar(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(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.Err(); err != nil { return nil, err } return items, nil } const listFoo = `-- name: ListFoo :many SELECT id, bar FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.ID, &i.Bar); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/multischema/pgx/v4/query.sql ================================================ CREATE TABLE bar (id serial not null); CREATE TABLE foo (id serial not null, bar serial); -- name: ListBar :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/multischema/pgx/v4/sql/ignore.txt ================================================ Hello! This file should be ignored ================================================ FILE: internal/endtoend/testdata/multischema/pgx/v4/sql/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/multischema/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": [ "query.sql", "sql" ], "queries": [ "query.sql", "sql" ] } ] } ================================================ FILE: internal/endtoend/testdata/multischema/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/multischema/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Bar struct { ID int32 } type Foo struct { ID int32 Bar pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/multischema/pgx/v5/go/query.sql.go ================================================ // 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 bar ` func (q *Queries) ListBar(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(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.Err(); err != nil { return nil, err } return items, nil } const listFoo = `-- name: ListFoo :many SELECT id, bar FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.ID, &i.Bar); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/multischema/pgx/v5/query.sql ================================================ CREATE TABLE bar (id serial not null); CREATE TABLE foo (id serial not null, bar serial); -- name: ListBar :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/multischema/pgx/v5/sql/ignore.txt ================================================ Hello! This file should be ignored ================================================ FILE: internal/endtoend/testdata/multischema/pgx/v5/sql/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/multischema/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": [ "query.sql", "sql" ], "queries": [ "query.sql", "sql" ] } ] } ================================================ FILE: internal/endtoend/testdata/multischema/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/multischema/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 } type Foo struct { ID int32 Bar sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/multischema/stdlib/go/query.sql.go ================================================ // 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 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 listFoo = `-- name: ListFoo :many SELECT id, bar FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.ID, &i.Bar); 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 } ================================================ FILE: internal/endtoend/testdata/multischema/stdlib/query.sql ================================================ CREATE TABLE bar (id serial not null); CREATE TABLE foo (id serial not null, bar serial); -- name: ListBar :many SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/multischema/stdlib/sql/ignore.txt ================================================ Hello! This file should be ignored ================================================ FILE: internal/endtoend/testdata/multischema/stdlib/sql/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/multischema/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": [ "query.sql", "sql" ], "queries": [ "query.sql", "sql" ] } ] } ================================================ FILE: internal/endtoend/testdata/mysql_default_value/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/mysql_default_value/mysql/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/mysql_default_value/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/mysql_default_value/mysql/query.sql ================================================ -- name: SelectAuthor :many SELECT * FROM authors; ================================================ FILE: internal/endtoend/testdata/mysql_default_value/mysql/schema.sql ================================================ 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 (''); ================================================ FILE: internal/endtoend/testdata/mysql_default_value/mysql/sqlc.json ================================================ { "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" } ] } ================================================ FILE: internal/endtoend/testdata/mysql_reference_manual/README.md ================================================ All queries and examples in this directory come from the [MySQL Reference Manual](https://dev.mysql.com/doc/refman/8.0/en/). ================================================ FILE: internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package aggregate_functions 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, } } ================================================ FILE: internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/go/group_concat.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: group_concat.sql package aggregate_functions import ( "context" "database/sql" ) const groupConcat = `-- name: GroupConcat :many SELECT student_name, GROUP_CONCAT(test_score) FROM student GROUP BY student_name ` type GroupConcatRow struct { StudentName sql.NullString GroupConcat sql.NullString } func (q *Queries) GroupConcat(ctx context.Context) ([]GroupConcatRow, error) { rows, err := q.db.QueryContext(ctx, groupConcat) if err != nil { return nil, err } defer rows.Close() var items []GroupConcatRow for rows.Next() { var i GroupConcatRow if err := rows.Scan(&i.StudentName, &i.GroupConcat); 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 groupConcatOrderBy = `-- name: GroupConcatOrderBy :many SELECT student_name, GROUP_CONCAT(DISTINCT test_score ORDER BY test_score DESC SEPARATOR ' ') FROM student GROUP BY student_name ` type GroupConcatOrderByRow struct { StudentName sql.NullString GroupConcat sql.NullString } func (q *Queries) GroupConcatOrderBy(ctx context.Context) ([]GroupConcatOrderByRow, error) { rows, err := q.db.QueryContext(ctx, groupConcatOrderBy) if err != nil { return nil, err } defer rows.Close() var items []GroupConcatOrderByRow for rows.Next() { var i GroupConcatOrderByRow if err := rows.Scan(&i.StudentName, &i.GroupConcat); 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 } ================================================ FILE: internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package aggregate_functions import ( "database/sql" ) type Student struct { StudentName sql.NullString TestScore sql.NullFloat64 } ================================================ FILE: internal/endtoend/testdata/mysql_reference_manual/aggregate_functions/group_concat.sql ================================================ -- name: GroupConcat :many SELECT student_name, GROUP_CONCAT(test_score) FROM student GROUP BY student_name; -- name: GroupConcatOrderBy :many SELECT student_name, GROUP_CONCAT(DISTINCT test_score ORDER BY test_score DESC SEPARATOR ' ') FROM student GROUP BY student_name; ================================================ FILE: internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/date_add.sql ================================================ -- https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_date-add -- name: DateAddOneDay :one SELECT DATE_ADD('2018-05-01',INTERVAL 1 DAY); -- name: DateAddOneSecond :one SELECT DATE_ADD('2020-12-31 23:59:59', INTERVAL 1 SECOND); -- name: DateAddTimestampOneSecond :one SELECT DATE_ADD('2018-12-31 23:59:59', INTERVAL 1 DAY); -- name: DateAddMinuteSecond :one SELECT DATE_ADD('2100-12-31 23:59:59', INTERVAL '1:1' MINUTE_SECOND); -- name: DateAddDayHour :one SELECT DATE_ADD('1900-01-01 00:00:00', INTERVAL '-1 10' DAY_HOUR); -- name: DateAddSecondMicrosecond :one SELECT DATE_ADD('1992-12-31 23:59:59.000002', INTERVAL '1.999999' SECOND_MICROSECOND); ================================================ FILE: internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/date_sub.sql ================================================ -- name: DateSubOneYear :one SELECT DATE_SUB('2018-05-01',INTERVAL 1 YEAR); -- name: DateSubDaySecond :one SELECT DATE_SUB('2025-01-01 00:00:00', INTERVAL '1 1:1:1' DAY_SECOND); -- name: DateSub31Days :one SELECT DATE_SUB('1998-01-02', INTERVAL 31 DAY); ================================================ FILE: internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/date_add.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: date_add.sql package date_and_time_functions import ( "context" "time" ) const dateAddDayHour = `-- name: DateAddDayHour :one SELECT DATE_ADD('1900-01-01 00:00:00', INTERVAL '-1 10' DAY_HOUR) ` func (q *Queries) DateAddDayHour(ctx context.Context) (time.Time, error) { row := q.db.QueryRowContext(ctx, dateAddDayHour) var date_add time.Time err := row.Scan(&date_add) return date_add, err } const dateAddMinuteSecond = `-- name: DateAddMinuteSecond :one SELECT DATE_ADD('2100-12-31 23:59:59', INTERVAL '1:1' MINUTE_SECOND) ` func (q *Queries) DateAddMinuteSecond(ctx context.Context) (time.Time, error) { row := q.db.QueryRowContext(ctx, dateAddMinuteSecond) var date_add time.Time err := row.Scan(&date_add) return date_add, err } const dateAddOneDay = `-- name: DateAddOneDay :one SELECT DATE_ADD('2018-05-01',INTERVAL 1 DAY) ` // https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_date-add func (q *Queries) DateAddOneDay(ctx context.Context) (time.Time, error) { row := q.db.QueryRowContext(ctx, dateAddOneDay) var date_add time.Time err := row.Scan(&date_add) return date_add, err } const dateAddOneSecond = `-- name: DateAddOneSecond :one SELECT DATE_ADD('2020-12-31 23:59:59', INTERVAL 1 SECOND) ` func (q *Queries) DateAddOneSecond(ctx context.Context) (time.Time, error) { row := q.db.QueryRowContext(ctx, dateAddOneSecond) var date_add time.Time err := row.Scan(&date_add) return date_add, err } const dateAddSecondMicrosecond = `-- name: DateAddSecondMicrosecond :one SELECT DATE_ADD('1992-12-31 23:59:59.000002', INTERVAL '1.999999' SECOND_MICROSECOND) ` func (q *Queries) DateAddSecondMicrosecond(ctx context.Context) (time.Time, error) { row := q.db.QueryRowContext(ctx, dateAddSecondMicrosecond) var date_add time.Time err := row.Scan(&date_add) return date_add, err } const dateAddTimestampOneSecond = `-- name: DateAddTimestampOneSecond :one SELECT DATE_ADD('2018-12-31 23:59:59', INTERVAL 1 DAY) ` func (q *Queries) DateAddTimestampOneSecond(ctx context.Context) (time.Time, error) { row := q.db.QueryRowContext(ctx, dateAddTimestampOneSecond) var date_add time.Time err := row.Scan(&date_add) return date_add, err } ================================================ FILE: internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/date_sub.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: date_sub.sql package date_and_time_functions import ( "context" "time" ) const dateSub31Days = `-- name: DateSub31Days :one SELECT DATE_SUB('1998-01-02', INTERVAL 31 DAY) ` func (q *Queries) DateSub31Days(ctx context.Context) (time.Time, error) { row := q.db.QueryRowContext(ctx, dateSub31Days) var date_sub time.Time err := row.Scan(&date_sub) return date_sub, err } const dateSubDaySecond = `-- name: DateSubDaySecond :one SELECT DATE_SUB('2025-01-01 00:00:00', INTERVAL '1 1:1:1' DAY_SECOND) ` func (q *Queries) DateSubDaySecond(ctx context.Context) (time.Time, error) { row := q.db.QueryRowContext(ctx, dateSubDaySecond) var date_sub time.Time err := row.Scan(&date_sub) return date_sub, err } const dateSubOneYear = `-- name: DateSubOneYear :one SELECT DATE_SUB('2018-05-01',INTERVAL 1 YEAR) ` func (q *Queries) DateSubOneYear(ctx context.Context) (time.Time, error) { row := q.db.QueryRowContext(ctx, dateSubOneYear) var date_sub time.Time err := row.Scan(&date_sub) return date_sub, err } ================================================ FILE: internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package date_and_time_functions 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, } } ================================================ FILE: internal/endtoend/testdata/mysql_reference_manual/date_and_time_functions/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package date_and_time_functions import ( "database/sql" ) type Student struct { StudentName sql.NullString TestScore sql.NullFloat64 } ================================================ FILE: internal/endtoend/testdata/mysql_reference_manual/schema.sql ================================================ CREATE TABLE student ( student_name VARCHAR(255), test_score DOUBLE ); ================================================ FILE: internal/endtoend/testdata/mysql_reference_manual/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "date_and_time_functions", "path": "date_and_time_functions/go", "schema": "schema.sql", "queries": "date_and_time_functions", "engine": "mysql" }, { "name": "aggregate_functions", "path": "aggregate_functions/go", "schema": "schema.sql", "queries": "aggregate_functions", "engine": "mysql" } ] } ================================================ FILE: internal/endtoend/testdata/mysql_vector/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/mysql_vector/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID int32 Embedding interface{} } ================================================ FILE: internal/endtoend/testdata/mysql_vector/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/mysql_vector/mysql/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/mysql_vector/mysql/schema.sql ================================================ CREATE TABLE foo( id INT PRIMARY KEY auto_increment, embedding VECTOR(4) ); ================================================ FILE: internal/endtoend/testdata/mysql_vector/mysql/sqlc.json ================================================ { "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" } ] } ================================================ FILE: internal/endtoend/testdata/named_param/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/named_param/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string Bio string } ================================================ FILE: internal/endtoend/testdata/named_param/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const atParams = `-- name: AtParams :many SELECT name FROM foo WHERE name = $1 AND $2::bool ` type AtParamsParams struct { Slug string Filter bool } func (q *Queries) AtParams(ctx context.Context, arg AtParamsParams) ([]string, error) { rows, err := q.db.Query(ctx, atParams, arg.Slug, arg.Filter) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParams = `-- name: FuncParams :many SELECT name FROM foo WHERE name = $1 AND $2::bool ` type FuncParamsParams struct { Slug string Filter bool } func (q *Queries) FuncParams(ctx context.Context, arg FuncParamsParams) ([]string, error) { rows, err := q.db.Query(ctx, funcParams, arg.Slug, arg.Filter) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const insertAtParams = `-- name: InsertAtParams :one INSERT INTO foo(name, bio) values ($1, $2) returning name ` type InsertAtParamsParams struct { Name string Bio string } func (q *Queries) InsertAtParams(ctx context.Context, arg InsertAtParamsParams) (string, error) { row := q.db.QueryRow(ctx, insertAtParams, arg.Name, arg.Bio) var name string err := row.Scan(&name) return name, err } const insertFuncParams = `-- name: InsertFuncParams :one INSERT INTO foo(name, bio) values ($1, $2) returning name ` type InsertFuncParamsParams struct { Name string Bio string } func (q *Queries) InsertFuncParams(ctx context.Context, arg InsertFuncParamsParams) (string, error) { row := q.db.QueryRow(ctx, insertFuncParams, arg.Name, arg.Bio) var name string err := row.Scan(&name) return name, err } const update = `-- name: Update :one UPDATE foo SET name = CASE WHEN $1::bool THEN $2::text ELSE name END RETURNING name, bio ` type UpdateParams struct { SetName bool Name string } func (q *Queries) Update(ctx context.Context, arg UpdateParams) (Foo, error) { row := q.db.QueryRow(ctx, update, arg.SetName, arg.Name) var i Foo err := row.Scan(&i.Name, &i.Bio) return i, err } ================================================ FILE: internal/endtoend/testdata/named_param/pgx/v4/query.sql ================================================ -- name: FuncParams :many SELECT name FROM foo WHERE name = sqlc.arg('slug') AND sqlc.arg(filter)::bool; -- name: AtParams :many SELECT name FROM foo WHERE name = @slug AND @filter::bool; -- name: InsertFuncParams :one INSERT INTO foo(name, bio) values (sqlc.arg('name'), sqlc.arg('bio')) returning name; -- name: InsertAtParams :one INSERT INTO foo(name, bio) values (@name, @bio) returning name; -- name: Update :one UPDATE foo SET name = CASE WHEN @set_name::bool THEN @name::text ELSE name END RETURNING *; ================================================ FILE: internal/endtoend/testdata/named_param/pgx/v4/schema.sql ================================================ CREATE TABLE foo (name text not null, bio text not null); ================================================ FILE: internal/endtoend/testdata/named_param/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/named_param/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/named_param/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string Bio string } ================================================ FILE: internal/endtoend/testdata/named_param/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const atParams = `-- name: AtParams :many SELECT name FROM foo WHERE name = $1 AND $2::bool ` type AtParamsParams struct { Slug string Filter bool } func (q *Queries) AtParams(ctx context.Context, arg AtParamsParams) ([]string, error) { rows, err := q.db.Query(ctx, atParams, arg.Slug, arg.Filter) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParams = `-- name: FuncParams :many SELECT name FROM foo WHERE name = $1 AND $2::bool ` type FuncParamsParams struct { Slug string Filter bool } func (q *Queries) FuncParams(ctx context.Context, arg FuncParamsParams) ([]string, error) { rows, err := q.db.Query(ctx, funcParams, arg.Slug, arg.Filter) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const insertAtParams = `-- name: InsertAtParams :one INSERT INTO foo(name, bio) values ($1, $2) returning name ` type InsertAtParamsParams struct { Name string Bio string } func (q *Queries) InsertAtParams(ctx context.Context, arg InsertAtParamsParams) (string, error) { row := q.db.QueryRow(ctx, insertAtParams, arg.Name, arg.Bio) var name string err := row.Scan(&name) return name, err } const insertFuncParams = `-- name: InsertFuncParams :one INSERT INTO foo(name, bio) values ($1, $2) returning name ` type InsertFuncParamsParams struct { Name string Bio string } func (q *Queries) InsertFuncParams(ctx context.Context, arg InsertFuncParamsParams) (string, error) { row := q.db.QueryRow(ctx, insertFuncParams, arg.Name, arg.Bio) var name string err := row.Scan(&name) return name, err } const update = `-- name: Update :one UPDATE foo SET name = CASE WHEN $1::bool THEN $2::text ELSE name END RETURNING name, bio ` type UpdateParams struct { SetName bool Name string } func (q *Queries) Update(ctx context.Context, arg UpdateParams) (Foo, error) { row := q.db.QueryRow(ctx, update, arg.SetName, arg.Name) var i Foo err := row.Scan(&i.Name, &i.Bio) return i, err } ================================================ FILE: internal/endtoend/testdata/named_param/pgx/v5/query.sql ================================================ -- name: FuncParams :many SELECT name FROM foo WHERE name = sqlc.arg('slug') AND sqlc.arg(filter)::bool; -- name: AtParams :many SELECT name FROM foo WHERE name = @slug AND @filter::bool; -- name: InsertFuncParams :one INSERT INTO foo(name, bio) values (sqlc.arg('name'), sqlc.arg('bio')) returning name; -- name: InsertAtParams :one INSERT INTO foo(name, bio) values (@name, @bio) returning name; -- name: Update :one UPDATE foo SET name = CASE WHEN @set_name::bool THEN @name::text ELSE name END RETURNING *; ================================================ FILE: internal/endtoend/testdata/named_param/pgx/v5/schema.sql ================================================ CREATE TABLE foo (name text not null, bio text not null); ================================================ FILE: internal/endtoend/testdata/named_param/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/named_param/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/named_param/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string Bio string } ================================================ FILE: internal/endtoend/testdata/named_param/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const atParams = `-- name: AtParams :many SELECT name FROM foo WHERE name = ?1 ` func (q *Queries) AtParams(ctx context.Context, slug string) ([]string, error) { rows, err := q.db.QueryContext(ctx, atParams, slug) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParams = `-- name: FuncParams :many SELECT name FROM foo WHERE name = ?1 ` func (q *Queries) FuncParams(ctx context.Context, slug string) ([]string, error) { rows, err := q.db.QueryContext(ctx, funcParams, slug) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const insertAtParams = `-- name: InsertAtParams :one INSERT INTO foo(name, bio) values (?1, ?2) returning name ` type InsertAtParamsParams struct { Name string Bio string } func (q *Queries) InsertAtParams(ctx context.Context, arg InsertAtParamsParams) (string, error) { row := q.db.QueryRowContext(ctx, insertAtParams, arg.Name, arg.Bio) var name string err := row.Scan(&name) return name, err } const insertFuncParams = `-- name: InsertFuncParams :one INSERT INTO foo(name, bio) values (?1, ?2) returning name ` type InsertFuncParamsParams struct { Name string Bio string } func (q *Queries) InsertFuncParams(ctx context.Context, arg InsertFuncParamsParams) (string, error) { row := q.db.QueryRowContext(ctx, insertFuncParams, arg.Name, arg.Bio) var name string err := row.Scan(&name) return name, err } ================================================ FILE: internal/endtoend/testdata/named_param/sqlite/query.sql ================================================ -- name: FuncParams :many SELECT name FROM foo WHERE name = sqlc.arg('slug'); -- name: AtParams :many SELECT name FROM foo WHERE name = @slug; -- name: InsertFuncParams :one INSERT INTO foo(name, bio) values (sqlc.arg('name'), sqlc.arg('bio')) returning name; -- name: InsertAtParams :one INSERT INTO foo(name, bio) values (@name, @bio) returning name; ================================================ FILE: internal/endtoend/testdata/named_param/sqlite/schema.sql ================================================ CREATE TABLE foo (name text not null, bio text not null); ================================================ FILE: internal/endtoend/testdata/named_param/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/named_param/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/named_param/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string Bio string } ================================================ FILE: internal/endtoend/testdata/named_param/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const atParams = `-- name: AtParams :many SELECT name FROM foo WHERE name = $1 AND $2::bool ` type AtParamsParams struct { Slug string Filter bool } func (q *Queries) AtParams(ctx context.Context, arg AtParamsParams) ([]string, error) { rows, err := q.db.QueryContext(ctx, atParams, arg.Slug, arg.Filter) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParams = `-- name: FuncParams :many SELECT name FROM foo WHERE name = $1 AND $2::bool ` type FuncParamsParams struct { Slug string Filter bool } func (q *Queries) FuncParams(ctx context.Context, arg FuncParamsParams) ([]string, error) { rows, err := q.db.QueryContext(ctx, funcParams, arg.Slug, arg.Filter) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const insertAtParams = `-- name: InsertAtParams :one INSERT INTO foo(name, bio) values ($1, $2) returning name ` type InsertAtParamsParams struct { Name string Bio string } func (q *Queries) InsertAtParams(ctx context.Context, arg InsertAtParamsParams) (string, error) { row := q.db.QueryRowContext(ctx, insertAtParams, arg.Name, arg.Bio) var name string err := row.Scan(&name) return name, err } const insertFuncParams = `-- name: InsertFuncParams :one INSERT INTO foo(name, bio) values ($1, $2) returning name ` type InsertFuncParamsParams struct { Name string Bio string } func (q *Queries) InsertFuncParams(ctx context.Context, arg InsertFuncParamsParams) (string, error) { row := q.db.QueryRowContext(ctx, insertFuncParams, arg.Name, arg.Bio) var name string err := row.Scan(&name) return name, err } const update = `-- name: Update :one UPDATE foo SET name = CASE WHEN $1::bool THEN $2::text ELSE name END RETURNING name, bio ` type UpdateParams struct { SetName bool Name string } func (q *Queries) Update(ctx context.Context, arg UpdateParams) (Foo, error) { row := q.db.QueryRowContext(ctx, update, arg.SetName, arg.Name) var i Foo err := row.Scan(&i.Name, &i.Bio) return i, err } ================================================ FILE: internal/endtoend/testdata/named_param/stdlib/query.sql ================================================ -- name: FuncParams :many SELECT name FROM foo WHERE name = sqlc.arg('slug') AND sqlc.arg(filter)::bool; -- name: AtParams :many SELECT name FROM foo WHERE name = @slug AND @filter::bool; -- name: InsertFuncParams :one INSERT INTO foo(name, bio) values (sqlc.arg('name'), sqlc.arg('bio')) returning name; -- name: InsertAtParams :one INSERT INTO foo(name, bio) values (@name, @bio) returning name; -- name: Update :one UPDATE foo SET name = CASE WHEN @set_name::bool THEN @name::text ELSE name END RETURNING *; ================================================ FILE: internal/endtoend/testdata/named_param/stdlib/schema.sql ================================================ CREATE TABLE foo (name text not null, bio text not null); ================================================ FILE: internal/endtoend/testdata/named_param/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/nested_select/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/708 ================================================ FILE: internal/endtoend/testdata/nested_select/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/nested_select/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/nested_select/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Test struct { ID int64 UpdateTime int64 Count int64 } ================================================ FILE: internal/endtoend/testdata/nested_select/postgresql/pgx/go/query.sql.go ================================================ // 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 nestedSelect = `-- name: NestedSelect :one SELECT latest.id, t.count FROM ( SELECT id, max(update_time) AS update_time FROM test WHERE id = ANY ($1::bigint[]) -- ERROR HERE on update_time AND update_time >= $2 GROUP BY id ) latest INNER JOIN test t USING (id, update_time) ` type NestedSelectParams struct { IDs []int64 StartTime pgtype.Int8 } type NestedSelectRow struct { ID int64 Count int64 } func (q *Queries) NestedSelect(ctx context.Context, arg NestedSelectParams) (NestedSelectRow, error) { row := q.db.QueryRow(ctx, nestedSelect, arg.IDs, arg.StartTime) var i NestedSelectRow err := row.Scan(&i.ID, &i.Count) return i, err } ================================================ FILE: internal/endtoend/testdata/nested_select/postgresql/pgx/query.sql ================================================ -- name: NestedSelect :one SELECT latest.id, t.count FROM ( SELECT id, max(update_time) AS update_time FROM test WHERE id = ANY (sqlc.arg('IDs')::bigint[]) -- ERROR HERE on update_time AND update_time >= sqlc.arg('StartTime') GROUP BY id ) latest INNER JOIN test t USING (id, update_time); ================================================ FILE: internal/endtoend/testdata/nested_select/postgresql/pgx/schema.sql ================================================ CREATE TABLE test ( id bigint NOT NULL, update_time bigint NOT NULL, count bigint NOT NULL ); ================================================ FILE: internal/endtoend/testdata/nested_select/postgresql/pgx/sqlc.yaml ================================================ version: "2" cloud: project: "01HAQMMECEYQYKFJN8MP16QC41" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" database: managed: true ================================================ FILE: internal/endtoend/testdata/nextval/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/nextval/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Author struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/nextval/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getNextID = `-- name: GetNextID :one SELECT pk, pk FROM (SELECT nextval('authors_id_seq') as pk) AS alias ` type GetNextIDRow struct { Pk int64 Pk_2 int64 } func (q *Queries) GetNextID(ctx context.Context) (GetNextIDRow, error) { row := q.db.QueryRowContext(ctx, getNextID) var i GetNextIDRow err := row.Scan(&i.Pk, &i.Pk_2) return i, err } ================================================ FILE: internal/endtoend/testdata/nextval/postgresql/query.sql ================================================ -- name: GetNextID :one SELECT pk, pk FROM (SELECT nextval('authors_id_seq') as pk) AS alias; ================================================ FILE: internal/endtoend/testdata/nextval/postgresql/schema.sql ================================================ -- Simple table CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY ); ================================================ FILE: internal/endtoend/testdata/nextval/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listenTest = `-- name: ListenTest :exec LISTEN test ` func (q *Queries) ListenTest(ctx context.Context) error { _, err := q.db.Exec(ctx, listenTest) return err } const notifyTest = `-- name: NotifyTest :exec NOTIFY test ` func (q *Queries) NotifyTest(ctx context.Context) error { _, err := q.db.Exec(ctx, notifyTest) return err } const notifyWithMessage = `-- name: NotifyWithMessage :exec NOTIFY test, 'msg' ` func (q *Queries) NotifyWithMessage(ctx context.Context) error { _, err := q.db.Exec(ctx, notifyWithMessage) return err } ================================================ FILE: internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/query.sql ================================================ -- name: NotifyTest :exec NOTIFY test; -- name: NotifyWithMessage :exec NOTIFY test, 'msg'; -- name: ListenTest :exec LISTEN test; ================================================ FILE: internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/notifylisten/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/null_if_type/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/133 ================================================ FILE: internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db type Author struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const getRestrictedId = `-- name: GetRestrictedId :one SELECT NULLIF(id, $1) restricted_id FROM author ` func (q *Queries) GetRestrictedId(ctx context.Context, id int64) (int64, error) { row := q.db.QueryRowContext(ctx, getRestrictedId, id) var restricted_id int64 err := row.Scan(&restricted_id) return restricted_id, err } ================================================ FILE: internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/query.sql ================================================ -- name: GetRestrictedId :one SELECT NULLIF(id, $1) restricted_id FROM author; ================================================ FILE: internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/schema.sql ================================================ CREATE TABLE author ( id bigserial NOT NULL ); ================================================ FILE: internal/endtoend/testdata/null_if_type/postgresql/pganalyzer/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "db", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db type Author struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/null_if_type/postgresql/stdlib/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const getRestrictedId = `-- name: GetRestrictedId :one SELECT NULLIF(id, $1) restricted_id FROM author ` func (q *Queries) GetRestrictedId(ctx context.Context, id int64) (bool, error) { row := q.db.QueryRowContext(ctx, getRestrictedId, id) var restricted_id bool err := row.Scan(&restricted_id) return restricted_id, err } ================================================ FILE: internal/endtoend/testdata/null_if_type/postgresql/stdlib/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/null_if_type/postgresql/stdlib/query.sql ================================================ -- name: GetRestrictedId :one SELECT NULLIF(id, $1) restricted_id FROM author; ================================================ FILE: internal/endtoend/testdata/null_if_type/postgresql/stdlib/schema.sql ================================================ CREATE TABLE author ( id bigserial NOT NULL ); ================================================ FILE: internal/endtoend/testdata/null_if_type/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "db", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/omit_sqlc_version/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/omit_sqlc_version/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. package db import ( "database/sql" ) type Author struct { ID int64 Name string Bio sql.NullString } ================================================ FILE: internal/endtoend/testdata/omit_sqlc_version/db/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/omit_sqlc_version/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/omit_sqlc_version/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/omit_sqlc_version/sqlc.json ================================================ { "version": "2", "sql": [{ "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "go": { "out": "db", "omit_sqlc_version": true } } }] } ================================================ FILE: internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql/driver" "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 ( QueryParamEnumTableEnumG QueryParamEnumTableEnum = "g" QueryParamEnumTableEnumH QueryParamEnumTableEnum = "h" ) func (e *QueryParamEnumTableEnum) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = QueryParamEnumTableEnum(s) case string: *e = QueryParamEnumTableEnum(s) default: return fmt.Errorf("unsupported scan type for QueryParamEnumTableEnum: %T", src) } return nil } type NullQueryParamEnumTableEnum struct { QueryParamEnumTableEnum QueryParamEnumTableEnum Valid bool // Valid is true if QueryParamEnumTableEnum is not NULL } // Scan implements the Scanner interface. func (ns *NullQueryParamEnumTableEnum) Scan(value interface{}) error { if value == nil { ns.QueryParamEnumTableEnum, ns.Valid = "", false return nil } ns.Valid = true return ns.QueryParamEnumTableEnum.Scan(value) } // Value implements the driver Valuer interface. func (ns NullQueryParamEnumTableEnum) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.QueryParamEnumTableEnum), nil } type QueryParamStructEnumTableEnum string const ( QueryParamStructEnumTableEnumI QueryParamStructEnumTableEnum = "i" QueryParamStructEnumTableEnumJ QueryParamStructEnumTableEnum = "j" ) func (e *QueryParamStructEnumTableEnum) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = QueryParamStructEnumTableEnum(s) case string: *e = QueryParamStructEnumTableEnum(s) default: return fmt.Errorf("unsupported scan type for QueryParamStructEnumTableEnum: %T", src) } return nil } type NullQueryParamStructEnumTableEnum struct { QueryParamStructEnumTableEnum QueryParamStructEnumTableEnum Valid bool // Valid is true if QueryParamStructEnumTableEnum is not NULL } // Scan implements the Scanner interface. func (ns *NullQueryParamStructEnumTableEnum) Scan(value interface{}) error { if value == nil { ns.QueryParamStructEnumTableEnum, ns.Valid = "", false return nil } ns.Valid = true return ns.QueryParamStructEnumTableEnum.Scan(value) } // Value implements the driver Valuer interface. func (ns NullQueryParamStructEnumTableEnum) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.QueryParamStructEnumTableEnum), nil } type QueryReturnEnumTableEnum string const ( QueryReturnEnumTableEnumK QueryReturnEnumTableEnum = "k" QueryReturnEnumTableEnumL QueryReturnEnumTableEnum = "l" ) func (e *QueryReturnEnumTableEnum) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = QueryReturnEnumTableEnum(s) case string: *e = QueryReturnEnumTableEnum(s) default: return fmt.Errorf("unsupported scan type for QueryReturnEnumTableEnum: %T", src) } return nil } type NullQueryReturnEnumTableEnum struct { QueryReturnEnumTableEnum QueryReturnEnumTableEnum Valid bool // Valid is true if QueryReturnEnumTableEnum is not NULL } // Scan implements the Scanner interface. func (ns *NullQueryReturnEnumTableEnum) Scan(value interface{}) error { if value == nil { ns.QueryReturnEnumTableEnum, ns.Valid = "", false return nil } ns.Valid = true return ns.QueryReturnEnumTableEnum.Scan(value) } // Value implements the driver Valuer interface. func (ns NullQueryReturnEnumTableEnum) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.QueryReturnEnumTableEnum), nil } type QueryReturnFullTableEnum string const ( QueryReturnFullTableEnumE QueryReturnFullTableEnum = "e" QueryReturnFullTableEnumF QueryReturnFullTableEnum = "f" ) func (e *QueryReturnFullTableEnum) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = QueryReturnFullTableEnum(s) case string: *e = QueryReturnFullTableEnum(s) default: return fmt.Errorf("unsupported scan type for QueryReturnFullTableEnum: %T", src) } return nil } type NullQueryReturnFullTableEnum struct { QueryReturnFullTableEnum QueryReturnFullTableEnum Valid bool // Valid is true if QueryReturnFullTableEnum is not NULL } // Scan implements the Scanner interface. func (ns *NullQueryReturnFullTableEnum) Scan(value interface{}) error { if value == nil { ns.QueryReturnFullTableEnum, ns.Valid = "", false return nil } ns.Valid = true return ns.QueryReturnFullTableEnum.Scan(value) } // Value implements the driver Valuer interface. func (ns NullQueryReturnFullTableEnum) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.QueryReturnFullTableEnum), nil } type QueryReturnStructEnumTableEnum string const ( QueryReturnStructEnumTableEnumK QueryReturnStructEnumTableEnum = "k" QueryReturnStructEnumTableEnumL QueryReturnStructEnumTableEnum = "l" ) func (e *QueryReturnStructEnumTableEnum) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = QueryReturnStructEnumTableEnum(s) case string: *e = QueryReturnStructEnumTableEnum(s) default: return fmt.Errorf("unsupported scan type for QueryReturnStructEnumTableEnum: %T", src) } return nil } type NullQueryReturnStructEnumTableEnum struct { QueryReturnStructEnumTableEnum QueryReturnStructEnumTableEnum Valid bool // Valid is true if QueryReturnStructEnumTableEnum is not NULL } // Scan implements the Scanner interface. func (ns *NullQueryReturnStructEnumTableEnum) Scan(value interface{}) error { if value == nil { ns.QueryReturnStructEnumTableEnum, ns.Valid = "", false return nil } ns.Valid = true return ns.QueryReturnStructEnumTableEnum.Scan(value) } // Value implements the driver Valuer interface. func (ns NullQueryReturnStructEnumTableEnum) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.QueryReturnStructEnumTableEnum), nil } type QuerySqlcEmbedEnum string const ( QuerySqlcEmbedEnumM QuerySqlcEmbedEnum = "m" QuerySqlcEmbedEnumN QuerySqlcEmbedEnum = "n" ) func (e *QuerySqlcEmbedEnum) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = QuerySqlcEmbedEnum(s) case string: *e = QuerySqlcEmbedEnum(s) default: return fmt.Errorf("unsupported scan type for QuerySqlcEmbedEnum: %T", src) } return nil } type NullQuerySqlcEmbedEnum struct { QuerySqlcEmbedEnum QuerySqlcEmbedEnum Valid bool // Valid is true if QuerySqlcEmbedEnum is not NULL } // Scan implements the Scanner interface. func (ns *NullQuerySqlcEmbedEnum) Scan(value interface{}) error { if value == nil { ns.QuerySqlcEmbedEnum, ns.Valid = "", false return nil } ns.Valid = true return ns.QuerySqlcEmbedEnum.Scan(value) } // Value implements the driver Valuer interface. func (ns NullQuerySqlcEmbedEnum) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.QuerySqlcEmbedEnum), nil } type ArrayEnumTable struct { ID int32 Value []ArrayEnum } type QueryParamEnumTable struct { ID int32 Other QueryParamEnumTableEnum Value NullQueryParamEnumTableEnum } type QueryReturnFullTable struct { ID int32 Value NullQueryReturnFullTableEnum } type QuerySqlcEmbedTable struct { ID int32 Value NullQuerySqlcEmbedEnum } ================================================ FILE: internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql 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 ` func (q *Queries) query_param_enum_table(ctx context.Context, value NullQueryParamEnumTableEnum) (QueryParamEnumTable, error) { row := q.db.QueryRowContext(ctx, query_param_enum_table, value) var i QueryParamEnumTable err := row.Scan(&i.ID, &i.Other, &i.Value) return i, err } const query_param_struct_enum_table = `-- name: query_param_struct_enum_table :one SELECT id FROM query_param_struct_enum_table WHERE id = $1 AND value = $2 ` type query_param_struct_enum_tableParams struct { ID int32 Value NullQueryParamStructEnumTableEnum } func (q *Queries) query_param_struct_enum_table(ctx context.Context, arg query_param_struct_enum_tableParams) (int32, error) { row := q.db.QueryRowContext(ctx, query_param_struct_enum_table, arg.ID, arg.Value) var id int32 err := row.Scan(&id) return id, err } const query_return_enum_table = `-- name: query_return_enum_table :one SELECT value FROM query_return_enum_table WHERE id = $1 ` func (q *Queries) query_return_enum_table(ctx context.Context, id int32) (NullQueryReturnEnumTableEnum, error) { row := q.db.QueryRowContext(ctx, query_return_enum_table, id) var value NullQueryReturnEnumTableEnum err := row.Scan(&value) return value, err } const query_return_full_table = `-- name: query_return_full_table :many SELECT id, value FROM query_return_full_table ` func (q *Queries) query_return_full_table(ctx context.Context) ([]QueryReturnFullTable, error) { rows, err := q.db.QueryContext(ctx, query_return_full_table) if err != nil { return nil, err } defer rows.Close() var items []QueryReturnFullTable for rows.Next() { var i QueryReturnFullTable if err := rows.Scan(&i.ID, &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_return_struct_enum_table = `-- name: query_return_struct_enum_table :one SELECT value, another FROM query_return_struct_enum_table WHERE id = $1 ` type query_return_struct_enum_tableRow struct { Value NullQueryReturnStructEnumTableEnum Another sql.NullInt32 } func (q *Queries) query_return_struct_enum_table(ctx context.Context, id int32) (query_return_struct_enum_tableRow, error) { row := q.db.QueryRowContext(ctx, query_return_struct_enum_table, id) var i query_return_struct_enum_tableRow err := row.Scan(&i.Value, &i.Another) return i, err } const query_sqlc_embed_table = `-- name: query_sqlc_embed_table :one SELECT query_sqlc_embed_table.id, query_sqlc_embed_table.value FROM query_sqlc_embed_table WHERE id = $1 ` type query_sqlc_embed_tableRow struct { QuerySqlcEmbedTable QuerySqlcEmbedTable } func (q *Queries) query_sqlc_embed_table(ctx context.Context, id int32) (query_sqlc_embed_tableRow, error) { row := q.db.QueryRowContext(ctx, query_sqlc_embed_table, id) var i query_sqlc_embed_tableRow err := row.Scan(&i.QuerySqlcEmbedTable.ID, &i.QuerySqlcEmbedTable.Value) return i, err } ================================================ FILE: internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/query.sql ================================================ -- name: query_return_full_table :many SELECT * FROM query_return_full_table; -- name: query_param_enum_table :one SELECT * FROM query_param_enum_table WHERE value = $1; -- name: query_param_struct_enum_table :one SELECT id FROM query_param_struct_enum_table WHERE id = $1 AND value = $2; -- name: query_return_enum_table :one SELECT value FROM query_return_enum_table WHERE id = $1; -- name: query_return_struct_enum_table :one SELECT value, another FROM query_return_struct_enum_table WHERE id = $1; -- 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; ================================================ FILE: internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/schema.sql ================================================ CREATE TYPE unused_enum AS ENUM ( 'a', 'b' ); CREATE TYPE unused_table_enum AS ENUM ( 'c', 'd' ); CREATE TABLE unused_table ( id INTEGER PRIMARY KEY, value unused_table_enum ); CREATE TYPE query_return_full_table_enum AS ENUM ( 'e', 'f' ); CREATE TABLE query_return_full_table ( id INTEGER PRIMARY KEY, value query_return_full_table_enum ); CREATE TYPE query_param_enum_table_enum AS ENUM ( 'g', 'h' ); CREATE TABLE query_param_enum_table ( id INTEGER PRIMARY KEY, other query_param_enum_table_enum NOT NULL, value query_param_enum_table_enum ); CREATE TYPE query_param_struct_enum_table_enum AS ENUM ( 'i', 'j' ); CREATE TABLE query_param_struct_enum_table ( id INTEGER PRIMARY KEY, value query_param_struct_enum_table_enum ); CREATE TYPE query_return_enum_table_enum AS ENUM ( 'k', 'l' ); CREATE TABLE query_return_enum_table ( id INTEGER PRIMARY KEY, value query_return_enum_table_enum ); CREATE TYPE query_return_struct_enum_table_enum AS ENUM ( 'k', 'l' ); CREATE TABLE query_return_struct_enum_table ( id INTEGER PRIMARY KEY, value query_return_struct_enum_table_enum, another INTEGER ); CREATE TYPE query_sqlc_embed_enum AS ENUM ( 'm', 'n' ); CREATE TABLE query_sqlc_embed_table ( id INTEGER PRIMARY KEY, value query_sqlc_embed_enum ); CREATE TYPE array_enum AS ENUM ( 'o', 'p' ); CREATE TABLE array_enum_table ( id INTEGER PRIMARY KEY, value array_enum[] ); ================================================ FILE: internal/endtoend/testdata/omit_unused_structs/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "db", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "omit_unused_structs": true } ] } ================================================ FILE: internal/endtoend/testdata/on_duplicate_key_update/mysql/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/on_duplicate_key_update/mysql/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" ) type Author struct { ID int64 Name string Bio sql.NullString } ================================================ FILE: internal/endtoend/testdata/on_duplicate_key_update/mysql/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" "database/sql" ) const upsertAuthor = `-- name: UpsertAuthor :exec INSERT INTO authors (name, bio) VALUES (?, ?) ON DUPLICATE KEY UPDATE bio = ? ` type UpsertAuthorParams struct { Name string Bio sql.NullString Bio_2 sql.NullString } func (q *Queries) UpsertAuthor(ctx context.Context, arg UpsertAuthorParams) error { _, err := q.db.ExecContext(ctx, upsertAuthor, arg.Name, arg.Bio, arg.Bio_2) return err } const upsertAuthorNamed = `-- name: UpsertAuthorNamed :exec INSERT INTO authors (name, bio) VALUES (?, ?) ON DUPLICATE KEY UPDATE bio = ? ` type UpsertAuthorNamedParams struct { Name string Bio sql.NullString } func (q *Queries) UpsertAuthorNamed(ctx context.Context, arg UpsertAuthorNamedParams) error { _, err := q.db.ExecContext(ctx, upsertAuthorNamed, arg.Name, arg.Bio, arg.Bio) return err } ================================================ FILE: internal/endtoend/testdata/on_duplicate_key_update/mysql/query.sql ================================================ -- name: UpsertAuthor :exec INSERT INTO authors (name, bio) VALUES (?, ?) ON DUPLICATE KEY UPDATE bio = ?; -- name: UpsertAuthorNamed :exec INSERT INTO authors (name, bio) VALUES (?, sqlc.arg(bio)) ON DUPLICATE KEY UPDATE bio = sqlc.arg(bio); ================================================ FILE: internal/endtoend/testdata/on_duplicate_key_update/mysql/schema.sql ================================================ CREATE TABLE authors ( id BIGINT PRIMARY KEY AUTO_INCREMENT, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/on_duplicate_key_update/mysql/sqlc.json ================================================ { "version":"1", "packages":[ { "path":"db", "engine":"mysql", "schema":"schema.sql", "queries":"query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/on_duplicate_key_update/postgresql/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/on_duplicate_key_update/postgresql/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" ) type Author struct { ID int64 Name string Bio sql.NullString } ================================================ FILE: internal/endtoend/testdata/on_duplicate_key_update/postgresql/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" "database/sql" ) const upsertAuthor = `-- name: UpsertAuthor :exec INSERT INTO authors (name, bio) VALUES ($1, $2) ON CONFLICT (name) DO UPDATE SET bio = $2 ` type UpsertAuthorParams struct { Name string Bio sql.NullString } func (q *Queries) UpsertAuthor(ctx context.Context, arg UpsertAuthorParams) error { _, err := q.db.ExecContext(ctx, upsertAuthor, arg.Name, arg.Bio) return err } const upsertAuthorNamed = `-- name: UpsertAuthorNamed :exec INSERT INTO authors (name, bio) VALUES ($1, $2) ON CONFLICT (name) DO UPDATE SET bio = $2 ` type UpsertAuthorNamedParams struct { Name string Bio sql.NullString } func (q *Queries) UpsertAuthorNamed(ctx context.Context, arg UpsertAuthorNamedParams) error { _, err := q.db.ExecContext(ctx, upsertAuthorNamed, arg.Name, arg.Bio) return err } ================================================ FILE: internal/endtoend/testdata/on_duplicate_key_update/postgresql/query.sql ================================================ -- name: UpsertAuthor :exec INSERT INTO authors (name, bio) VALUES ($1, $2) ON CONFLICT (name) DO UPDATE SET bio = $2; -- name: UpsertAuthorNamed :exec INSERT INTO authors (name, bio) VALUES ($1, sqlc.arg(bio)) ON CONFLICT (name) DO UPDATE SET bio = sqlc.arg(bio); ================================================ FILE: internal/endtoend/testdata/on_duplicate_key_update/postgresql/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/on_duplicate_key_update/postgresql/sqlc.json ================================================ { "version":"1", "packages":[ { "path":"db", "engine":"postgresql", "schema":"schema.sql", "queries":"query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Demo struct { Txt string } ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const test2 = `-- name: Test2 :one select txt from Demo where txt like '%' || $1::text || '%' ` func (q *Queries) Test2(ctx context.Context, val string) (string, error) { row := q.db.QueryRow(ctx, test2, val) var txt string err := row.Scan(&txt) return txt, err } const test3 = `-- name: Test3 :one select txt from Demo where txt like concat('%', $1::text, '%') ` func (q *Queries) Test3(ctx context.Context, val string) (string, error) { row := q.db.QueryRow(ctx, test3, val) var txt string err := row.Scan(&txt) return txt, err } ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/query.sql ================================================ -- name: Test2 :one select * from Demo where txt like '%' || sqlc.arg('val')::text || '%'; -- name: Test3 :one select * from Demo where txt like concat('%', sqlc.arg('val')::text, '%'); ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE demo (txt text not null); ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Demo struct { Txt string } ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const test2 = `-- name: Test2 :one select txt from Demo where txt like '%' || $1::text || '%' ` func (q *Queries) Test2(ctx context.Context, val string) (string, error) { row := q.db.QueryRow(ctx, test2, val) var txt string err := row.Scan(&txt) return txt, err } const test3 = `-- name: Test3 :one select txt from Demo where txt like concat('%', $1::text, '%') ` func (q *Queries) Test3(ctx context.Context, val string) (string, error) { row := q.db.QueryRow(ctx, test3, val) var txt string err := row.Scan(&txt) return txt, err } ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/query.sql ================================================ -- name: Test2 :one select * from Demo where txt like '%' || sqlc.arg('val')::text || '%'; -- name: Test3 :one select * from Demo where txt like concat('%', sqlc.arg('val')::text, '%'); ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE demo (txt text not null); ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Demo struct { Txt string } ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const test2 = `-- name: Test2 :one select txt from Demo where txt like '%' || $1::text || '%' ` func (q *Queries) Test2(ctx context.Context, val string) (string, error) { row := q.db.QueryRowContext(ctx, test2, val) var txt string err := row.Scan(&txt) return txt, err } const test3 = `-- name: Test3 :one select txt from Demo where txt like concat('%', $1::text, '%') ` func (q *Queries) Test3(ctx context.Context, val string) (string, error) { row := q.db.QueryRowContext(ctx, test3, val) var txt string err := row.Scan(&txt) return txt, err } ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/query.sql ================================================ -- name: Test2 :one select * from Demo where txt like '%' || sqlc.arg('val')::text || '%'; -- name: Test3 :one select * from Demo where txt like concat('%', sqlc.arg('val')::text, '%'); ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/schema.sql ================================================ CREATE TABLE demo (txt text not null); ================================================ FILE: internal/endtoend/testdata/operator_string_concat/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/order_by_binds/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/order_by_binds/mysql/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/order_by_binds/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthorsColumnSort = `-- name: ListAuthorsColumnSort :many SELECT id, name, bio FROM authors WHERE id > ? ORDER BY CASE WHEN ? = 'name' THEN name END ` type ListAuthorsColumnSortParams struct { MinID int64 SortColumn interface{} } func (q *Queries) ListAuthorsColumnSort(ctx context.Context, arg ListAuthorsColumnSortParams) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthorsColumnSort, arg.MinID, arg.SortColumn) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const 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 > ? ORDER BY name ASC ` func (q *Queries) ListAuthorsNameSort(ctx context.Context, minID int64) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthorsNameSort, minID) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/order_by_binds/mysql/query.sql ================================================ -- name: ListAuthorsColumnSort :many SELECT * FROM authors WHERE id > sqlc.arg(min_id) ORDER BY CASE WHEN sqlc.arg(sort_column) = 'name' THEN name END; -- name: 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) ORDER BY name ASC; ================================================ FILE: internal/endtoend/testdata/order_by_binds/mysql/schema.sql ================================================ CREATE TABLE authors ( id BIGINT PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/order_by_binds/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/order_by_binds/pganalyze/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/order_by_binds/pganalyze/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/order_by_binds/pganalyze/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/order_by_binds/pganalyze/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const listAuthorsColumnSort = `-- name: ListAuthorsColumnSort :many SELECT id, name, bio FROM authors WHERE id > $1 ORDER BY CASE WHEN $2 = 'name' THEN name END ` type ListAuthorsColumnSortParams struct { MinID int64 SortColumn sql.NullString } func (q *Queries) ListAuthorsColumnSort(ctx context.Context, arg ListAuthorsColumnSortParams) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthorsColumnSort, arg.MinID, arg.SortColumn) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listAuthorsNameSort = `-- name: ListAuthorsNameSort :many SELECT id, name, bio FROM authors WHERE id > $1 ORDER BY name ASC ` func (q *Queries) ListAuthorsNameSort(ctx context.Context, minID int64) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthorsNameSort, minID) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/order_by_binds/pganalyze/query.sql ================================================ -- name: ListAuthorsColumnSort :many SELECT * FROM authors WHERE id > sqlc.arg(min_id) ORDER BY CASE WHEN sqlc.arg(sort_column) = 'name' THEN name END; -- name: ListAuthorsNameSort :many SELECT * FROM authors WHERE id > sqlc.arg(min_id) ORDER BY name ASC; ================================================ FILE: internal/endtoend/testdata/order_by_binds/pganalyze/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/order_by_binds/pganalyze/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/order_by_binds/postgresql/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/order_by_binds/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/order_by_binds/postgresql/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/order_by_binds/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthorsColumnSort = `-- name: ListAuthorsColumnSort :many SELECT id, name, bio FROM authors WHERE id > $1 ORDER BY CASE WHEN $2 = 'name' THEN name END ` type ListAuthorsColumnSortParams struct { MinID int64 SortColumn interface{} } func (q *Queries) ListAuthorsColumnSort(ctx context.Context, arg ListAuthorsColumnSortParams) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthorsColumnSort, arg.MinID, arg.SortColumn) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const 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 ORDER BY name ASC ` func (q *Queries) ListAuthorsNameSort(ctx context.Context, minID int64) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthorsNameSort, minID) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/order_by_binds/postgresql/query.sql ================================================ -- name: ListAuthorsColumnSort :many SELECT * FROM authors WHERE id > sqlc.arg(min_id) ORDER BY CASE WHEN sqlc.arg(sort_column) = 'name' THEN name END; -- name: ListAuthorsColumnSortFnWtihArg :many SELECT * FROM authors ORDER BY MOD(id, $1); -- name: ListAuthorsNameSort :many SELECT * FROM authors WHERE id > sqlc.arg(min_id) ORDER BY name ASC; ================================================ FILE: internal/endtoend/testdata/order_by_binds/postgresql/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/order_by_binds/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/order_by_non_existing_column/postgresql/query.sql ================================================ -- name: ListAuthors :many SELECT id FROM authors ORDER BY adfadsf; ================================================ FILE: internal/endtoend/testdata/order_by_non_existing_column/postgresql/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id INT ); ================================================ FILE: internal/endtoend/testdata/order_by_non_existing_column/postgresql/sqlc.yaml ================================================ version: 1 packages: - path: "go" name: "querytest" engine: "postgresql" schema: "schema.sql" queries: "query.sql" ================================================ FILE: internal/endtoend/testdata/order_by_non_existing_column/postgresql/stderr/base.txt ================================================ # package querytest query.sql:1:1: column reference "adfadsf" not found: if you want to skip this validation, set 'strict_order_by' to false ================================================ FILE: internal/endtoend/testdata/order_by_non_existing_column/postgresql/stderr/managed-db.txt ================================================ # package querytest query.sql:3:10: column "adfadsf" does not exist ================================================ FILE: internal/endtoend/testdata/order_by_union/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/order_by_union/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Author struct { Name string Bio sql.NullString } type Person struct { FirstName string } ================================================ FILE: internal/endtoend/testdata/order_by_union/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthorsUnion = `-- name: ListAuthorsUnion :many SELECT name as foo FROM authors UNION SELECT first_name as foo FROM people ORDER BY foo ` func (q *Queries) ListAuthorsUnion(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listAuthorsUnion) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var foo string if err := rows.Scan(&foo); err != nil { return nil, err } items = append(items, foo) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/order_by_union/mysql/query.sql ================================================ -- name: ListAuthorsUnion :many SELECT name as foo FROM authors UNION SELECT first_name as foo FROM people ORDER BY foo; ================================================ FILE: internal/endtoend/testdata/order_by_union/mysql/schema.sql ================================================ CREATE TABLE authors ( name text NOT NULL, bio text ); CREATE TABLE people ( first_name text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/order_by_union/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/order_by_union/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/order_by_union/postgresql/go/models.go ================================================ // 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 Person struct { FirstName string } ================================================ FILE: internal/endtoend/testdata/order_by_union/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthorsUnion = `-- name: ListAuthorsUnion :many SELECT name as foo FROM authors UNION SELECT first_name as foo FROM people ORDER BY foo ` func (q *Queries) ListAuthorsUnion(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, listAuthorsUnion) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var foo string if err := rows.Scan(&foo); err != nil { return nil, err } items = append(items, foo) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/order_by_union/postgresql/query.sql ================================================ -- name: ListAuthorsUnion :many SELECT name as foo FROM authors UNION SELECT first_name as foo FROM people ORDER BY foo; ================================================ FILE: internal/endtoend/testdata/order_by_union/postgresql/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); CREATE TABLE people ( first_name text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/order_by_union/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v4/go/batch_gen.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: batch_gen.go package querytest import ( "context" "errors" "github.com/jackc/pgx/v4" ) var ( ErrBatchAlreadyClosed = errors.New("batch already closed") ) const usersB = `-- name: UsersB :batchmany SELECT id FROM "user" WHERE id = $1 ` type UsersBBatchResults struct { br pgx.BatchResults tot int closed bool } func (q *Queries) UsersB(ctx context.Context, id []int64) *UsersBBatchResults { batch := &pgx.Batch{} for _, a := range id { vals := []interface{}{ a, } batch.Queue(usersB, vals...) } br := q.db.SendBatch(ctx, batch) return &UsersBBatchResults{br, len(id), false} } func (b *UsersBBatchResults) Query(f func(int, []int64, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var items []int64 if b.closed { if f != nil { f(t, items, ErrBatchAlreadyClosed) } continue } err := func() error { rows, err := b.br.Query() if err != nil { return err } defer rows.Close() for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return err } items = append(items, id) } return rows.Err() }() if f != nil { f(t, items, err) } } } func (b *UsersBBatchResults) Close() error { b.closed = true return b.br.Close() } ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v4/go/copyfrom_gen.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: copyfrom_gen.go package querytest import ( "context" ) // iteratorForUsersC implements pgx.CopyFromSource. type iteratorForUsersC struct { rows []int64 skippedFirstNextCall bool } func (r *iteratorForUsersC) Next() bool { if len(r.rows) == 0 { return false } if !r.skippedFirstNextCall { r.skippedFirstNextCall = true return true } r.rows = r.rows[1:] return len(r.rows) > 0 } func (r iteratorForUsersC) Values() ([]interface{}, error) { return []interface{}{ r.rows[0], }, nil } func (r iteratorForUsersC) Err() error { return nil } func (q *Queries) UsersC(ctx context.Context, id []int64) (int64, error) { return q.db.CopyFrom(ctx, []string{"user"}, []string{"id"}, &iteratorForUsersC{rows: id}) } ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v4/go/db_gen.go ================================================ // 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 CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) 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, } } ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v4/go/models_gen.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type User struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v4/go/querier_gen.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { User(ctx context.Context) ([]int64, error) UsersB(ctx context.Context, id []int64) *UsersBBatchResults UsersC(ctx context.Context, id []int64) (int64, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const user = `-- name: User :many SELECT "user".id FROM "user" ` func (q *Queries) User(ctx context.Context) ([]int64, error) { rows, err := q.db.Query(ctx, user) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v4/query.sql ================================================ -- name: User :many SELECT "user".* FROM "user"; -- name: UsersB :batchmany SELECT * FROM "user" WHERE id = $1; -- name: UsersC :copyfrom INSERT INTO "user" (id) VALUES ($1); ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v4/schema.sql ================================================ CREATE TABLE "user" (id bigserial not null); ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true, "output_batch_file_name": "batch_gen.go", "output_db_file_name": "db_gen.go", "output_models_file_name": "models_gen.go", "output_querier_file_name": "querier_gen.go", "output_copyfrom_file_name": "copyfrom_gen.go" } ] } ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v5/go/batch_gen.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: batch_gen.go package querytest import ( "context" "errors" "github.com/jackc/pgx/v5" ) var ( ErrBatchAlreadyClosed = errors.New("batch already closed") ) const usersB = `-- name: UsersB :batchmany SELECT id FROM "user" WHERE id = $1 ` type UsersBBatchResults struct { br pgx.BatchResults tot int closed bool } func (q *Queries) UsersB(ctx context.Context, id []int64) *UsersBBatchResults { batch := &pgx.Batch{} for _, a := range id { vals := []interface{}{ a, } batch.Queue(usersB, vals...) } br := q.db.SendBatch(ctx, batch) return &UsersBBatchResults{br, len(id), false} } func (b *UsersBBatchResults) Query(f func(int, []int64, error)) { defer b.br.Close() for t := 0; t < b.tot; t++ { var items []int64 if b.closed { if f != nil { f(t, items, ErrBatchAlreadyClosed) } continue } err := func() error { rows, err := b.br.Query() if err != nil { return err } defer rows.Close() for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return err } items = append(items, id) } return rows.Err() }() if f != nil { f(t, items, err) } } } func (b *UsersBBatchResults) Close() error { b.closed = true return b.br.Close() } ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v5/go/copyfrom_gen.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: copyfrom_gen.go package querytest import ( "context" ) // iteratorForUsersC implements pgx.CopyFromSource. type iteratorForUsersC struct { rows []int64 skippedFirstNextCall bool } func (r *iteratorForUsersC) Next() bool { if len(r.rows) == 0 { return false } if !r.skippedFirstNextCall { r.skippedFirstNextCall = true return true } r.rows = r.rows[1:] return len(r.rows) > 0 } func (r iteratorForUsersC) Values() ([]interface{}, error) { return []interface{}{ r.rows[0], }, nil } func (r iteratorForUsersC) Err() error { return nil } func (q *Queries) UsersC(ctx context.Context, id []int64) (int64, error) { return q.db.CopyFrom(ctx, []string{"user"}, []string{"id"}, &iteratorForUsersC{rows: id}) } ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v5/go/db_gen.go ================================================ // 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 CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error) 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, } } ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v5/go/models_gen.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type User struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v5/go/querier_gen.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { User(ctx context.Context) ([]int64, error) UsersB(ctx context.Context, id []int64) *UsersBBatchResults UsersC(ctx context.Context, id []int64) (int64, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const user = `-- name: User :many SELECT "user".id FROM "user" ` func (q *Queries) User(ctx context.Context) ([]int64, error) { rows, err := q.db.Query(ctx, user) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v5/query.sql ================================================ -- name: User :many SELECT "user".* FROM "user"; -- name: UsersB :batchmany SELECT * FROM "user" WHERE id = $1; -- name: UsersC :copyfrom INSERT INTO "user" (id) VALUES ($1); ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v5/schema.sql ================================================ CREATE TABLE "user" (id bigserial not null); ================================================ FILE: internal/endtoend/testdata/output_file_names/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true, "output_batch_file_name": "batch_gen.go", "output_db_file_name": "db_gen.go", "output_models_file_name": "models_gen.go", "output_querier_file_name": "querier_gen.go", "output_copyfrom_file_name": "copyfrom_gen.go" } ] } ================================================ FILE: internal/endtoend/testdata/output_file_names/stdlib/go/db_gen.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/output_file_names/stdlib/go/models_gen.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type User struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/output_file_names/stdlib/go/querier_gen.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { User(ctx context.Context) ([]int64, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/output_file_names/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const user = `-- name: User :many SELECT "user".id FROM "user" ` func (q *Queries) User(ctx context.Context) ([]int64, error) { rows, err := q.db.QueryContext(ctx, user) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/output_file_names/stdlib/query.sql ================================================ -- name: User :many SELECT "user".* FROM "user"; ================================================ FILE: internal/endtoend/testdata/output_file_names/stdlib/schema.sql ================================================ CREATE TABLE "user" (id bigserial not null); ================================================ FILE: internal/endtoend/testdata/output_file_names/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true, "output_db_file_name": "db_gen.go", "output_models_file_name": "models_gen.go", "output_querier_file_name": "querier_gen.go", "output_copyfrom_file_name": "copyfrom_gen.go" } ] } ================================================ FILE: internal/endtoend/testdata/output_files_suffix/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/output_files_suffix/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type User struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/output_files_suffix/pgx/v4/go/query.sql_gen.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const user = `-- name: User :many SELECT "user".id FROM "user" ` func (q *Queries) User(ctx context.Context) ([]int64, error) { rows, err := q.db.Query(ctx, user) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/output_files_suffix/pgx/v4/query.sql ================================================ -- name: User :many SELECT "user".* FROM "user"; ================================================ FILE: internal/endtoend/testdata/output_files_suffix/pgx/v4/schema.sql ================================================ CREATE TABLE "user" (id bigserial not null); ================================================ FILE: internal/endtoend/testdata/output_files_suffix/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "output_files_suffix": "_gen.go" } ] } ================================================ FILE: internal/endtoend/testdata/output_files_suffix/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/output_files_suffix/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type User struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/output_files_suffix/pgx/v5/go/query.sql_gen.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const user = `-- name: User :many SELECT "user".id FROM "user" ` func (q *Queries) User(ctx context.Context) ([]int64, error) { rows, err := q.db.Query(ctx, user) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/output_files_suffix/pgx/v5/query.sql ================================================ -- name: User :many SELECT "user".* FROM "user"; ================================================ FILE: internal/endtoend/testdata/output_files_suffix/pgx/v5/schema.sql ================================================ CREATE TABLE "user" (id bigserial not null); ================================================ FILE: internal/endtoend/testdata/output_files_suffix/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "output_files_suffix": "_gen.go" } ] } ================================================ FILE: internal/endtoend/testdata/output_files_suffix/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/output_files_suffix/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type User struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/output_files_suffix/stdlib/go/query.sql_gen.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const user = `-- name: User :many SELECT "user".id FROM "user" ` func (q *Queries) User(ctx context.Context) ([]int64, error) { rows, err := q.db.QueryContext(ctx, user) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/output_files_suffix/stdlib/query.sql ================================================ -- name: User :many SELECT "user".* FROM "user"; ================================================ FILE: internal/endtoend/testdata/output_files_suffix/stdlib/schema.sql ================================================ CREATE TABLE "user" (id bigserial not null); ================================================ FILE: internal/endtoend/testdata/output_files_suffix/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "output_files_suffix": "_gen.go" } ] } ================================================ FILE: internal/endtoend/testdata/overrides/mysql/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override import ( "github.com/sqlc-dev/sqlc-testdata/pkg" ) type Foo struct { Other string Total int64 Retyped pkg.CustomType } ================================================ FILE: internal/endtoend/testdata/overrides/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides/mysql/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/overrides/mysql/schema.sql ================================================ CREATE TABLE foo ( other text NOT NULL, total bigint NOT NULL, retyped text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/overrides/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "override", "engine": "mysql", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "go_type": "github.com/sqlc-dev/sqlc-testdata/pkg.CustomType", "column": "foo.retyped" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/pgx/v4/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override import ( "github.com/lib/pq" "github.com/sqlc-dev/sqlc-testdata/pkg" ) type Foo struct { Other string Total int64 Tags []string ByteSeq []byte Retyped pkg.CustomType Langs pq.StringArray } ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/pgx/v4/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/pgx/v4/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo ( other text NOT NULL, total bigint NOT NULL, tags text[] NOT NULL, byte_seq bytea NOT NULL, retyped text NOT NULL, langs text[] ); ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "override", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "go_type": "github.com/sqlc-dev/sqlc-testdata/pkg.CustomType", "column": "foo.retyped" }, { "go_type": "github.com/lib/pq.StringArray", "column": "foo.langs" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/pgx/v5/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override import ( "github.com/lib/pq" "github.com/sqlc-dev/sqlc-testdata/pkg" ) type Foo struct { Other string Total int64 Tags []string ByteSeq []byte Retyped pkg.CustomType Langs pq.StringArray } ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/pgx/v5/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo ( other text NOT NULL, total bigint NOT NULL, tags text[] NOT NULL, byte_seq bytea NOT NULL, retyped text NOT NULL, langs text[] ); ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "override", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "go_type": "github.com/sqlc-dev/sqlc-testdata/pkg.CustomType", "column": "foo.retyped" }, { "go_type": "github.com/lib/pq.StringArray", "column": "foo.langs" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/stdlib/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override import ( "github.com/lib/pq" "github.com/sqlc-dev/sqlc-testdata/pkg" ) type Foo struct { Other string Total int64 Tags []string ByteSeq []byte Retyped pkg.CustomType Langs pq.StringArray } ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/stdlib/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo ( other text NOT NULL, total bigint NOT NULL, tags text[] NOT NULL, byte_seq bytea NOT NULL, retyped text NOT NULL, langs text[] ); ================================================ FILE: internal/endtoend/testdata/overrides/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "override", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "go_type": "github.com/sqlc-dev/sqlc-testdata/pkg.CustomType", "column": "foo.retyped" }, { "go_type": "github.com/lib/pq.StringArray", "column": "foo.langs" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides/sqlite/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override import ( "github.com/sqlc-dev/sqlc-testdata/pkg" ) type Foo struct { Other string Total int64 Retyped pkg.CustomType } ================================================ FILE: internal/endtoend/testdata/overrides/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides/sqlite/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/overrides/sqlite/schema.sql ================================================ CREATE TABLE foo ( other text NOT NULL, total bigint NOT NULL, retyped text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/overrides/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "override", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "go_type": "github.com/sqlc-dev/sqlc-testdata/pkg.CustomType", "column": "foo.retyped" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package query 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package query import ( "database/sql" ) type Author struct { ID int64 Name string Bio sql.NullString Tags []sql.NullInt64 } ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package query import ( "context" ) const getAuthor = `-- name: GetAuthor :one SELECT id, name, bio, tags 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, &i.Tags, ) return i, err } ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text, tags text[] ); ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/pgx/v4/sqlc.json ================================================ { "version": "2", "sql": [{ "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "go": { "sql_package": "pgx/v4", "package": "query", "out": "query", "overrides": [{ "column": "authors.tags", "go_type": { "type": "NullInt64", "import": "database/sql", "slice": true } }] } } }] } ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package query 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package query import ( "database/sql" "github.com/jackc/pgx/v5/pgtype" ) type Author struct { ID int64 Name string Bio pgtype.Text Tags []sql.NullInt64 } ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package query import ( "context" ) const getAuthor = `-- name: GetAuthor :one SELECT id, name, bio, tags 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, &i.Tags, ) return i, err } ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text, tags text[] ); ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/pgx/v5/sqlc.json ================================================ { "version": "2", "sql": [{ "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "go": { "sql_package": "pgx/v5", "package": "query", "out": "query", "overrides": [{ "column": "authors.tags", "go_type": { "type": "NullInt64", "import": "database/sql", "slice": true } }] } } }] } ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/stdlib/query/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package query 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/stdlib/query/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package query import ( "database/sql" ) type Author struct { ID int64 Name string Bio sql.NullString Tags []sql.NullInt64 } ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/stdlib/query/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package query import ( "context" "github.com/lib/pq" ) const getAuthor = `-- name: GetAuthor :one SELECT id, name, bio, tags 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, pq.Array(&i.Tags), ) return i, err } ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/stdlib/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/stdlib/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text, tags text[] ); ================================================ FILE: internal/endtoend/testdata/overrides_array/postgresql/stdlib/sqlc.json ================================================ { "version": "2", "sql": [{ "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "go": { "package": "query", "out": "query", "overrides": [{ "column": "authors.tags", "go_type": { "type": "NullInt64", "import": "database/sql", "slice": true } }] } } }] } ================================================ FILE: internal/endtoend/testdata/overrides_config/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/overrides_config/schema.sql ================================================ CREATE TABLE overrides ( one text NOT NULL, two bigint NOT NULL, three text[] NOT NULL, four bytea NOT NULL, five text[] ); ================================================ FILE: internal/endtoend/testdata/overrides_config/v2/yaml/global/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_config/v2/yaml/global/db/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides_config/v2/yaml/global/db/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides_config/v2/yaml/global/sqlc.yaml ================================================ 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" ================================================ FILE: internal/endtoend/testdata/overrides_config/v2/yaml/global_and_queryset/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_config/v2/yaml/global_and_queryset/db/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides_config/v2/yaml/global_and_queryset/db/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides_config/v2/yaml/global_and_queryset/sqlc.yaml ================================================ 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" ================================================ FILE: internal/endtoend/testdata/overrides_config/v2/yaml/queryset/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_config/v2/yaml/queryset/db/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides_config/v2/yaml/queryset/db/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides_config/v2/yaml/queryset/sqlc.yaml ================================================ 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" ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/invalid_tags/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/invalid_tags/schema.sql ================================================ CREATE TABLE foo ( other text NOT NULL, tagged text NOT NULL ); CREATE TABLE bar ( other text NOT NULL, also_tagged text NOT NULL ); CREATE TABLE baz ( other text NOT NULL, also_tagged text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/invalid_tags/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "override", "engine": "mysql", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "go_struct_tag": "abc", "column": "foo.tagged" }, { "go_struct_tag": "a:b", "column": "*.also_tagged" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/invalid_tags/stderr.txt ================================================ # package override error generating code: bad syntax for struct tag pair ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override type Bar struct { Other string `utype:"notnull_text"` AlsoTagged string `also:"tagged" utype:"notnull_text"` } type Baz struct { Other string `utype:"notnull_text"` AlsoTagged string `also:"tagged" utype:"notnull_text"` } type Foo struct { Other string `utype:"notnull_text"` Tagged string `a:"b" utype:"notnull_text" x:"y,z"` Nulltext string `utype:"nullable_text"` } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/mysql/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/mysql/schema.sql ================================================ CREATE TABLE foo ( other text NOT NULL, tagged text NOT NULL, nulltext text ); CREATE TABLE bar ( other text NOT NULL, also_tagged text NOT NULL ); CREATE TABLE baz ( other text NOT NULL, also_tagged text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "override", "engine": "mysql", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "go_struct_tag": "a:\"b\" x:\"y,z\"", "column": "foo.tagged" }, { "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\"" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override type Bar struct { 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 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"` } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo ( id text, other_id text, about text, other text, notnulltext text not null ); CREATE TABLE bar ( id text, other_id text, about text, other text ); ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "override", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "column": "*.id", "go_struct_tag": "type:\"id\"" }, { "column": "*.*_id", "go_struct_tag": "type:\"other_id\"" }, { "column": "foo.about", "go_struct_tag": "type:\"about\"" }, { "column": "foo.id", "go_struct_tag": "source:\"foo\"" }, { "column": "*.other", "go_struct_tag": "type:\"other\"" }, { "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\"" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override type Bar struct { 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 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"` } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo ( id text, other_id text, about text, other text, notnulltext text not null ); CREATE TABLE bar ( id text, other_id text, about text, other text ); ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "override", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "column": "*.id", "go_struct_tag": "type:\"id\"" }, { "column": "*.*_id", "go_struct_tag": "type:\"other_id\"" }, { "column": "foo.about", "go_struct_tag": "type:\"about\"" }, { "column": "foo.id", "go_struct_tag": "source:\"foo\"" }, { "column": "*.other", "go_struct_tag": "type:\"other\"" }, { "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\"" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override type Foo struct { ID string `utype:"nullable_text" x:"y"` OtherID string `utype:"nullable_text"` Notnulltext string `utype:"notnull_text"` } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo ( id text, other_id text, notnulltext text not null ); ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "override", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "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\"" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override type Bar struct { 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 `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 `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"` } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/sqlite/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/sqlite/schema.sql ================================================ CREATE TABLE foo ( other text NOT NULL, tagged text NOT NULL, tag3 text NOT NULL, nulltext text ); CREATE TABLE bar ( other text NOT NULL, also_tagged text NOT NULL, tag3 text NOT NULL ); CREATE TABLE baz ( other text NOT NULL, also_tagged text NOT NULL, tag3 text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/overrides_go_struct_tags/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "override", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "go_struct_tag": "a:\"b\" x:\"y,z\"", "column": "foo.tagged" }, { "go_struct_tag": "also:\"tagged\"", "column": "*.also_tagged" }, { "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\"" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/mysql/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override import ( "github.com/sqlc-dev/sqlc-testdata/pkg" ) type Bar struct { Other string Total int64 AlsoRetyped pkg.CustomType } type Baz struct { Other string Total int64 AlsoRetyped pkg.CustomType } type Foo struct { Other string Total int64 Retyped pkg.CustomType } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package override import ( "context" "strings" "github.com/sqlc-dev/sqlc-testdata/pkg" ) const testIN = `-- name: TestIN :many SELECT other, total, retyped FROM foo WHERE retyped IN (/*SLICE:paramname*/?) ` func (q *Queries) TestIN(ctx context.Context, paramname []pkg.CustomType) ([]Foo, error) { query := testIN var queryParams []interface{} if len(paramname) > 0 { for _, v := range paramname { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:paramname*/?", strings.Repeat(",?", len(paramname))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:paramname*/?", "NULL", 1) } rows, err := q.db.QueryContext(ctx, query, queryParams...) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Other, &i.Total, &i.Retyped); 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 } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/mysql/query.sql ================================================ -- name: TestIN :many SELECT * FROM foo WHERE retyped IN (sqlc.slice(paramName)); ================================================ FILE: internal/endtoend/testdata/overrides_go_types/mysql/schema.sql ================================================ CREATE TABLE foo ( other text NOT NULL, total bigint NOT NULL, retyped text NOT NULL ); CREATE TABLE bar ( other text NOT NULL, total bigint NOT NULL, also_retyped text NOT NULL ); CREATE TABLE baz ( other text NOT NULL, total bigint NOT NULL, also_retyped text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/overrides_go_types/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "override", "engine": "mysql", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "go_type": "github.com/sqlc-dev/sqlc-testdata/pkg.CustomType", "column": "foo.retyped" }, { "go_type": "github.com/sqlc-dev/sqlc-testdata/pkg.CustomType", "column": "*.also_retyped" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override import ( "database/sql" orm "database/sql" fuid "github.com/gofrs/uuid" uuid "github.com/gofrs/uuid" null "github.com/volatiletech/null/v8" null_v4 "gopkg.in/guregu/null.v4" ) type Bar struct { ID uuid.UUID OtherID fuid.UUID MoreID fuid.UUID Age sql.NullInt32 Balance sql.NullFloat64 Bio sql.NullString About sql.NullString } type Foo struct { ID uuid.UUID OtherID fuid.UUID Age orm.NullInt32 Balance null.Float32 Bio null_v4.String About *string } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package override import ( "context" orm "database/sql" fuid "github.com/gofrs/uuid" uuid "github.com/gofrs/uuid" null "github.com/volatiletech/null/v8" null_v4 "gopkg.in/guregu/null.v4" ) const loadFoo = `-- name: LoadFoo :many SELECT id, other_id, age, balance, bio, about FROM foo WHERE id = $1 ` func (q *Queries) LoadFoo(ctx context.Context, id uuid.UUID) ([]Foo, error) { rows, err := q.db.Query(ctx, loadFoo, id) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan( &i.ID, &i.OtherID, &i.Age, &i.Balance, &i.Bio, &i.About, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const loadFooWithAliases = `-- name: LoadFooWithAliases :many SELECT id AS aliased_id, other_id AS aliased_other_id, age AS aliased_age, balance AS aliased_balance, bio AS aliased_bio, about AS aliased_about FROM foo WHERE id = $1 ` type LoadFooWithAliasesRow struct { AliasedID uuid.UUID AliasedOtherID fuid.UUID AliasedAge orm.NullInt32 AliasedBalance null.Float32 AliasedBio null_v4.String AliasedAbout *string } func (q *Queries) LoadFooWithAliases(ctx context.Context, namedParameterID uuid.UUID) ([]LoadFooWithAliasesRow, error) { rows, err := q.db.Query(ctx, loadFooWithAliases, namedParameterID) if err != nil { return nil, err } defer rows.Close() var items []LoadFooWithAliasesRow for rows.Next() { var i LoadFooWithAliasesRow if err := rows.Scan( &i.AliasedID, &i.AliasedOtherID, &i.AliasedAge, &i.AliasedBalance, &i.AliasedBio, &i.AliasedAbout, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/query.sql ================================================ -- name: LoadFoo :many SELECT * FROM foo WHERE id = $1; -- name: LoadFooWithAliases :many SELECT id AS aliased_id, other_id AS aliased_other_id, age AS aliased_age, balance AS aliased_balance, bio AS aliased_bio, about AS aliased_about FROM foo WHERE id = @named_parameter_id; ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo ( id uuid NOT NULL, other_id uuid NOT NULL, age integer, balance double precision, bio text, about text ); CREATE TABLE bar ( id uuid NOT NULL, other_id uuid NOT NULL, more_id uuid NOT NULL, age integer, balance double precision, bio text, about text ); ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "override", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "column": "*.id", "go_type": { "import": "github.com/gofrs/uuid", "package": "uuid", "type": "UUID" } }, { "column": "*.*_id", "go_type": { "import": "github.com/gofrs/uuid", "package": "fuid", "type": "UUID" } }, { "column": "foo.age", "nullable": true, "go_type": { "import": "database/sql", "package": "orm", "type": "NullInt32" } }, { "column": "foo.balance", "nullable": true, "go_type": { "import": "github.com/volatiletech/null/v8", "type": "Float32" } }, { "column": "foo.bio", "nullable": true, "go_type": { "import": "gopkg.in/guregu/null.v4", "type": "String" } }, { "column": "foo.about", "nullable": true, "go_type": { "type": "string", "pointer": true } } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override import ( orm "database/sql" fuid "github.com/gofrs/uuid" uuid "github.com/gofrs/uuid" "github.com/jackc/pgx/v5/pgtype" null "github.com/volatiletech/null/v8" null_v4 "gopkg.in/guregu/null.v4" ) type Bar struct { ID uuid.UUID OtherID fuid.UUID MoreID fuid.UUID Age pgtype.Int4 Balance pgtype.Float8 Bio pgtype.Text About pgtype.Text } type Foo struct { ID uuid.UUID OtherID fuid.UUID Age orm.NullInt32 Balance null.Float32 Bio null_v4.String About *string } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package override import ( "context" uuid "github.com/gofrs/uuid" ) const loadFoo = `-- name: LoadFoo :many SELECT id, other_id, age, balance, bio, about FROM foo WHERE id = $1 ` func (q *Queries) LoadFoo(ctx context.Context, id uuid.UUID) ([]Foo, error) { rows, err := q.db.Query(ctx, loadFoo, id) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan( &i.ID, &i.OtherID, &i.Age, &i.Balance, &i.Bio, &i.About, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/query.sql ================================================ -- name: LoadFoo :many SELECT * FROM foo WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo ( id uuid NOT NULL, other_id uuid NOT NULL, age integer, balance double precision, bio text, about text ); CREATE TABLE bar ( id uuid NOT NULL, other_id uuid NOT NULL, more_id uuid NOT NULL, age integer, balance double precision, bio text, about text ); ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "override", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "column": "*.id", "go_type": { "import": "github.com/gofrs/uuid", "package": "uuid", "type": "UUID" } }, { "column": "*.*_id", "go_type": { "import": "github.com/gofrs/uuid", "package": "fuid", "type": "UUID" } }, { "column": "foo.age", "nullable": true, "go_type": { "import": "database/sql", "package": "orm", "type": "NullInt32" } }, { "column": "foo.balance", "nullable": true, "go_type": { "import": "github.com/volatiletech/null/v8", "type": "Float32" } }, { "column": "foo.bio", "nullable": true, "go_type": { "import": "gopkg.in/guregu/null.v4", "type": "String" } }, { "column": "foo.about", "nullable": true, "go_type": { "type": "string", "pointer": true } } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override import ( orm "database/sql" "github.com/gofrs/uuid" fuid "github.com/gofrs/uuid" null "github.com/volatiletech/null/v8" null_v4 "gopkg.in/guregu/null.v4" ) type Foo struct { ID uuid.UUID OtherID fuid.UUID Age orm.NullInt32 Balance null.Float32 Bio null_v4.String About *string } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package override import ( "context" "github.com/gofrs/uuid" ) const loadFoo = `-- name: LoadFoo :many SELECT id, other_id, age, balance, bio, about FROM foo WHERE id = $1 ` func (q *Queries) LoadFoo(ctx context.Context, id uuid.UUID) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, loadFoo, id) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan( &i.ID, &i.OtherID, &i.Age, &i.Balance, &i.Bio, &i.About, ); 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 } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/query.sql ================================================ -- name: LoadFoo :many SELECT * FROM foo WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo ( id uuid NOT NULL, other_id uuid NOT NULL, age integer, balance double precision, bio text, about text ); ================================================ FILE: internal/endtoend/testdata/overrides_go_types/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "override", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "column": "foo.id", "go_type": { "import": "github.com/gofrs/uuid", "type": "UUID" } }, { "column": "foo.other_id", "go_type": { "import": "github.com/gofrs/uuid", "package": "fuid", "type": "UUID" } }, { "column": "foo.age", "nullable": true, "go_type": { "import": "database/sql", "package": "orm", "type": "NullInt32" } }, { "column": "foo.balance", "nullable": true, "go_type": { "import": "github.com/volatiletech/null/v8", "type": "Float32" } }, { "column": "foo.bio", "nullable": true, "go_type": { "import": "gopkg.in/guregu/null.v4", "type": "String" } }, { "column": "foo.about", "nullable": true, "go_type": { "type": "string", "pointer": true } } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/sqlite/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override import ( "github.com/sqlc-dev/sqlc-testdata/pkg" ) type Bar struct { Other string Total int64 AlsoRetyped pkg.CustomType } type Baz struct { Other string Total int64 AlsoRetyped pkg.CustomType } type Foo struct { Other string Total int64 Retyped pkg.CustomType } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/overrides_go_types/sqlite/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/overrides_go_types/sqlite/schema.sql ================================================ CREATE TABLE foo ( other text NOT NULL, total bigint NOT NULL, retyped text NOT NULL ); CREATE TABLE bar ( other text NOT NULL, total bigint NOT NULL, also_retyped text NOT NULL ); CREATE TABLE baz ( other text NOT NULL, total bigint NOT NULL, also_retyped text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/overrides_go_types/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "override", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "go_type": "github.com/sqlc-dev/sqlc-testdata/pkg.CustomType", "column": "foo.retyped" }, { "go_type": "github.com/sqlc-dev/sqlc-testdata/pkg.CustomType", "column": "*.also_retyped" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgtype" ) type Foo struct { Bar pgtype.Text Bam pgtype.Name Baz pgtype.Name } ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listFoo = `-- name: ListFoo :many SELECT bar, bam, baz FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Bar, &i.Bam, &i.Baz); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo ( bar text, bam name, baz name not null ); ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ], "overrides": [ { "db_type": "name", "go_type": "github.com/jackc/pgtype.Name" }, { "db_type": "name", "go_type": "github.com/jackc/pgtype.Name", "nullable": true }, { "db_type": "text", "go_type": "github.com/jackc/pgtype.Text", "null": true } ] } ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar pgtype.UndecodedBytes Bam pgtype.DriverBytes Baz pgtype.Text } ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listFoo = `-- name: ListFoo :many SELECT bar, bam, baz FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Bar, &i.Bam, &i.Baz); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo ( bar text, bam jsonb, baz jsonb not null ); ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ], "overrides": [ { "db_type": "jsonb", "go_type": "github.com/jackc/pgx/v5/pgtype.Text" }, { "db_type": "jsonb", "go_type": "github.com/jackc/pgx/v5/pgtype.DriverBytes", "nullable": true }, { "db_type": "text", "go_type": "github.com/jackc/pgx/v5/pgtype.UndecodedBytes", "null": true } ] } ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgtype" ) type Foo struct { Bar pgtype.Text Bam pgtype.Name Baz pgtype.Name } ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listFoo = `-- name: ListFoo :many SELECT bar, bam, baz FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Bar, &i.Bam, &i.Baz); 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 } ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo ( bar text, bam name, baz name not null ); ================================================ FILE: internal/endtoend/testdata/overrides_nullable/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ], "overrides": [ { "db_type": "name", "go_type": "github.com/jackc/pgtype.Name" }, { "db_type": "name", "go_type": "github.com/jackc/pgtype.Name", "nullable": true }, { "db_type": "text", "go_type": "github.com/jackc/pgtype.Text", "null": true } ] } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/mysql/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override import ( t "github.com/jackc/pgtype" ) type Foo struct { Other string Total int64 Retyped *t.Text } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package override import ( "context" t "github.com/jackc/pgtype" ) const test = `-- name: test :exec SELECT other, total, retyped FROM foo WHERE other = ? and retyped = ? ` type testParams struct { Other string Retyped *t.Text } func (q *Queries) test(ctx context.Context, arg testParams) error { _, err := q.db.ExecContext(ctx, test, arg.Other, arg.Retyped) return err } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/mysql/query.sql ================================================ -- name: test :exec SELECT * FROM foo WHERE other = ? and retyped = ?; ================================================ FILE: internal/endtoend/testdata/overrides_pointers/mysql/schema.sql ================================================ CREATE TABLE foo ( other text NOT NULL, total bigint NOT NULL, retyped text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/overrides_pointers/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "override", "engine": "mysql", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "go_type": { "import": "github.com/jackc/pgtype", "type": "Text", "package": "t", "pointer": true }, "column": "foo.retyped" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override import ( t "github.com/jackc/pgtype" ) type Foo struct { Other string Total int64 Tags []string ByteSeq []byte Retyped string Langs *t.Text } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package override import ( "context" t "github.com/jackc/pgtype" ) const test = `-- name: test :exec UPDATE foo SET langs = $1 ` func (q *Queries) test(ctx context.Context, langs *t.Text) error { _, err := q.db.Exec(ctx, test, langs) return err } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/query.sql ================================================ -- name: test :exec UPDATE foo SET langs = $1; ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo ( other text NOT NULL, total bigint NOT NULL, tags text[] NOT NULL, byte_seq bytea NOT NULL, retyped text NOT NULL, langs text[] ); ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "override", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "go_type": { "import": "github.com/jackc/pgtype", "type": "Text", "package": "t", "pointer": true }, "column": "foo.langs" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override import ( t "github.com/jackc/pgtype" ) type Foo struct { Other string Total int64 Tags []string ByteSeq []byte Retyped string Langs *t.Text } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package override import ( "context" t "github.com/jackc/pgtype" ) const test = `-- name: test :exec UPDATE foo SET langs = $1 ` func (q *Queries) test(ctx context.Context, langs *t.Text) error { _, err := q.db.Exec(ctx, test, langs) return err } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/query.sql ================================================ -- name: test :exec UPDATE foo SET langs = $1; ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo ( other text NOT NULL, total bigint NOT NULL, tags text[] NOT NULL, byte_seq bytea NOT NULL, retyped text NOT NULL, langs text[] ); ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "override", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "go_type": { "import": "github.com/jackc/pgtype", "type": "Text", "package": "t", "pointer": true }, "column": "foo.langs" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override import ( t "github.com/jackc/pgtype" ) type Foo struct { Other string Total int64 Tags []string ByteSeq []byte Retyped string Langs *t.Text } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package override import ( "context" t "github.com/jackc/pgtype" ) const test = `-- name: test :exec UPDATE foo SET langs = $1 ` func (q *Queries) test(ctx context.Context, langs *t.Text) error { _, err := q.db.ExecContext(ctx, test, langs) return err } ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/query.sql ================================================ -- name: test :exec UPDATE foo SET langs = $1; ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo ( other text NOT NULL, total bigint NOT NULL, tags text[] NOT NULL, byte_seq bytea NOT NULL, retyped text NOT NULL, langs text[] ); ================================================ FILE: internal/endtoend/testdata/overrides_pointers/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "override", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "overrides": [ { "go_type": { "import": "github.com/jackc/pgtype", "type": "Text", "package": "t", "pointer": true }, "column": "foo.langs" } ] } ] } ================================================ FILE: internal/endtoend/testdata/overrides_result_tag/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_result_tag/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "github.com/google/uuid" ) type Account struct { ID uuid.UUID `sometagtype:"some_value"` State sql.NullString } type UsersAccount struct { Id2 uuid.UUID Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/overrides_result_tag/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "github.com/google/uuid" ) const findAccount = `-- name: FindAccount :one SELECT a.id, a.state, ua.name -- other fields FROM accounts a INNER JOIN users_accounts ua ON a.id = ua.id2 WHERE a.id = $1 ` type FindAccountRow struct { ID uuid.UUID `sometagtype:"some_value"` State sql.NullString Name sql.NullString } func (q *Queries) FindAccount(ctx context.Context, accountID uuid.UUID) (FindAccountRow, error) { row := q.db.QueryRowContext(ctx, findAccount, accountID) var i FindAccountRow err := row.Scan(&i.ID, &i.State, &i.Name) return i, err } ================================================ FILE: internal/endtoend/testdata/overrides_result_tag/stdlib/query.sql ================================================ -- name: FindAccount :one SELECT a.*, ua.name -- other fields FROM accounts a INNER JOIN users_accounts ua ON a.id = ua.id2 WHERE a.id = @account_id; ================================================ FILE: internal/endtoend/testdata/overrides_result_tag/stdlib/schema.sql ================================================ CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE public.accounts ( id uuid DEFAULT public.uuid_generate_v4() NOT NULL, state character varying ); CREATE TABLE public.users_accounts ( ID2 uuid DEFAULT public.uuid_generate_v4() NOT NULL, name character varying ); ================================================ FILE: internal/endtoend/testdata/overrides_result_tag/stdlib/sqlc.yaml ================================================ version: "2" sql: - schema: "schema.sql" queries: "query.sql" engine: "postgresql" gen: go: package: "querytest" out: "go" overrides: - column: accounts.id go_struct_tag: sometagtype:"some_value" ================================================ FILE: internal/endtoend/testdata/overrides_unsigned/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/overrides_unsigned/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" ) type Author struct { ID int64 Name string Rating int64 Score uint32 Bio sql.NullString } ================================================ FILE: internal/endtoend/testdata/overrides_unsigned/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" "database/sql" ) const createAuthor = `-- name: CreateAuthor :exec INSERT INTO authors ( name, bio ) VALUES ( ?, ? ) ` type CreateAuthorParams struct { Name string Bio sql.NullString } func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) error { _, err := q.db.ExecContext(ctx, createAuthor, arg.Name, arg.Bio) return err } 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 getAuthor = `-- name: GetAuthor :one SELECT id, name, rating, score, bio FROM authors WHERE id = ? 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.Rating, &i.Score, &i.Bio, ) return i, err } const listAuthors = `-- name: ListAuthors :many SELECT id, name, rating, score, 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.Rating, &i.Score, &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 } ================================================ FILE: internal/endtoend/testdata/overrides_unsigned/mysql/query.sql ================================================ -- name: ListAuthors :many SELECT * FROM authors ORDER BY name; -- name: GetAuthor :one SELECT * FROM authors WHERE id = ? LIMIT 1; -- name: CreateAuthor :exec INSERT INTO authors ( name, bio ) VALUES ( ?, ? ); -- name: DeleteAuthor :exec DELETE FROM authors WHERE id = ?; ================================================ FILE: internal/endtoend/testdata/overrides_unsigned/mysql/schema.sql ================================================ CREATE TABLE authors ( id SERIAL, name text NOT NULL, rating bigint NOT NULL, score int UNSIGNED NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/overrides_unsigned/mysql/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "mysql", "gen": { "go": { "package": "db", "out": "go", "overrides": [ { "db_type": "bigint", "go_type": "int64", "unsigned": true } ] } } } ] } ================================================ FILE: internal/endtoend/testdata/params_duplicate/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/params_duplicate/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 FirstName sql.NullString LastName sql.NullString } ================================================ FILE: internal/endtoend/testdata/params_duplicate/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const selectUserByID = `-- name: SelectUserByID :many SELECT first_name from users where (? = id OR ? = 0) ` type SelectUserByIDParams struct { ID int32 } func (q *Queries) SelectUserByID(ctx context.Context, arg SelectUserByIDParams) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, selectUserByID, arg.ID, arg.ID) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var first_name sql.NullString if err := rows.Scan(&first_name); err != nil { return nil, err } items = append(items, first_name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const selectUserByName = `-- name: SelectUserByName :many SELECT first_name FROM users WHERE first_name = ? OR last_name = ? ` type SelectUserByNameParams struct { Name sql.NullString } func (q *Queries) SelectUserByName(ctx context.Context, arg SelectUserByNameParams) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, selectUserByName, arg.Name, arg.Name) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var first_name sql.NullString if err := rows.Scan(&first_name); err != nil { return nil, err } items = append(items, first_name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const selectUserQuestion = `-- name: SelectUserQuestion :many SELECT first_name from users where (? = id OR ? = 0) ` type SelectUserQuestionParams struct { ID int32 Column2 interface{} } func (q *Queries) SelectUserQuestion(ctx context.Context, arg SelectUserQuestionParams) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, selectUserQuestion, arg.ID, arg.Column2) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var first_name sql.NullString if err := rows.Scan(&first_name); err != nil { return nil, err } items = append(items, first_name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/params_duplicate/mysql/query.sql ================================================ /* name: SelectUserByID :many */ SELECT first_name from users where (sqlc.arg(id) = id OR sqlc.arg(id) = 0); /* name: SelectUserByName :many */ SELECT first_name FROM users WHERE first_name = sqlc.arg(name) OR last_name = sqlc.arg(name); /* name: SelectUserQuestion :many */ SELECT first_name from users where (? = id OR ? = 0); ================================================ FILE: internal/endtoend/testdata/params_duplicate/mysql/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name varchar(255), last_name varchar(255) ) ENGINE=InnoDB; ================================================ FILE: internal/endtoend/testdata/params_duplicate/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "mysql" } ] } ================================================ FILE: internal/endtoend/testdata/params_duplicate/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/params_duplicate/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 FirstName sql.NullString LastName sql.NullString } ================================================ FILE: internal/endtoend/testdata/params_duplicate/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const selectUserByID = `-- name: SelectUserByID :many SELECT first_name from users where ($1 = id OR $1 = 0) ` func (q *Queries) SelectUserByID(ctx context.Context, id int32) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, selectUserByID, id) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var first_name sql.NullString if err := rows.Scan(&first_name); err != nil { return nil, err } items = append(items, first_name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const selectUserByName = `-- name: SelectUserByName :many SELECT first_name FROM users WHERE first_name = $1 OR last_name = $1 ` func (q *Queries) SelectUserByName(ctx context.Context, name sql.NullString) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, selectUserByName, name) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var first_name sql.NullString if err := rows.Scan(&first_name); err != nil { return nil, err } items = append(items, first_name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const selectUserQuestion = `-- name: SelectUserQuestion :many SELECT first_name from users where ($1 = id OR $1 = 0) ` func (q *Queries) SelectUserQuestion(ctx context.Context, id int32) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, selectUserQuestion, id) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var first_name sql.NullString if err := rows.Scan(&first_name); err != nil { return nil, err } items = append(items, first_name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/params_duplicate/postgresql/query.sql ================================================ /* name: SelectUserByID :many */ SELECT first_name from users where (sqlc.arg(id) = id OR sqlc.arg(id) = 0); /* name: SelectUserByName :many */ SELECT first_name FROM users WHERE first_name = sqlc.arg(name) OR last_name = sqlc.arg(name); /* name: SelectUserQuestion :many */ SELECT first_name from users where ($1 = id OR $1 = 0); ================================================ FILE: internal/endtoend/testdata/params_duplicate/postgresql/schema.sql ================================================ CREATE TABLE users ( id INT PRIMARY KEY, first_name varchar(255), last_name varchar(255) ); ================================================ FILE: internal/endtoend/testdata/params_duplicate/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql" } ] } ================================================ FILE: internal/endtoend/testdata/params_go_keywords/issue.md ================================================ # TODO ================================================ FILE: internal/endtoend/testdata/params_go_keywords/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/params_go_keywords/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type GoKeyword struct { Break pgtype.Text Default pgtype.Text Func pgtype.Text Interface pgtype.Text Select pgtype.Text Case pgtype.Text Defer pgtype.Text Go pgtype.Text Map pgtype.Text Struct pgtype.Text Chan pgtype.Text Else pgtype.Text Goto pgtype.Text Package pgtype.Text Switch pgtype.Text Const pgtype.Text Fallthrough pgtype.Text If pgtype.Text Range pgtype.Text Type pgtype.Text Continue pgtype.Text For pgtype.Text Import pgtype.Text Return pgtype.Text Var pgtype.Text Q pgtype.Text } ================================================ FILE: internal/endtoend/testdata/params_go_keywords/postgresql/go/query.sql.go ================================================ // 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 keywordBreak = `-- name: KeywordBreak :exec SELECT $1::text ` func (q *Queries) KeywordBreak(ctx context.Context, break_ string) error { _, err := q.db.Exec(ctx, keywordBreak, break_) return err } const keywordCase = `-- name: KeywordCase :exec SELECT $1::text ` func (q *Queries) KeywordCase(ctx context.Context, case_ string) error { _, err := q.db.Exec(ctx, keywordCase, case_) return err } const keywordChan = `-- name: KeywordChan :exec SELECT $1::text ` func (q *Queries) KeywordChan(ctx context.Context, chan_ string) error { _, err := q.db.Exec(ctx, keywordChan, chan_) return err } const keywordConst = `-- name: KeywordConst :exec SELECT $1::text ` func (q *Queries) KeywordConst(ctx context.Context, const_ string) error { _, err := q.db.Exec(ctx, keywordConst, const_) return err } const keywordContinue = `-- name: KeywordContinue :exec SELECT $1::text ` func (q *Queries) KeywordContinue(ctx context.Context, continue_ string) error { _, err := q.db.Exec(ctx, keywordContinue, continue_) return err } const keywordDefault = `-- name: KeywordDefault :exec SELECT $1::text ` func (q *Queries) KeywordDefault(ctx context.Context, default_ string) error { _, err := q.db.Exec(ctx, keywordDefault, default_) return err } const keywordDefer = `-- name: KeywordDefer :exec SELECT $1::text ` func (q *Queries) KeywordDefer(ctx context.Context, defer_ string) error { _, err := q.db.Exec(ctx, keywordDefer, defer_) return err } const keywordElse = `-- name: KeywordElse :exec SELECT $1::text ` func (q *Queries) KeywordElse(ctx context.Context, else_ string) error { _, err := q.db.Exec(ctx, keywordElse, else_) return err } const keywordFallthrough = `-- name: KeywordFallthrough :exec SELECT $1::text ` func (q *Queries) KeywordFallthrough(ctx context.Context, fallthrough_ string) error { _, err := q.db.Exec(ctx, keywordFallthrough, fallthrough_) return err } const keywordFor = `-- name: KeywordFor :exec SELECT $1::text ` func (q *Queries) KeywordFor(ctx context.Context, for_ string) error { _, err := q.db.Exec(ctx, keywordFor, for_) return err } const keywordFunc = `-- name: KeywordFunc :exec SELECT $1::text ` func (q *Queries) KeywordFunc(ctx context.Context, func_ string) error { _, err := q.db.Exec(ctx, keywordFunc, func_) return err } const keywordGo = `-- name: KeywordGo :exec SELECT $1::text ` func (q *Queries) KeywordGo(ctx context.Context, go_ string) error { _, err := q.db.Exec(ctx, keywordGo, go_) return err } const keywordGoto = `-- name: KeywordGoto :exec SELECT $1::text ` func (q *Queries) KeywordGoto(ctx context.Context, goto_ string) error { _, err := q.db.Exec(ctx, keywordGoto, goto_) return err } const keywordIf = `-- name: KeywordIf :exec SELECT $1::text ` func (q *Queries) KeywordIf(ctx context.Context, if_ string) error { _, err := q.db.Exec(ctx, keywordIf, if_) return err } const keywordImport = `-- name: KeywordImport :exec SELECT $1::text ` func (q *Queries) KeywordImport(ctx context.Context, import_ string) error { _, err := q.db.Exec(ctx, keywordImport, import_) return err } const keywordInterface = `-- name: KeywordInterface :exec SELECT $1::text ` func (q *Queries) KeywordInterface(ctx context.Context, interface_ string) error { _, err := q.db.Exec(ctx, keywordInterface, interface_) return err } const keywordMap = `-- name: KeywordMap :exec SELECT $1::text ` func (q *Queries) KeywordMap(ctx context.Context, map_ string) error { _, err := q.db.Exec(ctx, keywordMap, map_) return err } const keywordPackage = `-- name: KeywordPackage :exec SELECT $1::text ` func (q *Queries) KeywordPackage(ctx context.Context, package_ string) error { _, err := q.db.Exec(ctx, keywordPackage, package_) return err } const 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 ` func (q *Queries) KeywordRange(ctx context.Context, range_ string) error { _, err := q.db.Exec(ctx, keywordRange, range_) return err } const keywordReturn = `-- name: KeywordReturn :exec SELECT $1::text ` func (q *Queries) KeywordReturn(ctx context.Context, return_ string) error { _, err := q.db.Exec(ctx, keywordReturn, return_) return err } const keywordSelect = `-- name: KeywordSelect :exec SELECT $1::text ` func (q *Queries) KeywordSelect(ctx context.Context, select_ string) error { _, err := q.db.Exec(ctx, keywordSelect, select_) return err } const keywordStruct = `-- name: KeywordStruct :exec SELECT $1::text ` func (q *Queries) KeywordStruct(ctx context.Context, struct_ string) error { _, err := q.db.Exec(ctx, keywordStruct, struct_) return err } const keywordSwitch = `-- name: KeywordSwitch :exec SELECT $1::text ` func (q *Queries) KeywordSwitch(ctx context.Context, switch_ string) error { _, err := q.db.Exec(ctx, keywordSwitch, switch_) return err } const keywordType = `-- name: KeywordType :exec SELECT $1::text ` func (q *Queries) KeywordType(ctx context.Context, type_ string) error { _, err := q.db.Exec(ctx, keywordType, type_) return err } const keywordVar = `-- name: KeywordVar :exec SELECT $1::text ` func (q *Queries) KeywordVar(ctx context.Context, var_ string) error { _, err := q.db.Exec(ctx, keywordVar, var_) return err } const selectBreak = `-- name: SelectBreak :one SELECT "break" FROM go_keywords ` func (q *Queries) SelectBreak(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectBreak) var break_ pgtype.Text err := row.Scan(&break_) return break_, err } const selectCase = `-- name: SelectCase :one SELECT "case" FROM go_keywords ` func (q *Queries) SelectCase(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectCase) var case_ pgtype.Text err := row.Scan(&case_) return case_, err } const selectChan = `-- name: SelectChan :one SELECT "chan" FROM go_keywords ` func (q *Queries) SelectChan(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectChan) var chan_ pgtype.Text err := row.Scan(&chan_) return chan_, err } const selectConst = `-- name: SelectConst :one SELECT "const" FROM go_keywords ` func (q *Queries) SelectConst(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectConst) var const_ pgtype.Text err := row.Scan(&const_) return const_, err } const selectContinue = `-- name: SelectContinue :one SELECT "continue" FROM go_keywords ` func (q *Queries) SelectContinue(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectContinue) var continue_ pgtype.Text err := row.Scan(&continue_) return continue_, err } const selectDefault = `-- name: SelectDefault :one SELECT "default" FROM go_keywords ` func (q *Queries) SelectDefault(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectDefault) var default_ pgtype.Text err := row.Scan(&default_) return default_, err } const selectDefer = `-- name: SelectDefer :one SELECT "defer" FROM go_keywords ` func (q *Queries) SelectDefer(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectDefer) var defer_ pgtype.Text err := row.Scan(&defer_) return defer_, err } const selectElse = `-- name: SelectElse :one SELECT "else" FROM go_keywords ` func (q *Queries) SelectElse(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectElse) var else_ pgtype.Text err := row.Scan(&else_) return else_, err } const selectFallthrough = `-- name: SelectFallthrough :one SELECT "fallthrough" FROM go_keywords ` func (q *Queries) SelectFallthrough(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectFallthrough) var fallthrough_ pgtype.Text err := row.Scan(&fallthrough_) return fallthrough_, err } const selectFor = `-- name: SelectFor :one SELECT "for" FROM go_keywords ` func (q *Queries) SelectFor(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectFor) var for_ pgtype.Text err := row.Scan(&for_) return for_, err } const selectFunc = `-- name: SelectFunc :one SELECT "func" FROM go_keywords ` func (q *Queries) SelectFunc(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectFunc) var func_ pgtype.Text err := row.Scan(&func_) return func_, err } const selectGo = `-- name: SelectGo :one SELECT "go" FROM go_keywords ` func (q *Queries) SelectGo(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectGo) var go_ pgtype.Text err := row.Scan(&go_) return go_, err } const selectGoto = `-- name: SelectGoto :one SELECT "goto" FROM go_keywords ` func (q *Queries) SelectGoto(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectGoto) var goto_ pgtype.Text err := row.Scan(&goto_) return goto_, err } const selectIf = `-- name: SelectIf :one SELECT "if" FROM go_keywords ` func (q *Queries) SelectIf(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectIf) var if_ pgtype.Text err := row.Scan(&if_) return if_, err } const selectImport = `-- name: SelectImport :one SELECT "import" FROM go_keywords ` func (q *Queries) SelectImport(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectImport) var import_ pgtype.Text err := row.Scan(&import_) return import_, err } const selectInterface = `-- name: SelectInterface :one SELECT "interface" FROM go_keywords ` func (q *Queries) SelectInterface(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectInterface) var interface_ pgtype.Text err := row.Scan(&interface_) return interface_, err } const selectMap = `-- name: SelectMap :one SELECT "map" FROM go_keywords ` func (q *Queries) SelectMap(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectMap) var map_ pgtype.Text err := row.Scan(&map_) return map_, err } const selectPackage = `-- name: SelectPackage :one SELECT "package" FROM go_keywords ` func (q *Queries) SelectPackage(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectPackage) var package_ pgtype.Text err := row.Scan(&package_) return package_, err } const 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 ` func (q *Queries) SelectRange(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectRange) var range_ pgtype.Text err := row.Scan(&range_) return range_, err } const selectReturn = `-- name: SelectReturn :one SELECT "return" FROM go_keywords ` func (q *Queries) SelectReturn(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectReturn) var return_ pgtype.Text err := row.Scan(&return_) return return_, err } const selectSelect = `-- name: SelectSelect :one SELECT "select" FROM go_keywords ` func (q *Queries) SelectSelect(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectSelect) var select_ pgtype.Text err := row.Scan(&select_) return select_, err } const selectStruct = `-- name: SelectStruct :one SELECT "struct" FROM go_keywords ` func (q *Queries) SelectStruct(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectStruct) var struct_ pgtype.Text err := row.Scan(&struct_) return struct_, err } const selectSwitch = `-- name: SelectSwitch :one SELECT "switch" FROM go_keywords ` func (q *Queries) SelectSwitch(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectSwitch) var switch_ pgtype.Text err := row.Scan(&switch_) return switch_, err } const selectType = `-- name: SelectType :one SELECT "type" FROM go_keywords ` func (q *Queries) SelectType(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectType) var type_ pgtype.Text err := row.Scan(&type_) return type_, err } const selectVar = `-- name: SelectVar :one SELECT "var" FROM go_keywords ` func (q *Queries) SelectVar(ctx context.Context) (pgtype.Text, error) { row := q.db.QueryRow(ctx, selectVar) var var_ pgtype.Text err := row.Scan(&var_) return var_, err } ================================================ FILE: internal/endtoend/testdata/params_go_keywords/postgresql/query.sql ================================================ -- name: KeywordBreak :exec SELECT sqlc.arg('break')::text; -- name: KeywordDefault :exec SELECT sqlc.arg('default')::text; -- name: KeywordFunc :exec SELECT sqlc.arg('func')::text; -- name: KeywordInterface :exec SELECT sqlc.arg('interface')::text; -- name: KeywordSelect :exec SELECT sqlc.arg('select')::text; -- name: KeywordCase :exec SELECT sqlc.arg('case')::text; -- name: KeywordDefer :exec SELECT sqlc.arg('defer')::text; -- name: KeywordGo :exec SELECT sqlc.arg('go')::text; -- name: KeywordMap :exec SELECT sqlc.arg('map')::text; -- name: KeywordStruct :exec SELECT sqlc.arg('struct')::text; -- name: KeywordChan :exec SELECT sqlc.arg('chan')::text; -- name: KeywordElse :exec SELECT sqlc.arg('else')::text; -- name: KeywordGoto :exec SELECT sqlc.arg('goto')::text; -- name: KeywordPackage :exec SELECT sqlc.arg('package')::text; -- name: KeywordSwitch :exec SELECT sqlc.arg('switch')::text; -- name: KeywordConst :exec SELECT sqlc.arg('const')::text; -- name: KeywordFallthrough :exec SELECT sqlc.arg('fallthrough')::text; -- name: KeywordIf :exec SELECT sqlc.arg('if')::text; -- name: KeywordRange :exec SELECT sqlc.arg('range')::text; -- name: KeywordType :exec SELECT sqlc.arg('type')::text; -- name: KeywordContinue :exec SELECT sqlc.arg('continue')::text; -- name: KeywordFor :exec SELECT sqlc.arg('for')::text; -- name: KeywordImport :exec SELECT sqlc.arg('import')::text; -- name: KeywordReturn :exec SELECT sqlc.arg('return')::text; -- name: KeywordVar :exec SELECT sqlc.arg('var')::text; -- name: KeywordQ :exec SELECT sqlc.arg('q')::text; -- name: SelectBreak :one SELECT "break" FROM go_keywords; -- name: SelectDefault :one SELECT "default" FROM go_keywords; -- name: SelectFunc :one SELECT "func" FROM go_keywords; -- name: SelectInterface :one SELECT "interface" FROM go_keywords; -- name: SelectSelect :one SELECT "select" FROM go_keywords; -- name: SelectCase :one SELECT "case" FROM go_keywords; -- name: SelectDefer :one SELECT "defer" FROM go_keywords; -- name: SelectGo :one SELECT "go" FROM go_keywords; -- name: SelectMap :one SELECT "map" FROM go_keywords; -- name: SelectStruct :one SELECT "struct" FROM go_keywords; -- name: SelectChan :one SELECT "chan" FROM go_keywords; -- name: SelectElse :one SELECT "else" FROM go_keywords; -- name: SelectGoto :one SELECT "goto" FROM go_keywords; -- name: SelectPackage :one SELECT "package" FROM go_keywords; -- name: SelectSwitch :one SELECT "switch" FROM go_keywords; -- name: SelectConst :one SELECT "const" FROM go_keywords; -- name: SelectFallthrough :one SELECT "fallthrough" FROM go_keywords; -- name: SelectIf :one SELECT "if" FROM go_keywords; -- name: SelectRange :one SELECT "range" FROM go_keywords; -- name: SelectType :one SELECT "type" FROM go_keywords; -- name: SelectContinue :one SELECT "continue" FROM go_keywords; -- name: SelectFor :one SELECT "for" FROM go_keywords; -- name: SelectImport :one SELECT "import" FROM go_keywords; -- name: SelectReturn :one SELECT "return" FROM go_keywords; -- name: SelectVar :one SELECT "var" FROM go_keywords; -- name: SelectQ :one SELECT "q" FROM go_keywords; ================================================ FILE: internal/endtoend/testdata/params_go_keywords/postgresql/schema.sql ================================================ CREATE TABLE go_keywords ( "break" TEXT, "default" TEXT, "func" TEXT, "interface" TEXT, "select" TEXT, "case" TEXT, "defer" TEXT, "go" TEXT, "map" TEXT, "struct" TEXT, "chan" TEXT, "else" TEXT, "goto" TEXT, "package" TEXT, "switch" TEXT, "const" TEXT, "fallthrough" TEXT, "if" TEXT, "range" TEXT, "type" TEXT, "continue" TEXT, "for" TEXT, "import" TEXT, "return" TEXT, "var" TEXT, "q" TEXT ); ================================================ FILE: internal/endtoend/testdata/params_go_keywords/postgresql/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/params_in_nested_func/mysql/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/params_in_nested_func/mysql/db/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/params_in_nested_func/mysql/db/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/params_in_nested_func/mysql/query.sql ================================================ -- 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); ================================================ FILE: internal/endtoend/testdata/params_in_nested_func/mysql/schema.sql ================================================ 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 ); ================================================ FILE: internal/endtoend/testdata/params_in_nested_func/mysql/sqlc.yaml ================================================ version: '2' sql: - schema: schema.sql queries: query.sql engine: mysql gen: go: out: db ================================================ FILE: internal/endtoend/testdata/params_in_nested_func/postgresql/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/params_in_nested_func/postgresql/db/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/params_in_nested_func/postgresql/db/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/params_in_nested_func/postgresql/query.sql ================================================ -- 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); ================================================ FILE: internal/endtoend/testdata/params_in_nested_func/postgresql/schema.sql ================================================ 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 ); ================================================ FILE: internal/endtoend/testdata/params_in_nested_func/postgresql/sqlc.yaml ================================================ version: '2' sql: - schema: schema.sql queries: query.sql engine: postgresql gen: go: out: db ================================================ FILE: internal/endtoend/testdata/params_location/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/params_location/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Order struct { ID int32 Price string UserID int32 } type User struct { ID int32 FirstName string LastName sql.NullString Age int32 JobStatus string } ================================================ FILE: internal/endtoend/testdata/params_location/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getUserByID = `-- name: GetUserByID :one SELECT first_name, id, last_name FROM users WHERE id = ? ` type GetUserByIDRow struct { FirstName string ID int32 LastName sql.NullString } func (q *Queries) GetUserByID(ctx context.Context, targetID int32) (GetUserByIDRow, error) { row := q.db.QueryRowContext(ctx, getUserByID, targetID) var i GetUserByIDRow err := row.Scan(&i.FirstName, &i.ID, &i.LastName) return i, err } const insertNewUser = `-- name: InsertNewUser :exec INSERT INTO users (first_name, last_name) VALUES (?, ?) ` type InsertNewUserParams struct { FirstName string LastName sql.NullString } func (q *Queries) InsertNewUser(ctx context.Context, arg InsertNewUserParams) error { _, err := q.db.ExecContext(ctx, insertNewUser, arg.FirstName, arg.LastName) return err } const limitSQLCArg = `-- name: LimitSQLCArg :many select first_name, id FROM users LIMIT ? ` type LimitSQLCArgRow struct { FirstName string ID int32 } func (q *Queries) LimitSQLCArg(ctx context.Context, limit int32) ([]LimitSQLCArgRow, error) { rows, err := q.db.QueryContext(ctx, limitSQLCArg, limit) if err != nil { return nil, err } defer rows.Close() var items []LimitSQLCArgRow for rows.Next() { var i LimitSQLCArgRow if err := rows.Scan(&i.FirstName, &i.ID); 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 listUserOrders = `-- name: ListUserOrders :many SELECT users.id, users.first_name, orders.price FROM orders LEFT JOIN users ON orders.user_id = users.id WHERE orders.price > ? ` type ListUserOrdersRow struct { ID sql.NullInt32 FirstName sql.NullString Price string } func (q *Queries) ListUserOrders(ctx context.Context, minPrice string) ([]ListUserOrdersRow, error) { rows, err := q.db.QueryContext(ctx, listUserOrders, minPrice) if err != nil { return nil, err } defer rows.Close() var items []ListUserOrdersRow for rows.Next() { var i ListUserOrdersRow if err := rows.Scan(&i.ID, &i.FirstName, &i.Price); 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 listUserParenExpr = `-- name: ListUserParenExpr :many SELECT id, first_name, last_name, age, job_status FROM users WHERE (job_status = 'APPLIED' OR job_status = 'PENDING') AND id > ? ORDER BY id LIMIT ? ` type ListUserParenExprParams struct { ID int32 Limit int32 } func (q *Queries) ListUserParenExpr(ctx context.Context, arg ListUserParenExprParams) ([]User, error) { rows, err := q.db.QueryContext(ctx, listUserParenExpr, arg.ID, arg.Limit) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, &i.JobStatus, ); 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 listUsersByFamily = `-- name: ListUsersByFamily :many SELECT first_name, last_name FROM users WHERE age < ? AND last_name = ? ` type ListUsersByFamilyParams struct { MaxAge int32 InFamily sql.NullString } type ListUsersByFamilyRow struct { FirstName string LastName sql.NullString } func (q *Queries) ListUsersByFamily(ctx context.Context, arg ListUsersByFamilyParams) ([]ListUsersByFamilyRow, error) { rows, err := q.db.QueryContext(ctx, listUsersByFamily, arg.MaxAge, arg.InFamily) if err != nil { return nil, err } defer rows.Close() var items []ListUsersByFamilyRow for rows.Next() { var i ListUsersByFamilyRow if err := rows.Scan(&i.FirstName, &i.LastName); 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 listUsersByID = `-- name: ListUsersByID :many SELECT first_name, id, last_name FROM users WHERE id < ? ` type ListUsersByIDRow struct { FirstName string ID int32 LastName sql.NullString } func (q *Queries) ListUsersByID(ctx context.Context, id int32) ([]ListUsersByIDRow, error) { rows, err := q.db.QueryContext(ctx, listUsersByID, id) if err != nil { return nil, err } defer rows.Close() var items []ListUsersByIDRow for rows.Next() { var i ListUsersByIDRow if err := rows.Scan(&i.FirstName, &i.ID, &i.LastName); 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 listUsersWithLimit = `-- name: ListUsersWithLimit :many SELECT first_name, last_name FROM users LIMIT ? ` type ListUsersWithLimitRow struct { FirstName string LastName sql.NullString } func (q *Queries) ListUsersWithLimit(ctx context.Context, limit int32) ([]ListUsersWithLimitRow, error) { rows, err := q.db.QueryContext(ctx, listUsersWithLimit, limit) if err != nil { return nil, err } defer rows.Close() var items []ListUsersWithLimitRow for rows.Next() { var i ListUsersWithLimitRow if err := rows.Scan(&i.FirstName, &i.LastName); 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 } ================================================ FILE: internal/endtoend/testdata/params_location/mysql/query.sql ================================================ /* name: ListUsersByID :many */ SELECT first_name, id, last_name FROM users WHERE id < ?; /* name: ListUserOrders :many */ SELECT users.id, users.first_name, orders.price FROM orders LEFT JOIN users ON orders.user_id = users.id WHERE orders.price > sqlc.arg('min_price'); /* name: GetUserByID :one */ SELECT first_name, id, last_name FROM users WHERE id = sqlc.arg('target_id'); /* name: ListUsersByFamily :many */ SELECT first_name, last_name FROM users WHERE age < sqlc.arg('max_age') AND last_name = sqlc.arg('in_family'); /* name: ListUsersWithLimit :many */ SELECT first_name, last_name FROM users LIMIT ?; /* name: LimitSQLCArg :many */ select first_name, id FROM users LIMIT ?; /* name: InsertNewUser :exec */ INSERT INTO users (first_name, last_name) VALUES (?, ?); /* name: ListUserParenExpr :many */ SELECT * FROM users WHERE (job_status = 'APPLIED' OR job_status = 'PENDING') AND id > ? ORDER BY id LIMIT ?; ================================================ FILE: internal/endtoend/testdata/params_location/mysql/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL, job_status varchar(10) NOT NULL ) ENGINE=InnoDB; CREATE TABLE orders ( id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, price DECIMAL(13, 4) NOT NULL, user_id integer NOT NULL ) ENGINE=InnoDB; ================================================ FILE: internal/endtoend/testdata/params_location/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "mysql" } ] } ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/pgx/v4/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "github.com/jackc/pgtype" ) type Order struct { ID int32 Price pgtype.Numeric UserID int32 } type User struct { ID int32 FirstName string LastName sql.NullString Age int32 JobStatus string } ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "github.com/jackc/pgtype" ) const getUserByID = `-- name: GetUserByID :one SELECT first_name, id, last_name FROM users WHERE id = $1 ` type GetUserByIDRow struct { FirstName string ID int32 LastName sql.NullString } func (q *Queries) GetUserByID(ctx context.Context, targetID int32) (GetUserByIDRow, error) { row := q.db.QueryRow(ctx, getUserByID, targetID) var i GetUserByIDRow err := row.Scan(&i.FirstName, &i.ID, &i.LastName) return i, err } const insertNewUser = `-- name: InsertNewUser :exec INSERT INTO users (first_name, last_name) VALUES ($1, $2) ` type InsertNewUserParams struct { FirstName string LastName sql.NullString } func (q *Queries) InsertNewUser(ctx context.Context, arg InsertNewUserParams) error { _, err := q.db.Exec(ctx, insertNewUser, arg.FirstName, arg.LastName) return err } const limitSQLCArg = `-- name: LimitSQLCArg :many select first_name, id FROM users LIMIT $1 ` type LimitSQLCArgRow struct { FirstName string ID int32 } func (q *Queries) LimitSQLCArg(ctx context.Context, limit int32) ([]LimitSQLCArgRow, error) { rows, err := q.db.Query(ctx, limitSQLCArg, limit) if err != nil { return nil, err } defer rows.Close() var items []LimitSQLCArgRow for rows.Next() { var i LimitSQLCArgRow if err := rows.Scan(&i.FirstName, &i.ID); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listUserOrders = `-- name: ListUserOrders :many SELECT users.id, users.first_name, orders.price FROM orders LEFT JOIN users ON orders.user_id = users.id WHERE orders.price > $1 ` type ListUserOrdersRow struct { ID sql.NullInt32 FirstName sql.NullString Price pgtype.Numeric } func (q *Queries) ListUserOrders(ctx context.Context, minPrice pgtype.Numeric) ([]ListUserOrdersRow, error) { rows, err := q.db.Query(ctx, listUserOrders, minPrice) if err != nil { return nil, err } defer rows.Close() var items []ListUserOrdersRow for rows.Next() { var i ListUserOrdersRow if err := rows.Scan(&i.ID, &i.FirstName, &i.Price); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listUserParenExpr = `-- name: ListUserParenExpr :many SELECT id, first_name, last_name, age, job_status FROM users WHERE (job_status = 'APPLIED' OR job_status = 'PENDING') AND id > $1 ORDER BY id LIMIT $2 ` type ListUserParenExprParams struct { ID int32 Limit int32 } func (q *Queries) ListUserParenExpr(ctx context.Context, arg ListUserParenExprParams) ([]User, error) { rows, err := q.db.Query(ctx, listUserParenExpr, arg.ID, arg.Limit) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, &i.JobStatus, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listUsersByFamily = `-- name: ListUsersByFamily :many SELECT first_name, last_name FROM users WHERE age < $1 AND last_name = $2 ` type ListUsersByFamilyParams struct { MaxAge int32 InFamily sql.NullString } type ListUsersByFamilyRow struct { FirstName string LastName sql.NullString } func (q *Queries) ListUsersByFamily(ctx context.Context, arg ListUsersByFamilyParams) ([]ListUsersByFamilyRow, error) { rows, err := q.db.Query(ctx, listUsersByFamily, arg.MaxAge, arg.InFamily) if err != nil { return nil, err } defer rows.Close() var items []ListUsersByFamilyRow for rows.Next() { var i ListUsersByFamilyRow if err := rows.Scan(&i.FirstName, &i.LastName); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listUsersByID = `-- name: ListUsersByID :many SELECT first_name, id, last_name FROM users WHERE id < $1 ` type ListUsersByIDRow struct { FirstName string ID int32 LastName sql.NullString } func (q *Queries) ListUsersByID(ctx context.Context, id int32) ([]ListUsersByIDRow, error) { rows, err := q.db.Query(ctx, listUsersByID, id) if err != nil { return nil, err } defer rows.Close() var items []ListUsersByIDRow for rows.Next() { var i ListUsersByIDRow if err := rows.Scan(&i.FirstName, &i.ID, &i.LastName); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listUsersWithLimit = `-- name: ListUsersWithLimit :many SELECT first_name, last_name FROM users LIMIT $1 ` type ListUsersWithLimitRow struct { FirstName string LastName sql.NullString } func (q *Queries) ListUsersWithLimit(ctx context.Context, limit int32) ([]ListUsersWithLimitRow, error) { rows, err := q.db.Query(ctx, listUsersWithLimit, limit) if err != nil { return nil, err } defer rows.Close() var items []ListUsersWithLimitRow for rows.Next() { var i ListUsersWithLimitRow if err := rows.Scan(&i.FirstName, &i.LastName); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/pgx/v4/query.sql ================================================ /* name: ListUsersByID :many */ SELECT first_name, id, last_name FROM users WHERE id < $1; /* name: ListUserOrders :many */ SELECT users.id, users.first_name, orders.price FROM orders LEFT JOIN users ON orders.user_id = users.id WHERE orders.price > sqlc.arg('min_price'); /* name: GetUserByID :one */ SELECT first_name, id, last_name FROM users WHERE id = sqlc.arg('target_id'); /* name: ListUsersByFamily :many */ SELECT first_name, last_name FROM users WHERE age < sqlc.arg('max_age') AND last_name = sqlc.arg('in_family'); /* name: ListUsersWithLimit :many */ SELECT first_name, last_name FROM users LIMIT $1; /* name: LimitSQLCArg :many */ select first_name, id FROM users LIMIT $1; /* name: InsertNewUser :exec */ INSERT INTO users (first_name, last_name) VALUES ($1, $2); /* name: ListUserParenExpr :many */ SELECT * FROM users WHERE (job_status = 'APPLIED' OR job_status = 'PENDING') AND id > $1 ORDER BY id LIMIT $2; ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE users ( id SERIAL NOT NULL, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL, job_status varchar(10) NOT NULL ); CREATE TABLE orders ( id SERIAL NOT NULL, price DECIMAL(13, 4) NOT NULL, user_id integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/pgx/v5/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Order struct { ID int32 Price pgtype.Numeric UserID int32 } type User struct { ID int32 FirstName string LastName pgtype.Text Age int32 JobStatus string } ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 getUserByID = `-- name: GetUserByID :one SELECT first_name, id, last_name FROM users WHERE id = $1 ` type GetUserByIDRow struct { FirstName string ID int32 LastName pgtype.Text } func (q *Queries) GetUserByID(ctx context.Context, targetID int32) (GetUserByIDRow, error) { row := q.db.QueryRow(ctx, getUserByID, targetID) var i GetUserByIDRow err := row.Scan(&i.FirstName, &i.ID, &i.LastName) return i, err } const insertNewUser = `-- name: InsertNewUser :exec INSERT INTO users (first_name, last_name) VALUES ($1, $2) ` type InsertNewUserParams struct { FirstName string LastName pgtype.Text } func (q *Queries) InsertNewUser(ctx context.Context, arg InsertNewUserParams) error { _, err := q.db.Exec(ctx, insertNewUser, arg.FirstName, arg.LastName) return err } const limitSQLCArg = `-- name: LimitSQLCArg :many select first_name, id FROM users LIMIT $1 ` type LimitSQLCArgRow struct { FirstName string ID int32 } func (q *Queries) LimitSQLCArg(ctx context.Context, limit int32) ([]LimitSQLCArgRow, error) { rows, err := q.db.Query(ctx, limitSQLCArg, limit) if err != nil { return nil, err } defer rows.Close() var items []LimitSQLCArgRow for rows.Next() { var i LimitSQLCArgRow if err := rows.Scan(&i.FirstName, &i.ID); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listUserOrders = `-- name: ListUserOrders :many SELECT users.id, users.first_name, orders.price FROM orders LEFT JOIN users ON orders.user_id = users.id WHERE orders.price > $1 ` type ListUserOrdersRow struct { ID pgtype.Int4 FirstName pgtype.Text Price pgtype.Numeric } func (q *Queries) ListUserOrders(ctx context.Context, minPrice pgtype.Numeric) ([]ListUserOrdersRow, error) { rows, err := q.db.Query(ctx, listUserOrders, minPrice) if err != nil { return nil, err } defer rows.Close() var items []ListUserOrdersRow for rows.Next() { var i ListUserOrdersRow if err := rows.Scan(&i.ID, &i.FirstName, &i.Price); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listUserParenExpr = `-- name: ListUserParenExpr :many SELECT id, first_name, last_name, age, job_status FROM users WHERE (job_status = 'APPLIED' OR job_status = 'PENDING') AND id > $1 ORDER BY id LIMIT $2 ` type ListUserParenExprParams struct { ID int32 Limit int32 } func (q *Queries) ListUserParenExpr(ctx context.Context, arg ListUserParenExprParams) ([]User, error) { rows, err := q.db.Query(ctx, listUserParenExpr, arg.ID, arg.Limit) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, &i.JobStatus, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listUsersByFamily = `-- name: ListUsersByFamily :many SELECT first_name, last_name FROM users WHERE age < $1 AND last_name = $2 ` type ListUsersByFamilyParams struct { MaxAge int32 InFamily pgtype.Text } type ListUsersByFamilyRow struct { FirstName string LastName pgtype.Text } func (q *Queries) ListUsersByFamily(ctx context.Context, arg ListUsersByFamilyParams) ([]ListUsersByFamilyRow, error) { rows, err := q.db.Query(ctx, listUsersByFamily, arg.MaxAge, arg.InFamily) if err != nil { return nil, err } defer rows.Close() var items []ListUsersByFamilyRow for rows.Next() { var i ListUsersByFamilyRow if err := rows.Scan(&i.FirstName, &i.LastName); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listUsersByID = `-- name: ListUsersByID :many SELECT first_name, id, last_name FROM users WHERE id < $1 ` type ListUsersByIDRow struct { FirstName string ID int32 LastName pgtype.Text } func (q *Queries) ListUsersByID(ctx context.Context, id int32) ([]ListUsersByIDRow, error) { rows, err := q.db.Query(ctx, listUsersByID, id) if err != nil { return nil, err } defer rows.Close() var items []ListUsersByIDRow for rows.Next() { var i ListUsersByIDRow if err := rows.Scan(&i.FirstName, &i.ID, &i.LastName); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listUsersWithLimit = `-- name: ListUsersWithLimit :many SELECT first_name, last_name FROM users LIMIT $1 ` type ListUsersWithLimitRow struct { FirstName string LastName pgtype.Text } func (q *Queries) ListUsersWithLimit(ctx context.Context, limit int32) ([]ListUsersWithLimitRow, error) { rows, err := q.db.Query(ctx, listUsersWithLimit, limit) if err != nil { return nil, err } defer rows.Close() var items []ListUsersWithLimitRow for rows.Next() { var i ListUsersWithLimitRow if err := rows.Scan(&i.FirstName, &i.LastName); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/pgx/v5/query.sql ================================================ /* name: ListUsersByID :many */ SELECT first_name, id, last_name FROM users WHERE id < $1; /* name: ListUserOrders :many */ SELECT users.id, users.first_name, orders.price FROM orders LEFT JOIN users ON orders.user_id = users.id WHERE orders.price > sqlc.arg('min_price'); /* name: GetUserByID :one */ SELECT first_name, id, last_name FROM users WHERE id = sqlc.arg('target_id'); /* name: ListUsersByFamily :many */ SELECT first_name, last_name FROM users WHERE age < sqlc.arg('max_age') AND last_name = sqlc.arg('in_family'); /* name: ListUsersWithLimit :many */ SELECT first_name, last_name FROM users LIMIT $1; /* name: LimitSQLCArg :many */ select first_name, id FROM users LIMIT $1; /* name: InsertNewUser :exec */ INSERT INTO users (first_name, last_name) VALUES ($1, $2); /* name: ListUserParenExpr :many */ SELECT * FROM users WHERE (job_status = 'APPLIED' OR job_status = 'PENDING') AND id > $1 ORDER BY id LIMIT $2; ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE users ( id SERIAL NOT NULL, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL, job_status varchar(10) NOT NULL ); CREATE TABLE orders ( id SERIAL NOT NULL, price DECIMAL(13, 4) NOT NULL, user_id integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/stdlib/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Order struct { ID int32 Price string UserID int32 } type User struct { ID int32 FirstName string LastName sql.NullString Age int32 JobStatus string } ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getUserByID = `-- name: GetUserByID :one SELECT first_name, id, last_name FROM users WHERE id = $1 ` type GetUserByIDRow struct { FirstName string ID int32 LastName sql.NullString } func (q *Queries) GetUserByID(ctx context.Context, targetID int32) (GetUserByIDRow, error) { row := q.db.QueryRowContext(ctx, getUserByID, targetID) var i GetUserByIDRow err := row.Scan(&i.FirstName, &i.ID, &i.LastName) return i, err } const insertNewUser = `-- name: InsertNewUser :exec INSERT INTO users (first_name, last_name) VALUES ($1, $2) ` type InsertNewUserParams struct { FirstName string LastName sql.NullString } func (q *Queries) InsertNewUser(ctx context.Context, arg InsertNewUserParams) error { _, err := q.db.ExecContext(ctx, insertNewUser, arg.FirstName, arg.LastName) return err } const limitSQLCArg = `-- name: LimitSQLCArg :many select first_name, id FROM users LIMIT $1 ` type LimitSQLCArgRow struct { FirstName string ID int32 } func (q *Queries) LimitSQLCArg(ctx context.Context, limit int32) ([]LimitSQLCArgRow, error) { rows, err := q.db.QueryContext(ctx, limitSQLCArg, limit) if err != nil { return nil, err } defer rows.Close() var items []LimitSQLCArgRow for rows.Next() { var i LimitSQLCArgRow if err := rows.Scan(&i.FirstName, &i.ID); 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 listUserOrders = `-- name: ListUserOrders :many SELECT users.id, users.first_name, orders.price FROM orders LEFT JOIN users ON orders.user_id = users.id WHERE orders.price > $1 ` type ListUserOrdersRow struct { ID sql.NullInt32 FirstName sql.NullString Price string } func (q *Queries) ListUserOrders(ctx context.Context, minPrice string) ([]ListUserOrdersRow, error) { rows, err := q.db.QueryContext(ctx, listUserOrders, minPrice) if err != nil { return nil, err } defer rows.Close() var items []ListUserOrdersRow for rows.Next() { var i ListUserOrdersRow if err := rows.Scan(&i.ID, &i.FirstName, &i.Price); 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 listUserParenExpr = `-- name: ListUserParenExpr :many SELECT id, first_name, last_name, age, job_status FROM users WHERE (job_status = 'APPLIED' OR job_status = 'PENDING') AND id > $1 ORDER BY id LIMIT $2 ` type ListUserParenExprParams struct { ID int32 Limit int32 } func (q *Queries) ListUserParenExpr(ctx context.Context, arg ListUserParenExprParams) ([]User, error) { rows, err := q.db.QueryContext(ctx, listUserParenExpr, arg.ID, arg.Limit) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, &i.JobStatus, ); 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 listUsersByFamily = `-- name: ListUsersByFamily :many SELECT first_name, last_name FROM users WHERE age < $1 AND last_name = $2 ` type ListUsersByFamilyParams struct { MaxAge int32 InFamily sql.NullString } type ListUsersByFamilyRow struct { FirstName string LastName sql.NullString } func (q *Queries) ListUsersByFamily(ctx context.Context, arg ListUsersByFamilyParams) ([]ListUsersByFamilyRow, error) { rows, err := q.db.QueryContext(ctx, listUsersByFamily, arg.MaxAge, arg.InFamily) if err != nil { return nil, err } defer rows.Close() var items []ListUsersByFamilyRow for rows.Next() { var i ListUsersByFamilyRow if err := rows.Scan(&i.FirstName, &i.LastName); 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 listUsersByID = `-- name: ListUsersByID :many SELECT first_name, id, last_name FROM users WHERE id < $1 ` type ListUsersByIDRow struct { FirstName string ID int32 LastName sql.NullString } func (q *Queries) ListUsersByID(ctx context.Context, id int32) ([]ListUsersByIDRow, error) { rows, err := q.db.QueryContext(ctx, listUsersByID, id) if err != nil { return nil, err } defer rows.Close() var items []ListUsersByIDRow for rows.Next() { var i ListUsersByIDRow if err := rows.Scan(&i.FirstName, &i.ID, &i.LastName); 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 listUsersWithLimit = `-- name: ListUsersWithLimit :many SELECT first_name, last_name FROM users LIMIT $1 ` type ListUsersWithLimitRow struct { FirstName string LastName sql.NullString } func (q *Queries) ListUsersWithLimit(ctx context.Context, limit int32) ([]ListUsersWithLimitRow, error) { rows, err := q.db.QueryContext(ctx, listUsersWithLimit, limit) if err != nil { return nil, err } defer rows.Close() var items []ListUsersWithLimitRow for rows.Next() { var i ListUsersWithLimitRow if err := rows.Scan(&i.FirstName, &i.LastName); 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 } ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/stdlib/query.sql ================================================ /* name: ListUsersByID :many */ SELECT first_name, id, last_name FROM users WHERE id < $1; /* name: ListUserOrders :many */ SELECT users.id, users.first_name, orders.price FROM orders LEFT JOIN users ON orders.user_id = users.id WHERE orders.price > sqlc.arg('min_price'); /* name: GetUserByID :one */ SELECT first_name, id, last_name FROM users WHERE id = sqlc.arg('target_id'); /* name: ListUsersByFamily :many */ SELECT first_name, last_name FROM users WHERE age < sqlc.arg('max_age') AND last_name = sqlc.arg('in_family'); /* name: ListUsersWithLimit :many */ SELECT first_name, last_name FROM users LIMIT $1; /* name: LimitSQLCArg :many */ select first_name, id FROM users LIMIT $1; /* name: InsertNewUser :exec */ INSERT INTO users (first_name, last_name) VALUES ($1, $2); /* name: ListUserParenExpr :many */ SELECT * FROM users WHERE (job_status = 'APPLIED' OR job_status = 'PENDING') AND id > $1 ORDER BY id LIMIT $2; ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/stdlib/schema.sql ================================================ CREATE TABLE users ( id SERIAL NOT NULL, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL, job_status varchar(10) NOT NULL ); CREATE TABLE orders ( id SERIAL NOT NULL, price DECIMAL(13, 4) NOT NULL, user_id integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/params_location/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql" } ] } ================================================ FILE: internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const findByID = `-- name: FindByID :many SELECT id, name FROM users WHERE ? = id ` func (q *Queries) FindByID(ctx context.Context, id int32) ([]User, error) { rows, err := q.db.QueryContext(ctx, findByID, id) 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.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 } const findByIDAndName = `-- name: FindByIDAndName :many SELECT id, name FROM users WHERE ? = id AND ? = name ` type FindByIDAndNameParams struct { ID int32 Name sql.NullString } func (q *Queries) FindByIDAndName(ctx context.Context, arg FindByIDAndNameParams) ([]User, error) { rows, err := q.db.QueryContext(ctx, findByIDAndName, arg.ID, arg.Name) 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.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 } ================================================ FILE: internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/query.sql ================================================ -- name: FindByID :many SELECT * FROM users WHERE ? = id; -- name: FindByIDAndName :many SELECT * FROM users WHERE ? = id AND ? = name; ================================================ FILE: internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/schema.sql ================================================ CREATE TABLE users ( id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) ) ENGINE=InnoDB; ================================================ FILE: internal/endtoend/testdata/params_placeholder_in_left_expr/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const findByID = `-- name: FindByID :many SELECT id, name FROM users WHERE $1 = id ` func (q *Queries) FindByID(ctx context.Context, id int32) ([]User, error) { rows, err := q.db.QueryContext(ctx, findByID, id) 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.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 } const findByIDAndName = `-- name: FindByIDAndName :many SELECT id, name FROM users WHERE $1 = id AND $1 = name ` func (q *Queries) FindByIDAndName(ctx context.Context, id int32) ([]User, error) { rows, err := q.db.QueryContext(ctx, findByIDAndName, id) 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.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 } ================================================ FILE: internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/query.sql ================================================ -- name: FindByID :many SELECT * FROM users WHERE $1 = id; -- name: FindByIDAndName :many SELECT * FROM users WHERE $1 = id AND $1 = name; ================================================ FILE: internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/schema.sql ================================================ CREATE TABLE users ( id INT PRIMARY KEY, name VARCHAR(255) ); ================================================ FILE: internal/endtoend/testdata/params_placeholder_in_left_expr/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/params_two/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/params_two/mysql/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/params_two/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const fooByAandB = `-- name: FooByAandB :many SELECT a, b FROM foo WHERE a = ? and b = ? ` type FooByAandBParams struct { A sql.NullString B sql.NullString } func (q *Queries) FooByAandB(ctx context.Context, arg FooByAandBParams) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, fooByAandB, arg.A, arg.B) 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 } ================================================ FILE: internal/endtoend/testdata/params_two/mysql/query.sql ================================================ /* name: FooByAandB :many */ SELECT a, b FROM foo WHERE a = ? and b = ?; ================================================ FILE: internal/endtoend/testdata/params_two/mysql/schema.sql ================================================ CREATE TABLE foo (a text, b text); ================================================ FILE: internal/endtoend/testdata/params_two/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/pgx/v4/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const fooByAandB = `-- name: FooByAandB :many SELECT a, b FROM foo WHERE a = $1 and b = $2 ` type FooByAandBParams struct { A sql.NullString B sql.NullString } func (q *Queries) FooByAandB(ctx context.Context, arg FooByAandBParams) ([]Foo, error) { rows, err := q.db.Query(ctx, fooByAandB, arg.A, arg.B) 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 } ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/pgx/v4/query.sql ================================================ -- name: FooByAandB :many SELECT a, b FROM foo WHERE a = $1 and b = $2; ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (a text, b text); ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { A pgtype.Text B pgtype.Text } ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 fooByAandB = `-- name: FooByAandB :many SELECT a, b FROM foo WHERE a = $1 and b = $2 ` type FooByAandBParams struct { A pgtype.Text B pgtype.Text } func (q *Queries) FooByAandB(ctx context.Context, arg FooByAandBParams) ([]Foo, error) { rows, err := q.db.Query(ctx, fooByAandB, arg.A, arg.B) 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 } ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/pgx/v5/query.sql ================================================ -- name: FooByAandB :many SELECT a, b FROM foo WHERE a = $1 and b = $2; ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (a text, b text); ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/stdlib/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const fooByAandB = `-- name: FooByAandB :many SELECT a, b FROM foo WHERE a = $1 and b = $2 ` type FooByAandBParams struct { A sql.NullString B sql.NullString } func (q *Queries) FooByAandB(ctx context.Context, arg FooByAandBParams) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, fooByAandB, arg.A, arg.B) 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 } ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/stdlib/query.sql ================================================ -- name: FooByAandB :many SELECT a, b FROM foo WHERE a = $1 and b = $2; ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (a text, b text); ================================================ FILE: internal/endtoend/testdata/params_two/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/pattern_in_expr/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pattern_in_expr/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { A sql.NullString B sql.NullString } type Foo struct { A sql.NullString B sql.NullString } ================================================ FILE: internal/endtoend/testdata/pattern_in_expr/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const fooByBarB = `-- name: FooByBarB :many SELECT a, b from foo where foo.a in (select a from bar where bar.b = ?) ` func (q *Queries) FooByBarB(ctx context.Context, b sql.NullString) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, fooByBarB, b) 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 fooByList = `-- name: FooByList :many SELECT a, b from foo where foo.a in (?, ?) ` type FooByListParams struct { A sql.NullString A_2 sql.NullString } func (q *Queries) FooByList(ctx context.Context, arg FooByListParams) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, fooByList, arg.A, arg.A_2) 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 fooByNotList = `-- name: FooByNotList :many SELECT a, b from foo where foo.a not in (?, ?) ` type FooByNotListParams struct { A sql.NullString A_2 sql.NullString } func (q *Queries) FooByNotList(ctx context.Context, arg FooByNotListParams) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, fooByNotList, arg.A, arg.A_2) 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 fooByParamList = `-- name: FooByParamList :many SELECT a, b from foo where ? in (foo.a, foo.b) ` func (q *Queries) FooByParamList(ctx context.Context, a sql.NullString) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, fooByParamList, a) 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 } ================================================ FILE: internal/endtoend/testdata/pattern_in_expr/mysql/query.sql ================================================ /* name: FooByBarB :many */ SELECT a, b from foo where foo.a in (select a from bar where bar.b = ?); /* name: FooByList :many */ SELECT a, b from foo where foo.a in (?, ?); /* name: FooByNotList :many */ SELECT a, b from foo where foo.a not in (?, ?); /* name: FooByParamList :many */ SELECT a, b from foo where ? in (foo.a, foo.b); ================================================ FILE: internal/endtoend/testdata/pattern_in_expr/mysql/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (a text, b text); ================================================ FILE: internal/endtoend/testdata/pattern_in_expr/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/pattern_matching/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pattern_matching/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Pet struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/pattern_matching/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const petsByName = `-- name: PetsByName :many SELECT name FROM pet WHERE name LIKE ? ` func (q *Queries) PetsByName(ctx context.Context, name sql.NullString) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, petsByName, name) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var name sql.NullString if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pattern_matching/mysql/query.sql ================================================ -- name: PetsByName :many SELECT * FROM pet WHERE name LIKE ?; ================================================ FILE: internal/endtoend/testdata/pattern_matching/mysql/schema.sql ================================================ CREATE TABLE pet (name text); ================================================ FILE: internal/endtoend/testdata/pattern_matching/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/pattern_matching/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pattern_matching/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Pet struct { Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/pattern_matching/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const petsByName = `-- name: PetsByName :many SELECT name FROM pet WHERE name LIKE $1 ` func (q *Queries) PetsByName(ctx context.Context, name sql.NullString) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, petsByName, name) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var name sql.NullString if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pattern_matching/postgresql/query.sql ================================================ -- name: PetsByName :many SELECT * FROM pet WHERE name LIKE $1; ================================================ FILE: internal/endtoend/testdata/pattern_matching/postgresql/schema.sql ================================================ CREATE TABLE pet (name text); ================================================ FILE: internal/endtoend/testdata/pattern_matching/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/exec.sql ================================================ -- name: AdvisoryLockExec :exec SELECT pg_advisory_lock($1); -- name: AdvisoryLockExecRows :execrows SELECT pg_advisory_lock($1); ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/exec.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: exec.sql package querytest import ( "context" ) const advisoryLockExec = `-- name: AdvisoryLockExec :exec SELECT pg_advisory_lock($1) ` func (q *Queries) AdvisoryLockExec(ctx context.Context, pgAdvisoryLock int64) error { _, err := q.db.Exec(ctx, advisoryLockExec, pgAdvisoryLock) return err } const advisoryLockExecRows = `-- name: AdvisoryLockExecRows :execrows SELECT pg_advisory_lock($1) ` func (q *Queries) AdvisoryLockExecRows(ctx context.Context, pgAdvisoryLock int64) (int64, error) { result, err := q.db.Exec(ctx, advisoryLockExecRows, pgAdvisoryLock) if err != nil { return 0, err } return result.RowsAffected(), nil } ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/jackc/pgconn" ) const advisoryLockExecResult = `-- name: AdvisoryLockExecResult :execresult SELECT pg_advisory_lock($1) ` func (q *Queries) AdvisoryLockExecResult(ctx context.Context, pgAdvisoryLock int64) (pgconn.CommandTag, error) { return q.db.Exec(ctx, advisoryLockExecResult, pgAdvisoryLock) } const advisoryLockOne = `-- name: AdvisoryLockOne :one SELECT pg_advisory_lock($1) ` func (q *Queries) AdvisoryLockOne(ctx context.Context, pgAdvisoryLock int64) (interface{}, error) { row := q.db.QueryRow(ctx, advisoryLockOne, pgAdvisoryLock) var pg_advisory_lock interface{} err := row.Scan(&pg_advisory_lock) return pg_advisory_lock, err } const advisoryUnlock = `-- name: AdvisoryUnlock :many SELECT pg_advisory_unlock($1) ` func (q *Queries) AdvisoryUnlock(ctx context.Context, pgAdvisoryUnlock int64) ([]bool, error) { rows, err := q.db.Query(ctx, advisoryUnlock, pgAdvisoryUnlock) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var pg_advisory_unlock bool if err := rows.Scan(&pg_advisory_unlock); err != nil { return nil, err } items = append(items, pg_advisory_unlock) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/query.sql ================================================ -- name: AdvisoryLockOne :one SELECT pg_advisory_lock($1); -- name: AdvisoryUnlock :many SELECT pg_advisory_unlock($1); -- name: AdvisoryLockExecResult :execresult SELECT pg_advisory_lock($1); ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": ["query.sql", "exec.sql"] } ] } ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/exec.sql ================================================ -- name: AdvisoryLockExec :exec SELECT pg_advisory_lock($1); -- name: AdvisoryLockExecRows :execrows SELECT pg_advisory_lock($1); ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/exec.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: exec.sql package querytest import ( "context" ) const advisoryLockExec = `-- name: AdvisoryLockExec :exec SELECT pg_advisory_lock($1) ` func (q *Queries) AdvisoryLockExec(ctx context.Context, pgAdvisoryLock int64) error { _, err := q.db.Exec(ctx, advisoryLockExec, pgAdvisoryLock) return err } const advisoryLockExecRows = `-- name: AdvisoryLockExecRows :execrows SELECT pg_advisory_lock($1) ` func (q *Queries) AdvisoryLockExecRows(ctx context.Context, pgAdvisoryLock int64) (int64, error) { result, err := q.db.Exec(ctx, advisoryLockExecRows, pgAdvisoryLock) if err != nil { return 0, err } return result.RowsAffected(), nil } ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/jackc/pgx/v5/pgconn" ) const advisoryLockExecResult = `-- name: AdvisoryLockExecResult :execresult SELECT pg_advisory_lock($1) ` func (q *Queries) AdvisoryLockExecResult(ctx context.Context, pgAdvisoryLock int64) (pgconn.CommandTag, error) { return q.db.Exec(ctx, advisoryLockExecResult, pgAdvisoryLock) } const advisoryLockOne = `-- name: AdvisoryLockOne :one SELECT pg_advisory_lock($1) ` func (q *Queries) AdvisoryLockOne(ctx context.Context, pgAdvisoryLock int64) (interface{}, error) { row := q.db.QueryRow(ctx, advisoryLockOne, pgAdvisoryLock) var pg_advisory_lock interface{} err := row.Scan(&pg_advisory_lock) return pg_advisory_lock, err } const advisoryUnlock = `-- name: AdvisoryUnlock :many SELECT pg_advisory_unlock($1) ` func (q *Queries) AdvisoryUnlock(ctx context.Context, pgAdvisoryUnlock int64) ([]bool, error) { rows, err := q.db.Query(ctx, advisoryUnlock, pgAdvisoryUnlock) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var pg_advisory_unlock bool if err := rows.Scan(&pg_advisory_unlock); err != nil { return nil, err } items = append(items, pg_advisory_unlock) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/query.sql ================================================ -- name: AdvisoryLockOne :one SELECT pg_advisory_lock($1); -- name: AdvisoryUnlock :many SELECT pg_advisory_unlock($1); -- name: AdvisoryLockExecResult :execresult SELECT pg_advisory_lock($1); ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": ["query.sql", "exec.sql"] } ] } ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/exec.sql ================================================ -- name: AdvisoryLockExec :exec SELECT pg_advisory_lock($1); -- name: AdvisoryLockExecRows :execrows SELECT pg_advisory_lock($1); ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/exec.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: exec.sql package querytest import ( "context" ) const advisoryLockExec = `-- name: AdvisoryLockExec :exec SELECT pg_advisory_lock($1) ` func (q *Queries) AdvisoryLockExec(ctx context.Context, pgAdvisoryLock int64) error { _, err := q.db.ExecContext(ctx, advisoryLockExec, pgAdvisoryLock) return err } const advisoryLockExecRows = `-- name: AdvisoryLockExecRows :execrows SELECT pg_advisory_lock($1) ` func (q *Queries) AdvisoryLockExecRows(ctx context.Context, pgAdvisoryLock int64) (int64, error) { result, err := q.db.ExecContext(ctx, advisoryLockExecRows, pgAdvisoryLock) if err != nil { return 0, err } return result.RowsAffected() } ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const advisoryLockExecResult = `-- name: AdvisoryLockExecResult :execresult SELECT pg_advisory_lock($1) ` func (q *Queries) AdvisoryLockExecResult(ctx context.Context, pgAdvisoryLock int64) (sql.Result, error) { return q.db.ExecContext(ctx, advisoryLockExecResult, pgAdvisoryLock) } const advisoryLockOne = `-- name: AdvisoryLockOne :one SELECT pg_advisory_lock($1) ` func (q *Queries) AdvisoryLockOne(ctx context.Context, pgAdvisoryLock int64) (interface{}, error) { row := q.db.QueryRowContext(ctx, advisoryLockOne, pgAdvisoryLock) var pg_advisory_lock interface{} err := row.Scan(&pg_advisory_lock) return pg_advisory_lock, err } const advisoryUnlock = `-- name: AdvisoryUnlock :many SELECT pg_advisory_unlock($1) ` func (q *Queries) AdvisoryUnlock(ctx context.Context, pgAdvisoryUnlock int64) ([]bool, error) { rows, err := q.db.QueryContext(ctx, advisoryUnlock, pgAdvisoryUnlock) if err != nil { return nil, err } defer rows.Close() var items []bool for rows.Next() { var pg_advisory_unlock bool if err := rows.Scan(&pg_advisory_unlock); err != nil { return nil, err } items = append(items, pg_advisory_unlock) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/query.sql ================================================ -- name: AdvisoryLockOne :one SELECT pg_advisory_lock($1); -- name: AdvisoryUnlock :many SELECT pg_advisory_unlock($1); -- name: AdvisoryLockExecResult :execresult SELECT pg_advisory_lock($1); ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/pg_advisory_xact_lock/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": ["query.sql", "exec.sql"] } ] } ================================================ FILE: internal/endtoend/testdata/pg_dump/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_dump/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" ) type Author struct { ID int64 Name string Bio sql.NullString } ================================================ FILE: internal/endtoend/testdata/pg_dump/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // 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 } ================================================ FILE: internal/endtoend/testdata/pg_dump/exec.json ================================================ { "contexts": ["base"], "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/pg_dump/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/pg_dump/schema.sql ================================================ -- -- PostgreSQL database dump -- -- Dumped from database version 15.3 (Debian 15.3-1.pgdg120+1) -- Dumped by pg_dump version 15.3 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; SET row_security = off; -- -- Name: public; Type: SCHEMA; Schema: -; Owner: pg_database_owner -- CREATE SCHEMA public; ALTER SCHEMA public OWNER TO pg_database_owner; -- -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: pg_database_owner -- COMMENT ON SCHEMA public IS 'standard public schema'; SET default_table_access_method = heap; -- -- Name: authors; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public.authors ( id bigint NOT NULL, name text NOT NULL, bio text ); ALTER TABLE public.authors OWNER TO postgres; -- -- Name: authors_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- CREATE SEQUENCE public.authors_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE public.authors_id_seq OWNER TO postgres; -- -- Name: authors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- ALTER SEQUENCE public.authors_id_seq OWNED BY public.authors.id; -- -- Name: authors id; Type: DEFAULT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public.authors ALTER COLUMN id SET DEFAULT nextval('public.authors_id_seq'::regclass); -- -- Name: authors authors_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public.authors ADD CONSTRAINT authors_pkey PRIMARY KEY (id); -- -- PostgreSQL database dump complete -- ================================================ FILE: internal/endtoend/testdata/pg_dump/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "db", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { QualifiedName sql.NullString NameQuery sql.NullString FtsNameQuery sql.NullString } ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listFoo = `-- name: ListFoo :many SELECT qualified_name, name_query, fts_name_query FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.QualifiedName, &i.NameQuery, &i.FtsNameQuery); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/schema.sql ================================================ CREATE EXTENSION IF NOT EXISTS ltree; CREATE TABLE foo ( qualified_name ltree, name_query lquery, fts_name_query ltxtquery ); ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { QualifiedName pgtype.Text NameQuery pgtype.Text FtsNameQuery pgtype.Text } ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listFoo = `-- name: ListFoo :many SELECT qualified_name, name_query, fts_name_query FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.QualifiedName, &i.NameQuery, &i.FtsNameQuery); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/schema.sql ================================================ CREATE EXTENSION IF NOT EXISTS ltree; CREATE TABLE foo ( qualified_name ltree, name_query lquery, fts_name_query ltxtquery ); ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { QualifiedName sql.NullString NameQuery sql.NullString FtsNameQuery sql.NullString } ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listFoo = `-- name: ListFoo :many SELECT qualified_name, name_query, fts_name_query FROM foo ` func (q *Queries) ListFoo(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, listFoo) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.QualifiedName, &i.NameQuery, &i.FtsNameQuery); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/query.sql ================================================ -- name: ListFoo :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/schema.sql ================================================ CREATE EXTENSION IF NOT EXISTS ltree; CREATE TABLE foo ( qualified_name ltree, name_query lquery, fts_name_query ltxtquery ); ================================================ FILE: internal/endtoend/testdata/pg_ext_ltree/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/pg_trgm.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: pg_trgm.sql package querytest import ( "context" ) const wordSimilarity = `-- name: WordSimilarity :one SELECT word_similarity('word', 'two words') ` func (q *Queries) WordSimilarity(ctx context.Context) (float32, error) { row := q.db.QueryRow(ctx, wordSimilarity) var word_similarity float32 err := row.Scan(&word_similarity) return word_similarity, err } ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/pgcrypto.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: pgcrypto.sql package querytest import ( "context" ) const encodeDigest = `-- name: EncodeDigest :one SELECT encode(digest($1, 'sha1'), 'hex') ` func (q *Queries) EncodeDigest(ctx context.Context, digest string) (string, error) { row := q.db.QueryRow(ctx, encodeDigest, digest) var encode string err := row.Scan(&encode) return encode, err } ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/go/uuid_ossp.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: uuid_ossp.sql package querytest import ( "context" "github.com/google/uuid" ) const generateUUID = `-- name: GenerateUUID :one SELECT uuid_generate_v4() ` func (q *Queries) GenerateUUID(ctx context.Context) (uuid.UUID, error) { row := q.db.QueryRow(ctx, generateUUID) var uuid_generate_v4 uuid.UUID err := row.Scan(&uuid_generate_v4) return uuid_generate_v4, err } ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/schema.sql ================================================ CREATE EXTENSION IF NOT EXISTS "pg_trgm"; CREATE EXTENSION IF NOT EXISTS "pgcrypto"; CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sql/pg_trgm.sql ================================================ -- name: WordSimilarity :one SELECT word_similarity('word', 'two words'); ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sql/pgcrypto.sql ================================================ -- name: EncodeDigest :one SELECT encode(digest($1, 'sha1'), 'hex'); ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sql/uuid_ossp.sql ================================================ -- name: GenerateUUID :one SELECT uuid_generate_v4(); ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "sql" } ] } ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/pg_trgm.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: pg_trgm.sql package querytest import ( "context" ) const wordSimilarity = `-- name: WordSimilarity :one SELECT word_similarity('word', 'two words') ` func (q *Queries) WordSimilarity(ctx context.Context) (float32, error) { row := q.db.QueryRow(ctx, wordSimilarity) var word_similarity float32 err := row.Scan(&word_similarity) return word_similarity, err } ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/pgcrypto.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: pgcrypto.sql package querytest import ( "context" ) const encodeDigest = `-- name: EncodeDigest :one SELECT encode(digest($1, 'sha1'), 'hex') ` func (q *Queries) EncodeDigest(ctx context.Context, digest string) (string, error) { row := q.db.QueryRow(ctx, encodeDigest, digest) var encode string err := row.Scan(&encode) return encode, err } ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/go/uuid_ossp.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: uuid_ossp.sql package querytest import ( "context" "github.com/jackc/pgx/v5/pgtype" ) const generateUUID = `-- name: GenerateUUID :one SELECT uuid_generate_v4() ` func (q *Queries) GenerateUUID(ctx context.Context) (pgtype.UUID, error) { row := q.db.QueryRow(ctx, generateUUID) var uuid_generate_v4 pgtype.UUID err := row.Scan(&uuid_generate_v4) return uuid_generate_v4, err } ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/schema.sql ================================================ CREATE EXTENSION IF NOT EXISTS "pg_trgm"; CREATE EXTENSION IF NOT EXISTS "pgcrypto"; CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sql/pg_trgm.sql ================================================ -- name: WordSimilarity :one SELECT word_similarity('word', 'two words'); ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sql/pgcrypto.sql ================================================ -- name: EncodeDigest :one SELECT encode(digest($1, 'sha1'), 'hex'); ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sql/uuid_ossp.sql ================================================ -- name: GenerateUUID :one SELECT uuid_generate_v4(); ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "sql" } ] } ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/pg_trgm.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: pg_trgm.sql package querytest import ( "context" ) const wordSimilarity = `-- name: WordSimilarity :one SELECT word_similarity('word', 'two words') ` func (q *Queries) WordSimilarity(ctx context.Context) (float32, error) { row := q.db.QueryRowContext(ctx, wordSimilarity) var word_similarity float32 err := row.Scan(&word_similarity) return word_similarity, err } ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/pgcrypto.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: pgcrypto.sql package querytest import ( "context" ) const encodeDigest = `-- name: EncodeDigest :one SELECT encode(digest($1, 'sha1'), 'hex') ` func (q *Queries) EncodeDigest(ctx context.Context, digest string) (string, error) { row := q.db.QueryRowContext(ctx, encodeDigest, digest) var encode string err := row.Scan(&encode) return encode, err } ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/stdlib/go/uuid_ossp.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: uuid_ossp.sql package querytest import ( "context" "github.com/google/uuid" ) const generateUUID = `-- name: GenerateUUID :one SELECT uuid_generate_v4() ` func (q *Queries) GenerateUUID(ctx context.Context) (uuid.UUID, error) { row := q.db.QueryRowContext(ctx, generateUUID) var uuid_generate_v4 uuid.UUID err := row.Scan(&uuid_generate_v4) return uuid_generate_v4, err } ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/stdlib/schema.sql ================================================ CREATE EXTENSION IF NOT EXISTS "pg_trgm"; CREATE EXTENSION IF NOT EXISTS "pgcrypto"; CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sql/pg_trgm.sql ================================================ -- name: WordSimilarity :one SELECT word_similarity('word', 'two words'); ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sql/pgcrypto.sql ================================================ -- name: EncodeDigest :one SELECT encode(digest($1, 'sha1'), 'hex'); ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sql/uuid_ossp.sql ================================================ -- name: GenerateUUID :one SELECT uuid_generate_v4(); ================================================ FILE: internal/endtoend/testdata/pg_extensions/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "sql" } ] } ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "time" ) const generateSeries = `-- name: GenerateSeries :many SELECT generate_series($1::timestamp, $2::timestamp, '10 hours') ` type GenerateSeriesParams struct { Column1 time.Time `json:"column_1"` Column2 time.Time `json:"column_2"` } func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]int64, error) { rows, err := q.db.Query(ctx, generateSeries, arg.Column1, arg.Column2) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var generate_series int64 if err := rows.Scan(&generate_series); err != nil { return nil, err } items = append(items, generate_series) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/query.sql ================================================ -- name: GenerateSeries :many SELECT generate_series($1::timestamp, $2::timestamp, '10 hours'); ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true } ] } ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 generateSeries = `-- name: GenerateSeries :many SELECT generate_series($1::timestamp, $2::timestamp, '10 hours') ` type GenerateSeriesParams struct { Column1 pgtype.Timestamp `json:"column_1"` Column2 pgtype.Timestamp `json:"column_2"` } func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]int64, error) { rows, err := q.db.Query(ctx, generateSeries, arg.Column1, arg.Column2) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var generate_series int64 if err := rows.Scan(&generate_series); err != nil { return nil, err } items = append(items, generate_series) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/query.sql ================================================ -- name: GenerateSeries :many SELECT generate_series($1::timestamp, $2::timestamp, '10 hours'); ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true } ] } ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "time" ) const generateSeries = `-- name: GenerateSeries :many SELECT generate_series($1::timestamp, $2::timestamp, '10 hours') ` type GenerateSeriesParams struct { Column1 time.Time `json:"column_1"` Column2 time.Time `json:"column_2"` } func (q *Queries) GenerateSeries(ctx context.Context, arg GenerateSeriesParams) ([]int64, error) { rows, err := q.db.QueryContext(ctx, generateSeries, arg.Column1, arg.Column2) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var generate_series int64 if err := rows.Scan(&generate_series); err != nil { return nil, err } items = append(items, generate_series) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/query.sql ================================================ -- name: GenerateSeries :many SELECT generate_series($1::timestamp, $2::timestamp, '10 hours'); ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/pg_generate_series/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true } ] } ================================================ FILE: internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/pg_timezone_names/go_pgx/v4/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getColumns = `-- name: GetColumns :many SELECT table_name::text, column_name::text from information_schema.columns ` type GetColumnsRow struct { TableName string ColumnName string } func (q *Queries) GetColumns(ctx context.Context) ([]GetColumnsRow, error) { rows, err := q.db.Query(ctx, getColumns) if err != nil { return nil, err } defer rows.Close() var items []GetColumnsRow for rows.Next() { var i GetColumnsRow if err := rows.Scan(&i.TableName, &i.ColumnName); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getTables = `-- name: GetTables :many SELECT table_name::text from information_schema.tables ` func (q *Queries) GetTables(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, getTables) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var table_name string if err := rows.Scan(&table_name); err != nil { return nil, err } items = append(items, table_name) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getTimezones = `-- name: GetTimezones :many SELECT name, abbrev, utc_offset, is_dst from pg_catalog.pg_timezone_names ` type GetTimezonesRow struct { Name sql.NullString Abbrev sql.NullString UtcOffset sql.NullInt64 IsDst sql.NullBool } func (q *Queries) GetTimezones(ctx context.Context) ([]GetTimezonesRow, error) { rows, err := q.db.Query(ctx, getTimezones) if err != nil { return nil, err } defer rows.Close() var items []GetTimezonesRow for rows.Next() { var i GetTimezonesRow if err := rows.Scan( &i.Name, &i.Abbrev, &i.UtcOffset, &i.IsDst, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/pg_timezone_names/go_pgx/v5/query.sql.go ================================================ // 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 getColumns = `-- name: GetColumns :many SELECT table_name::text, column_name::text from information_schema.columns ` type GetColumnsRow struct { TableName string ColumnName string } func (q *Queries) GetColumns(ctx context.Context) ([]GetColumnsRow, error) { rows, err := q.db.Query(ctx, getColumns) if err != nil { return nil, err } defer rows.Close() var items []GetColumnsRow for rows.Next() { var i GetColumnsRow if err := rows.Scan(&i.TableName, &i.ColumnName); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getTables = `-- name: GetTables :many SELECT table_name::text from information_schema.tables ` func (q *Queries) GetTables(ctx context.Context) ([]string, error) { rows, err := q.db.Query(ctx, getTables) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var table_name string if err := rows.Scan(&table_name); err != nil { return nil, err } items = append(items, table_name) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getTimezones = `-- name: GetTimezones :many SELECT name, abbrev, utc_offset, is_dst from pg_catalog.pg_timezone_names ` type GetTimezonesRow struct { Name pgtype.Text Abbrev pgtype.Text UtcOffset pgtype.Interval IsDst pgtype.Bool } func (q *Queries) GetTimezones(ctx context.Context) ([]GetTimezonesRow, error) { rows, err := q.db.Query(ctx, getTimezones) if err != nil { return nil, err } defer rows.Close() var items []GetTimezonesRow for rows.Next() { var i GetTimezonesRow if err := rows.Scan( &i.Name, &i.Abbrev, &i.UtcOffset, &i.IsDst, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pg_timezone_names/go_stdlib/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_timezone_names/go_stdlib/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/pg_timezone_names/go_stdlib/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getColumns = `-- name: GetColumns :many SELECT table_name::text, column_name::text from information_schema.columns ` type GetColumnsRow struct { TableName string ColumnName string } func (q *Queries) GetColumns(ctx context.Context) ([]GetColumnsRow, error) { rows, err := q.db.QueryContext(ctx, getColumns) if err != nil { return nil, err } defer rows.Close() var items []GetColumnsRow for rows.Next() { var i GetColumnsRow if err := rows.Scan(&i.TableName, &i.ColumnName); 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 getTables = `-- name: GetTables :many SELECT table_name::text from information_schema.tables ` func (q *Queries) GetTables(ctx context.Context) ([]string, error) { rows, err := q.db.QueryContext(ctx, getTables) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var table_name string if err := rows.Scan(&table_name); err != nil { return nil, err } items = append(items, table_name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getTimezones = `-- name: GetTimezones :many SELECT name, abbrev, utc_offset, is_dst from pg_catalog.pg_timezone_names ` type GetTimezonesRow struct { Name sql.NullString Abbrev sql.NullString UtcOffset sql.NullInt64 IsDst sql.NullBool } func (q *Queries) GetTimezones(ctx context.Context) ([]GetTimezonesRow, error) { rows, err := q.db.QueryContext(ctx, getTimezones) if err != nil { return nil, err } defer rows.Close() var items []GetTimezonesRow for rows.Next() { var i GetTimezonesRow if err := rows.Scan( &i.Name, &i.Abbrev, &i.UtcOffset, &i.IsDst, ); 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 } ================================================ FILE: internal/endtoend/testdata/pg_timezone_names/query.sql ================================================ -- name: GetTimezones :many SELECT * from pg_catalog.pg_timezone_names; -- name: GetTables :many SELECT table_name::text from information_schema.tables; -- name: GetColumns :many SELECT table_name::text, column_name::text from information_schema.columns; ================================================ FILE: internal/endtoend/testdata/pg_timezone_names/schema.sql ================================================ SELECT 1; ================================================ FILE: internal/endtoend/testdata/pg_timezone_names/sqlc.json ================================================ { "version": "2", "sql": [ { "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { "sql_package": "pgx/v4", "package": "querytest", "out": "go_pgx/v4" } } }, { "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { "sql_package": "pgx/v5", "package": "querytest", "out": "go_pgx/v5" } } }, { "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { "package": "querytest", "out": "go_stdlib" } } } ] } ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type User struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const user = `-- name: User :many SELECT "user".id FROM "user" ` func (q *Queries) User(ctx context.Context) ([]int64, error) { rows, err := q.db.Query(ctx, user) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/query.sql ================================================ -- name: User :many SELECT "user".* FROM "user"; ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE "user" (id bigserial not null); ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type User struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const user = `-- name: User :many SELECT "user".id FROM "user" ` func (q *Queries) User(ctx context.Context) ([]int64, error) { rows, err := q.db.Query(ctx, user) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/query.sql ================================================ -- name: User :many SELECT "user".* FROM "user"; ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE "user" (id bigserial not null); ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type User struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const user = `-- name: User :many SELECT "user".id FROM "user" ` func (q *Queries) User(ctx context.Context) ([]int64, error) { rows, err := q.db.QueryContext(ctx, user) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/stdlib/query.sql ================================================ -- name: User :many SELECT "user".* FROM "user"; ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/stdlib/schema.sql ================================================ CREATE TABLE "user" (id bigserial not null); ================================================ FILE: internal/endtoend/testdata/pg_user_table/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/pg_vector/postgresql/pgx/exec.json ================================================ { "contexts": ["base"], "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/pg_vector/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/pg_vector/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/pgvector/pgvector-go" ) type Item struct { ID int64 Embedding pgvector.Vector } ================================================ FILE: internal/endtoend/testdata/pg_vector/postgresql/pgx/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/pgvector/pgvector-go" ) const insertVector = `-- name: InsertVector :exec INSERT INTO items (embedding) VALUES ($1) ` func (q *Queries) InsertVector(ctx context.Context, embedding pgvector.Vector) error { _, err := q.db.Exec(ctx, insertVector, embedding) return err } const nearestNeighbor = `-- name: NearestNeighbor :many SELECT id, embedding FROM items ORDER BY embedding <-> $1 LIMIT 5 ` func (q *Queries) NearestNeighbor(ctx context.Context, embedding pgvector.Vector) ([]Item, error) { rows, err := q.db.Query(ctx, nearestNeighbor, embedding) if err != nil { return nil, err } defer rows.Close() var items []Item for rows.Next() { var i Item if err := rows.Scan(&i.ID, &i.Embedding); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pg_vector/postgresql/pgx/query.sql ================================================ -- name: InsertVector :exec INSERT INTO items (embedding) VALUES ($1); -- name: NearestNeighbor :many SELECT * FROM items ORDER BY embedding <-> $1 LIMIT 5; ================================================ FILE: internal/endtoend/testdata/pg_vector/postgresql/pgx/schema.sql ================================================ CREATE EXTENSION IF NOT EXISTS "vector"; CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3)); ================================================ FILE: internal/endtoend/testdata/pg_vector/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype 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, } } ================================================ FILE: internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype import ( "time" "github.com/google/uuid" ) type Foo struct { Bar *time.Time Baz *uuid.UUID } ================================================ FILE: internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package datatype import ( "context" "time" "github.com/google/uuid" ) const find = `-- name: Find :one SELECT bar FROM foo WHERE baz = $1 ` func (q *Queries) Find(ctx context.Context, baz *uuid.UUID) (*time.Time, error) { row := q.db.QueryRow(ctx, find, baz) var bar *time.Time err := row.Scan(&bar) return bar, err } const list = `-- name: List :many SELECT bar, baz FROM foo ` func (q *Queries) List(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, list) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Bar, &i.Baz); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/query.sql ================================================ -- name: List :many SELECT * FROM foo; -- name: Find :one SELECT bar FROM foo WHERE baz = $1; ================================================ FILE: internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar date, baz uuid); ================================================ FILE: internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "datatype", "schema": "schema.sql", "queries": "query.sql", "emit_pointers_for_null_types": true } ] } ================================================ FILE: internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype 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, } } ================================================ FILE: internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package datatype import ( "net/netip" ) type Foo struct { Bar *netip.Addr Baz *netip.Prefix } ================================================ FILE: internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package datatype import ( "context" "net/netip" ) const find = `-- name: Find :one SELECT bar FROM foo WHERE baz = $1 ` func (q *Queries) Find(ctx context.Context, baz *netip.Prefix) (*netip.Addr, error) { row := q.db.QueryRow(ctx, find, baz) var bar *netip.Addr err := row.Scan(&bar) return bar, err } const list = `-- name: List :many SELECT bar, baz FROM foo ` func (q *Queries) List(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, list) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Bar, &i.Baz); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/query.sql ================================================ -- name: List :many SELECT * FROM foo; -- name: Find :one SELECT bar FROM foo WHERE baz = $1; ================================================ FILE: internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar inet, baz cidr); ================================================ FILE: internal/endtoend/testdata/pointer_type_import/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "datatype", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/prepared_queries/mysql/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" "database/sql" "fmt" ) 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} } func Prepare(ctx context.Context, db DBTX) (*Queries, error) { q := Queries{db: db} var err error if q.deleteUsersByNameStmt, err = db.PrepareContext(ctx, deleteUsersByName); err != nil { return nil, fmt.Errorf("error preparing query DeleteUsersByName: %w", err) } if q.getUserByIDStmt, err = db.PrepareContext(ctx, getUserByID); err != nil { return nil, fmt.Errorf("error preparing query GetUserByID: %w", err) } if q.insertNewUserStmt, err = db.PrepareContext(ctx, insertNewUser); err != nil { return nil, fmt.Errorf("error preparing query InsertNewUser: %w", err) } if q.insertNewUserWithResultStmt, err = db.PrepareContext(ctx, insertNewUserWithResult); err != nil { return nil, fmt.Errorf("error preparing query InsertNewUserWithResult: %w", err) } if q.listUsersStmt, err = db.PrepareContext(ctx, listUsers); err != nil { return nil, fmt.Errorf("error preparing query ListUsers: %w", err) } return &q, nil } func (q *Queries) Close() error { var err error if q.deleteUsersByNameStmt != nil { if cerr := q.deleteUsersByNameStmt.Close(); cerr != nil { err = fmt.Errorf("error closing deleteUsersByNameStmt: %w", cerr) } } if q.getUserByIDStmt != nil { if cerr := q.getUserByIDStmt.Close(); cerr != nil { err = fmt.Errorf("error closing getUserByIDStmt: %w", cerr) } } if q.insertNewUserStmt != nil { if cerr := q.insertNewUserStmt.Close(); cerr != nil { err = fmt.Errorf("error closing insertNewUserStmt: %w", cerr) } } if q.insertNewUserWithResultStmt != nil { if cerr := q.insertNewUserWithResultStmt.Close(); cerr != nil { err = fmt.Errorf("error closing insertNewUserWithResultStmt: %w", cerr) } } if q.listUsersStmt != nil { if cerr := q.listUsersStmt.Close(); cerr != nil { err = fmt.Errorf("error closing listUsersStmt: %w", cerr) } } return err } func (q *Queries) exec(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) (sql.Result, error) { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).ExecContext(ctx, args...) case stmt != nil: return stmt.ExecContext(ctx, args...) default: return q.db.ExecContext(ctx, query, args...) } } func (q *Queries) query(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) (*sql.Rows, error) { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).QueryContext(ctx, args...) case stmt != nil: return stmt.QueryContext(ctx, args...) default: return q.db.QueryContext(ctx, query, args...) } } func (q *Queries) queryRow(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) *sql.Row { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).QueryRowContext(ctx, args...) case stmt != nil: return stmt.QueryRowContext(ctx, args...) default: return q.db.QueryRowContext(ctx, query, args...) } } type Queries struct { db DBTX tx *sql.Tx deleteUsersByNameStmt *sql.Stmt getUserByIDStmt *sql.Stmt insertNewUserStmt *sql.Stmt insertNewUserWithResultStmt *sql.Stmt listUsersStmt *sql.Stmt } func (q *Queries) WithTx(tx *sql.Tx) *Queries { return &Queries{ db: tx, tx: tx, deleteUsersByNameStmt: q.deleteUsersByNameStmt, getUserByIDStmt: q.getUserByIDStmt, insertNewUserStmt: q.insertNewUserStmt, insertNewUserWithResultStmt: q.insertNewUserWithResultStmt, listUsersStmt: q.listUsersStmt, } } ================================================ FILE: internal/endtoend/testdata/prepared_queries/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID uint64 FirstName string LastName sql.NullString } ================================================ FILE: internal/endtoend/testdata/prepared_queries/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const deleteUsersByName = `-- name: DeleteUsersByName :execrows DELETE FROM users WHERE first_name = ? AND last_name = ? ` type DeleteUsersByNameParams struct { FirstName string LastName sql.NullString } func (q *Queries) DeleteUsersByName(ctx context.Context, arg DeleteUsersByNameParams) (int64, error) { result, err := q.exec(ctx, q.deleteUsersByNameStmt, deleteUsersByName, arg.FirstName, arg.LastName) if err != nil { return 0, err } return result.RowsAffected() } const getUserByID = `-- name: GetUserByID :one SELECT first_name, id, last_name FROM users WHERE id = ? ` type GetUserByIDRow struct { FirstName string ID uint64 LastName sql.NullString } func (q *Queries) GetUserByID(ctx context.Context, targetID uint64) (GetUserByIDRow, error) { row := q.queryRow(ctx, q.getUserByIDStmt, getUserByID, targetID) var i GetUserByIDRow err := row.Scan(&i.FirstName, &i.ID, &i.LastName) return i, err } const insertNewUser = `-- name: InsertNewUser :exec INSERT INTO users (first_name, last_name) VALUES (?, ?) ` type InsertNewUserParams struct { FirstName string LastName sql.NullString } func (q *Queries) InsertNewUser(ctx context.Context, arg InsertNewUserParams) error { _, err := q.exec(ctx, q.insertNewUserStmt, insertNewUser, arg.FirstName, arg.LastName) return err } const insertNewUserWithResult = `-- name: InsertNewUserWithResult :execresult INSERT INTO users (first_name, last_name) VALUES (?, ?) ` type InsertNewUserWithResultParams struct { FirstName string LastName sql.NullString } func (q *Queries) InsertNewUserWithResult(ctx context.Context, arg InsertNewUserWithResultParams) (sql.Result, error) { return q.exec(ctx, q.insertNewUserWithResultStmt, insertNewUserWithResult, arg.FirstName, arg.LastName) } const listUsers = `-- name: ListUsers :many SELECT first_name, last_name FROM users ` type ListUsersRow struct { FirstName string LastName sql.NullString } func (q *Queries) ListUsers(ctx context.Context) ([]ListUsersRow, error) { rows, err := q.query(ctx, q.listUsersStmt, listUsers) if err != nil { return nil, err } defer rows.Close() var items []ListUsersRow for rows.Next() { var i ListUsersRow if err := rows.Scan(&i.FirstName, &i.LastName); 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 } ================================================ FILE: internal/endtoend/testdata/prepared_queries/mysql/query.sql ================================================ /* name: GetUserByID :one */ SELECT first_name, id, last_name FROM users WHERE id = sqlc.arg('target_id'); /* name: ListUsers :many */ SELECT first_name, last_name FROM users; /* name: InsertNewUser :exec */ INSERT INTO users (first_name, last_name) VALUES (?, ?); /* name: InsertNewUserWithResult :execresult */ INSERT INTO users (first_name, last_name) VALUES (?, ?); /* name: DeleteUsersByName :execrows */ DELETE FROM users WHERE first_name = ? AND last_name = ?; ================================================ FILE: internal/endtoend/testdata/prepared_queries/mysql/schema.sql ================================================ CREATE TABLE users ( id SERIAL NOT NULL, first_name varchar(255) NOT NULL, last_name varchar(255) ); ================================================ FILE: internal/endtoend/testdata/prepared_queries/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "mysql", "emit_prepared_queries": true } ] } ================================================ FILE: internal/endtoend/testdata/prepared_queries/postgresql/stdlib/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" "database/sql" "fmt" ) 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} } func Prepare(ctx context.Context, db DBTX) (*Queries, error) { q := Queries{db: db} var err error if q.deleteUsersByNameStmt, err = db.PrepareContext(ctx, deleteUsersByName); err != nil { return nil, fmt.Errorf("error preparing query DeleteUsersByName: %w", err) } if q.getUserByIDStmt, err = db.PrepareContext(ctx, getUserByID); err != nil { return nil, fmt.Errorf("error preparing query GetUserByID: %w", err) } if q.insertNewUserStmt, err = db.PrepareContext(ctx, insertNewUser); err != nil { return nil, fmt.Errorf("error preparing query InsertNewUser: %w", err) } if q.insertNewUserWithResultStmt, err = db.PrepareContext(ctx, insertNewUserWithResult); err != nil { return nil, fmt.Errorf("error preparing query InsertNewUserWithResult: %w", err) } if q.listUsersStmt, err = db.PrepareContext(ctx, listUsers); err != nil { return nil, fmt.Errorf("error preparing query ListUsers: %w", err) } return &q, nil } func (q *Queries) Close() error { var err error if q.deleteUsersByNameStmt != nil { if cerr := q.deleteUsersByNameStmt.Close(); cerr != nil { err = fmt.Errorf("error closing deleteUsersByNameStmt: %w", cerr) } } if q.getUserByIDStmt != nil { if cerr := q.getUserByIDStmt.Close(); cerr != nil { err = fmt.Errorf("error closing getUserByIDStmt: %w", cerr) } } if q.insertNewUserStmt != nil { if cerr := q.insertNewUserStmt.Close(); cerr != nil { err = fmt.Errorf("error closing insertNewUserStmt: %w", cerr) } } if q.insertNewUserWithResultStmt != nil { if cerr := q.insertNewUserWithResultStmt.Close(); cerr != nil { err = fmt.Errorf("error closing insertNewUserWithResultStmt: %w", cerr) } } if q.listUsersStmt != nil { if cerr := q.listUsersStmt.Close(); cerr != nil { err = fmt.Errorf("error closing listUsersStmt: %w", cerr) } } return err } func (q *Queries) exec(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) (sql.Result, error) { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).ExecContext(ctx, args...) case stmt != nil: return stmt.ExecContext(ctx, args...) default: return q.db.ExecContext(ctx, query, args...) } } func (q *Queries) query(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) (*sql.Rows, error) { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).QueryContext(ctx, args...) case stmt != nil: return stmt.QueryContext(ctx, args...) default: return q.db.QueryContext(ctx, query, args...) } } func (q *Queries) queryRow(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) *sql.Row { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).QueryRowContext(ctx, args...) case stmt != nil: return stmt.QueryRowContext(ctx, args...) default: return q.db.QueryRowContext(ctx, query, args...) } } type Queries struct { db DBTX tx *sql.Tx deleteUsersByNameStmt *sql.Stmt getUserByIDStmt *sql.Stmt insertNewUserStmt *sql.Stmt insertNewUserWithResultStmt *sql.Stmt listUsersStmt *sql.Stmt } func (q *Queries) WithTx(tx *sql.Tx) *Queries { return &Queries{ db: tx, tx: tx, deleteUsersByNameStmt: q.deleteUsersByNameStmt, getUserByIDStmt: q.getUserByIDStmt, insertNewUserStmt: q.insertNewUserStmt, insertNewUserWithResultStmt: q.insertNewUserWithResultStmt, listUsersStmt: q.listUsersStmt, } } ================================================ FILE: internal/endtoend/testdata/prepared_queries/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 FirstName string LastName sql.NullString } ================================================ FILE: internal/endtoend/testdata/prepared_queries/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const deleteUsersByName = `-- name: DeleteUsersByName :execrows DELETE FROM users WHERE first_name = $1 AND last_name = $2 ` type DeleteUsersByNameParams struct { FirstName string LastName sql.NullString } func (q *Queries) DeleteUsersByName(ctx context.Context, arg DeleteUsersByNameParams) (int64, error) { result, err := q.exec(ctx, q.deleteUsersByNameStmt, deleteUsersByName, arg.FirstName, arg.LastName) if err != nil { return 0, err } return result.RowsAffected() } const getUserByID = `-- name: GetUserByID :one SELECT first_name, id, last_name FROM users WHERE id = $1 ` type GetUserByIDRow struct { FirstName string ID int32 LastName sql.NullString } func (q *Queries) GetUserByID(ctx context.Context, targetID int32) (GetUserByIDRow, error) { row := q.queryRow(ctx, q.getUserByIDStmt, getUserByID, targetID) var i GetUserByIDRow err := row.Scan(&i.FirstName, &i.ID, &i.LastName) return i, err } const insertNewUser = `-- name: InsertNewUser :exec INSERT INTO users (first_name, last_name) VALUES ($1, $2) ` type InsertNewUserParams struct { FirstName string LastName sql.NullString } func (q *Queries) InsertNewUser(ctx context.Context, arg InsertNewUserParams) error { _, err := q.exec(ctx, q.insertNewUserStmt, insertNewUser, arg.FirstName, arg.LastName) return err } const insertNewUserWithResult = `-- name: InsertNewUserWithResult :execresult INSERT INTO users (first_name, last_name) VALUES ($1, $2) ` type InsertNewUserWithResultParams struct { FirstName string LastName sql.NullString } func (q *Queries) InsertNewUserWithResult(ctx context.Context, arg InsertNewUserWithResultParams) (sql.Result, error) { return q.exec(ctx, q.insertNewUserWithResultStmt, insertNewUserWithResult, arg.FirstName, arg.LastName) } const listUsers = `-- name: ListUsers :many SELECT first_name, last_name FROM users ` type ListUsersRow struct { FirstName string LastName sql.NullString } func (q *Queries) ListUsers(ctx context.Context) ([]ListUsersRow, error) { rows, err := q.query(ctx, q.listUsersStmt, listUsers) if err != nil { return nil, err } defer rows.Close() var items []ListUsersRow for rows.Next() { var i ListUsersRow if err := rows.Scan(&i.FirstName, &i.LastName); 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 } ================================================ FILE: internal/endtoend/testdata/prepared_queries/postgresql/stdlib/query.sql ================================================ /* name: GetUserByID :one */ SELECT first_name, id, last_name FROM users WHERE id = sqlc.arg('target_id'); /* name: ListUsers :many */ SELECT first_name, last_name FROM users; /* name: InsertNewUser :exec */ INSERT INTO users (first_name, last_name) VALUES ($1, $2); /* name: InsertNewUserWithResult :execresult */ INSERT INTO users (first_name, last_name) VALUES ($1, $2); /* name: DeleteUsersByName :execrows */ DELETE FROM users WHERE first_name = $1 AND last_name = $2; ================================================ FILE: internal/endtoend/testdata/prepared_queries/postgresql/stdlib/schema.sql ================================================ CREATE TABLE users ( id SERIAL NOT NULL, first_name varchar(255) NOT NULL, last_name varchar(255) ); ================================================ FILE: internal/endtoend/testdata/prepared_queries/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "emit_prepared_queries": true } ] } ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package primary_key_later 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, } } ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package primary_key_later import ( "database/sql" ) type Author struct { ID int64 Name string Bio sql.NullString } ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/go/queries.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: queries.sql package primary_key_later import ( "context" ) 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) return i, err } ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/queries.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE authors ( id bigserial, name text NOT NULL, bio text, PRIMARY KEY (id) ); ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "primary_key_later", "schema": "schema.sql", "queries": "queries.sql" } ] } ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package primary_key_later 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, } } ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package primary_key_later import ( "github.com/jackc/pgx/v5/pgtype" ) type Author struct { ID int64 Name string Bio pgtype.Text } ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/go/queries.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: queries.sql package primary_key_later import ( "context" ) 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) return i, err } ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/queries.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE authors ( id bigserial, name text NOT NULL, bio text, PRIMARY KEY (id) ); ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "primary_key_later", "schema": "schema.sql", "queries": "queries.sql" } ] } ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/stdlib/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package primary_key_later 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, } } ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package primary_key_later import ( "database/sql" ) type Author struct { ID int64 Name string Bio sql.NullString } ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/stdlib/go/queries.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: queries.sql package primary_key_later import ( "context" ) 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 } ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/stdlib/queries.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE id = $1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/stdlib/schema.sql ================================================ CREATE TABLE authors ( id bigserial, name text NOT NULL, bio text, PRIMARY KEY (id) ); ================================================ FILE: internal/endtoend/testdata/primary_key_later/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "primary_key_later", "schema": "schema.sql", "queries": "queries.sql" } ] } ================================================ FILE: internal/endtoend/testdata/process_plugin_disabled/exec.json ================================================ { "process": "sqlc-gen-json", "env": { "SQLCDEBUG": "processplugins=0" } } ================================================ FILE: internal/endtoend/testdata/process_plugin_disabled/gen/codegen.json ================================================ { "settings": { "version": "2", "engine": "postgresql", "schema": [ "schema.sql" ], "queries": [ "query.sql" ], "rename": {}, "overrides": [], "codegen": { "out": "gen", "plugin": "jsonb", "options": "eyJmaWxlbmFtZSI6ImNvZGVnZW4uanNvbiIsImluZGVudCI6IiAgIn0=" }, "go": { "emit_interface": false, "emit_json_tags": false, "emit_db_tags": false, "emit_prepared_queries": false, "emit_exact_table_names": false, "emit_empty_slices": false, "emit_exported_queries": false, "emit_result_struct_pointers": false, "emit_params_struct_pointers": false, "emit_methods_with_db_argument": false, "json_tags_case_style": "", "package": "", "out": "", "sql_package": "", "sql_driver": "", "output_db_file_name": "", "output_models_file_name": "", "output_querier_file_name": "", "output_copyfrom_file_name": "", "output_files_suffix": "", "emit_enum_valid_method": false, "emit_all_enum_values": false, "inflection_exclude_table_names": [], "emit_pointers_for_null_types": false, "query_parameter_limit": 1, "output_batch_file_name": "", "json_tags_id_uppercase": false, "omit_unused_structs": false, "emit_sql_as_comment": false }, "json": { "out": "", "indent": "", "filename": "" } }, "catalog": { "comment": "", "default_schema": "public", "name": "", "schemas": [ { "comment": "", "name": "public", "tables": [ { "rel": { "catalog": "", "schema": "", "name": "authors" }, "columns": [ { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "name", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "bio", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" } ], "enums": [], "composite_types": [] }, { "comment": "", "name": "pg_temp", "tables": [], "enums": [], "composite_types": [] }, { "comment": "", "name": "pg_catalog", "tables": [ { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggfnoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggkind", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggnumdirectargs", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggtransfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggfinalfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggcombinefn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggserialfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggdeserialfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmtransfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggminvtransfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmfinalfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggfinalextra", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmfinalextra", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggfinalmodify", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmfinalmodify", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggsortop", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggtranstype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggtransspace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmtranstype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmtransspace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "agginitval", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggminitval", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amhandler", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amopfamily", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amoplefttype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amoprighttype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amopstrategy", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amoppurpose", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amopopr", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amopmethod", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amopsortfamily", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amprocfamily", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amproclefttype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amprocrighttype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amprocnum", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amproc", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "adrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "adnum", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "adbin", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "atttypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attstattarget", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attlen", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attnum", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attndims", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attcacheoff", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "atttypmod", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attbyval", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attalign", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attstorage", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attcompression", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attnotnull", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "atthasdef", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "atthasmissing", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attidentity", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attgenerated", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attisdropped", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attislocal", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attinhcount", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attcollation", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attfdwoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attmissingval", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "roleid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "member", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantor", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "admin_option", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolsuper", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolinherit", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcreaterole", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcreatedb", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcanlogin", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolreplication", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolbypassrls", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolconnlimit", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolpassword", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolvaliduntil", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "installed", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "superuser", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trusted", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relocatable", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "requires", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comment", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extensions" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extensions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extensions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "installed_version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extensions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comment", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extensions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ident", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parent", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "level", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_nblocks", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "free_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "free_chunks", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "used_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "castsource", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "casttarget", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "castfunc", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "castcontext", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "castmethod", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reltype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reloftype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relam", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relfilenode", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reltablespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relpages", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reltuples", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relallvisible", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reltoastrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relhasindex", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relisshared", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relpersistence", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relkind", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relnatts", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relchecks", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relhasrules", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relhastriggers", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relhassubclass", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relrowsecurity", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relforcerowsecurity", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relispopulated", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relreplident", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relispartition", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relrewrite", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relfrozenxid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relminmxid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reloptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relpartbound", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collprovider", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collisdeterministic", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collencoding", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collcollate", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collctype", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "colliculocale", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collversion", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_config" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setting", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "connamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "contype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "condeferrable", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "condeferred", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "convalidated", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "contypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conindid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conparentid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confupdtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confdeltype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confmatchtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conislocal", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "coninhcount", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "connoinherit", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conkey", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confkey", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conpfeqop", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conppeqop", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conffeqop", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confdelsetcols", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conexclop", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conbin", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "connamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conforencoding", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "contoencoding", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conproc", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "condefault", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statement", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_holdable", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_binary", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_scrollable", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "creation_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datdba", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "encoding", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datlocprovider", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datistemplate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datallowconn", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datconnlimit", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datfrozenxid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datminmxid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dattablespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datcollate", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datctype", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "daticulocale", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datcollversion", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setdatabase", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setrole", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "defaclrole", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "defaclnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "defaclobjtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "defaclacl", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "refclassid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "refobjid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "refobjsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "deptype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "description", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "enumtypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "enumsortorder", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "enumlabel", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evtname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evtevent", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evtowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evtfoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evtenabled", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evttags", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extrelocatable", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extversion", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extcondition", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "columns": [ { "name": "sourcefile", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sourceline", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqno", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setting", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "applied", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "error", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwhandler", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwvalidator", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvfdw", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvtype", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvversion", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ftrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ftserver", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ftoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_group" }, "columns": [ { "name": "groname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_group" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grosysid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_group" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grolist", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_group" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "columns": [ { "name": "line_number", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "database", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_name", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "address", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "netmask", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "auth_method", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "options", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "error", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "columns": [ { "name": "line_number", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "map_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sys_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pg_username", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "error", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indnatts", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indnkeyatts", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisunique", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indnullsnotdistinct", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisprimary", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisexclusion", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indimmediate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisclustered", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisvalid", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indcheckxmin", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisready", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indislive", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisreplident", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indkey", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indcollation", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oidvector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indclass", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oidvector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indoption", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexprs", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indpred", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablespace", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexdef", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inhrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inhparent", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inhseqno", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inhdetachpending", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "initprivs", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanispl", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanpltrusted", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanplcallfoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "laninline", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanvalidator", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "loid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pageno", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bytea" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lomowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lomacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "columns": [ { "name": "locktype", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "database", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relation", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "page", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tuple", "not_null": false, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "virtualxid", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "transactionid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": false, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "virtualtransaction", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "mode", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "granted", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fastpath", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "waitstart", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "matviewname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "matviewowner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablespace", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "hasindexes", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ispopulated", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "definition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "nspname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "nspowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "nspacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcmethod", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcfamily", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcintype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcdefault", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opckeytype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprkind", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprcanmerge", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprcanhash", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprleft", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprright", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprresult", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprcom", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprnegate", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprcode", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprrest", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprjoin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opfmethod", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opfname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opfnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opfowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parname", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "paracl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partstrat", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partnatts", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partdefid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partattrs", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partclass", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oidvector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partcollation", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oidvector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partexprs", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "policyname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "permissive", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "roles", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmd", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "qual", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "with_check", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polcmd", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polpermissive", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polroles", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polqual", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polwithcheck", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statement", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prepare_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parameter_types", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_regtype" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "from_sql", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "generic_plans", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "custom_plans", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "columns": [ { "name": "transaction", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "gid", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prepared", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "owner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "database", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pronamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prolang", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "procost", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prorows", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "provariadic", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prosupport", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prokind", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prosecdef", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proleakproof", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proisstrict", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proretset", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "provolatile", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proparallel", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pronargs", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pronargdefaults", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prorettype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proargtypes", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oidvector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proallargtypes", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proargmodes", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proargnames", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proargdefaults", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "protrftypes", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prosrc", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "probin", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prosqlbody", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "puballtables", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubinsert", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubupdate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubdelete", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubtruncate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubviaroot", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pnpubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pnnspid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prpubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prqual", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prattrs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "columns": [ { "name": "pubname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attnames", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rowfilter", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngtypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngsubtype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngmultitypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngcollation", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngsubopc", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngcanonical", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngsubdiff", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "roident", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "roname", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin_status" }, "columns": [ { "name": "local_id", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin_status" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "external_id", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin_status" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "remote_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin_status" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "local_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin_status" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "columns": [ { "name": "slot_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "plugin", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "slot_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datoid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "database", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "temporary", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "active", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "active_pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "catalog_xmin", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "restart_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confirmed_flush_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_status", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "safe_wal_size", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "two_phase", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rulename", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ev_class", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ev_type", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ev_enabled", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_instead", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ev_qual", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ev_action", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "columns": [ { "name": "rolname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolsuper", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolinherit", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcreaterole", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcreatedb", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcanlogin", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolreplication", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolconnlimit", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolpassword", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolvaliduntil", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolbypassrls", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rules" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rulename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "definition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "provider", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "label", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "columns": [ { "name": "objoid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objtype", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objnamespace", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objname", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "provider", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "label", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqtypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqstart", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqincrement", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqmax", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqmin", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqcache", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqcycle", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequencename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequenceowner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regtype" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "start_value", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "min_value", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "max_value", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "increment_by", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cycle", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cache_size", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_value", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setting", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "unit", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "category", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "short_desc", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extra_desc", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "context", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "vartype", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "source", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "min_val", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "max_val", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "enumvals", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "boot_val", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reset_val", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sourcefile", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sourceline", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pending_restart", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "columns": [ { "name": "usename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesysid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usecreatedb", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesuper", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "userepl", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usebypassrls", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "passwd", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "valuntil", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "useconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dbid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "refclassid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "refobjid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "deptype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "description", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shmem_allocations" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shmem_allocations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "off", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shmem_allocations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "size", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shmem_allocations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "allocated_size", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shmem_allocations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "provider", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "label", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "columns": [ { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "leader_pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesysid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "application_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_addr", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "inet" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_hostname", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_port", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_start", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xact_start", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "query_start", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "state_change", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wait_event_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wait_event", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "state", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_xid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_xmin", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "query_id", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "query", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_live_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_dead_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_mod_since_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_ins_since_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autovacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autoanalyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "vacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autovacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "analyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autoanalyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "columns": [ { "name": "archived_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_archived_wal", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_archived_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "failed_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_failed_wal", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_failed_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "columns": [ { "name": "checkpoints_timed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "checkpoints_req", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "checkpoint_write_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "checkpoint_sync_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "buffers_checkpoint", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "buffers_clean", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maxwritten_clean", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "buffers_backend", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "buffers_backend_fsync", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "buffers_alloc", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "columns": [ { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numbackends", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xact_commit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xact_rollback", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tup_returned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tup_fetched", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tup_inserted", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tup_updated", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tup_deleted", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conflicts", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "temp_files", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "temp_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "deadlocks", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "checksum_failures", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "checksum_last_failure", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blk_read_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blk_write_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "session_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "active_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idle_in_transaction_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sessions", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sessions_abandoned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sessions_fatal", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sessions_killed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "columns": [ { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confl_tablespace", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confl_lock", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confl_snapshot", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confl_bufferpin", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confl_deadlock", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_gssapi" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_gssapi" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "gss_authenticated", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_gssapi" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "principal", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_gssapi" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "encrypted", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_gssapi" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "phase", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sample_blks_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sample_blks_scanned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ext_stats_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ext_stats_computed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "child_tables_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "child_tables_done", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "current_child_table_relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "phase", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backup_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backup_streamed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablespaces_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablespaces_streamed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "command", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "phase", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cluster_index_relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_tuples_scanned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_tuples_written", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_scanned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "index_rebuild_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "command", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "bytes_processed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "bytes_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tuples_processed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tuples_excluded", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "index_relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "command", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "phase", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lockers_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lockers_done", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "current_locker_pid", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blocks_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blocks_done", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tuples_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tuples_done", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partitions_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partitions_done", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "phase", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_scanned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_vacuumed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "index_vacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "max_dead_tuples", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "num_dead_tuples", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "columns": [ { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prefetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "skip_init", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "skip_new", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "skip_fpw", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "skip_rep", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_distance", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "block_distance", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "io_depth", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesysid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "application_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_addr", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "inet" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_hostname", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_port", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_start", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_xmin", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "state", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sent_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "write_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "flush_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "replay_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "write_lag", "not_null": false, "is_array": false, "comment": "", "length": 16, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "interval" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "flush_lag", "not_null": false, "is_array": false, "comment": "", "length": 16, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "interval" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "replay_lag", "not_null": false, "is_array": false, "comment": "", "length": 16, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "interval" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sync_priority", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sync_state", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reply_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "columns": [ { "name": "slot_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spill_txns", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spill_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spill_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stream_txns", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stream_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stream_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_txns", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_zeroed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_written", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_exists", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "flushes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "truncates", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ssl", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cipher", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "bits", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_dn", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_serial", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "numeric" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "issuer_dn", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "columns": [ { "name": "subid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "received_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_msg_send_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_msg_receipt_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "latest_end_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "latest_end_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "columns": [ { "name": "subid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "apply_error_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sync_error_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_live_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_dead_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_mod_since_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_ins_since_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autovacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autoanalyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "vacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autovacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "analyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autoanalyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "columns": [ { "name": "funcid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "funcname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "calls", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "self_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_live_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_dead_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_mod_since_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_ins_since_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autovacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autoanalyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "vacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autovacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "analyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autoanalyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "columns": [ { "name": "wal_records", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_fpi", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_bytes", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "numeric" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_buffers_full", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_write", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_sync", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_write_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_sync_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "status", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "receive_start_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "receive_start_tli", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "written_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "flushed_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "received_tli", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_msg_send_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_msg_receipt_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "latest_end_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "latest_end_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "slot_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sender_host", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sender_port", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conninfo", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "columns": [ { "name": "funcid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "funcname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "calls", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "self_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "starelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staattnum", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stainherit", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanullfrac", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stawidth", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stadistinct", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stakind1", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stakind2", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stakind3", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stakind4", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stakind5", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staop1", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staop2", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staop3", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staop4", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staop5", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stacoll1", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stacoll2", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stacoll3", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stacoll4", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stacoll5", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanumbers1", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanumbers2", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanumbers3", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanumbers4", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanumbers5", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stavalues1", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stavalues2", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stavalues3", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stavalues4", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stavalues5", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxstattarget", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxkeys", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxkind", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxexprs", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxdinherit", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxdndistinct", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_ndistinct" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxddependencies", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_dependencies" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxdmcv", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_mcv_list" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxdexpr", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_pg_statistic" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inherited", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "null_frac", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "avg_width", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_distinct", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_vals", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "histogram_bounds", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "correlation", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_elems", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_elem_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "elem_count_histogram", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_owner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attnames", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "exprs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "kinds", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inherited", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_distinct", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_ndistinct" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dependencies", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_dependencies" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_vals", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_val_nulls", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_base_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_owner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "expr", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inherited", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "null_frac", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "avg_width", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_distinct", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_vals", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "histogram_bounds", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "correlation", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_elems", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_elem_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "elem_count_histogram", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subdbid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subskiplsn", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subenabled", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subbinary", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "substream", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subtwophasestate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subdisableonerr", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subconninfo", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subslotname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subsynccommit", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subpublications", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srsubstate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srsublsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tableowner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablespace", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "hasindexes", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "hasrules", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "hastriggers", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rowsecurity", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spcname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spcowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spcacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spcoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_abbrevs" }, "columns": [ { "name": "abbrev", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_abbrevs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "utc_offset", "not_null": false, "is_array": false, "comment": "", "length": 16, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_abbrevs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "interval" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_dst", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_abbrevs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_names" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_names" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "abbrev", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_names" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "utc_offset", "not_null": false, "is_array": false, "comment": "", "length": 16, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_names" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "interval" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_dst", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_names" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trftype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trflang", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trffromsql", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trftosql", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgparentid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgfoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgtype", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgenabled", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgisinternal", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgconstrrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgconstrindid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgconstraint", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgdeferrable", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tginitdeferred", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgnargs", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgattr", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgargs", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bytea" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgqual", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgoldtable", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgnewtable", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cfgname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cfgnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cfgowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cfgparser", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "mapcfg", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maptokentype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "mapseqno", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "mapdict", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dictname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dictnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dictowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dicttemplate", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dictinitoption", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prsname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prsnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prsstart", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prstoken", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prsend", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prsheadline", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prslextype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tmplname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tmplnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tmplinit", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tmpllexize", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typlen", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typbyval", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typcategory", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typispreferred", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typisdefined", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typdelim", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typsubscript", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typelem", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typarray", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typinput", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typoutput", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typreceive", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typsend", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typmodin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typmodout", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typanalyze", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typalign", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typstorage", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typnotnull", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typbasetype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typtypmod", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typndims", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typcollation", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typdefaultbin", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typdefault", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "columns": [ { "name": "usename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesysid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usecreatedb", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesuper", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "userepl", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usebypassrls", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "passwd", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "valuntil", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "useconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umuser", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umserver", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "columns": [ { "name": "umid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umuser", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_views" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "viewname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "viewowner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "definition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" } ], "enums": [], "composite_types": [] }, { "comment": "", "name": "information_schema", "tables": [ { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "columns": [ { "name": "oid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwowner", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_language", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "columns": [ { "name": "oid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_table_columns" }, "columns": [ { "name": "nspname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_table_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_table_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_table_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attfdwoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_table_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "columns": [ { "name": "foreign_table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ftoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "columns": [ { "name": "oid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umuser", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvowner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "administrable_role_authorizations" }, "columns": [ { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "administrable_role_authorizations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "role_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "administrable_role_authorizations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "administrable_role_authorizations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "applicable_roles" }, "columns": [ { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "applicable_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "role_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "applicable_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "applicable_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "columns": [ { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attribute_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordinal_position", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attribute_default", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_nullable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attribute_udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attribute_udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attribute_udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_derived_reference_attribute", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "columns": [ { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_repertoire", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "form_of_use", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_collate_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_collate_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_collate_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraints" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "check_clause", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "columns": [ { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collations" }, "columns": [ { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pad_attribute", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dependent_column", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "columns": [ { "name": "domain_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "columns": [ { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordinal_position", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_default", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_nullable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_self_referencing", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_identity", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_generation", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_start", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_increment", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_maximum", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_minimum", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_cycle", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_generated", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "generation_expression", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_updatable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "columns": [ { "name": "object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_deferrable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "initially_deferred", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "columns": [ { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "columns": [ { "name": "domain_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_default", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "columns": [ { "name": "object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collection_type_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_default", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "enabled_roles" }, "columns": [ { "name": "role_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "enabled_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrapper_options" }, "columns": [ { "name": "foreign_data_wrapper_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrapper_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrapper_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrapper_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrapper_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "columns": [ { "name": "foreign_data_wrapper_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "library_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_language", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_server_options" }, "columns": [ { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_server_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_server_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_server_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_server_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "columns": [ { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "columns": [ { "name": "foreign_table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "columns": [ { "name": "foreign_table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "information_schema_catalog_name" }, "columns": [ { "name": "catalog_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "information_schema_catalog_name" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordinal_position", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "position_in_unique_constraint", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordinal_position", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parameter_mode", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_result", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "as_locator", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parameter_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parameter_default", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "unique_constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "unique_constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "unique_constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "match_option", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "update_rule", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "delete_rule", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "with_hierarchy", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequence_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequence_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequence_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "module_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "module_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "module_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "type_udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "type_udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "type_udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_body", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_definition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "external_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "external_language", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parameter_style", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_deterministic", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sql_data_access", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_null_call", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sql_path", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schema_level_routine", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "max_dynamic_result_sets", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_user_defined_cast", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_implicitly_invocable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "security_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "to_sql_specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "to_sql_specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "to_sql_specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "as_locator", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "created", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "time_stamp" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_altered", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "time_stamp" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "new_savepoint_level", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_udt_dependent", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_from_data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_as_locator", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_char_max_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_char_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_char_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_char_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_char_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_type_udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_type_udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_type_udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "columns": [ { "name": "catalog_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schema_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schema_owner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sql_path", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "columns": [ { "name": "sequence_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequence_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequence_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "start_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "minimum_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "increment", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cycle_option", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "feature_id", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "feature_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sub_feature_id", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sub_feature_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_supported", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_verified_by", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comments", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "implementation_info_id", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "implementation_info_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "integer_value", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comments", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "feature_id", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "feature_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_supported", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_verified_by", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comments", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sizing_id", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sizing_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "supported_value", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comments", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_deferrable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "initially_deferred", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "enforced", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "nulls_distinct", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "with_hierarchy", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "self_referencing_column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reference_generation", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_insertable_into", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_typed", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "commit_action", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "columns": [ { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "group_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "transform_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "columns": [ { "name": "trigger_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trigger_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trigger_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_table", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_column", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "columns": [ { "name": "trigger_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trigger_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trigger_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_manipulation", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_table", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_order", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_condition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_statement", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_orientation", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_timing", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_reference_old_table", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_reference_new_table", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_reference_old_row", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_reference_new_row", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "created", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "time_stamp" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "columns": [ { "name": "user_defined_type_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_category", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_instantiable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_final", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordering_form", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordering_category", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordering_routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordering_routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordering_routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reference_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "source_dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ref_dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "columns": [ { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mappings" }, "columns": [ { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "columns": [ { "name": "view_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "view_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "view_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "columns": [ { "name": "view_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "view_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "view_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "view_definition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "check_option", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_updatable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_insertable_into", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_trigger_updatable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_trigger_deletable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_trigger_insertable_into", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" } ], "enums": [], "composite_types": [] } ] }, "queries": [ { "text": "SELECT id, name, bio FROM authors\nWHERE id = $1 LIMIT 1", "name": "GetAuthor", "cmd": ":one", "columns": [ { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "id", "unsigned": false, "array_dims": 0 }, { "name": "name", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "name", "unsigned": false, "array_dims": 0 }, { "name": "bio", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "bio", "unsigned": false, "array_dims": 0 } ], "params": [ { "number": 1, "column": { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "id", "unsigned": false, "array_dims": 0 } } ], "comments": [], "filename": "query.sql", "insert_into_table": null }, { "text": "SELECT id, name, bio FROM authors\nORDER BY name", "name": "ListAuthors", "cmd": ":many", "columns": [ { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "id", "unsigned": false, "array_dims": 0 }, { "name": "name", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "name", "unsigned": false, "array_dims": 0 }, { "name": "bio", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "bio", "unsigned": false, "array_dims": 0 } ], "params": [], "comments": [], "filename": "query.sql", "insert_into_table": null }, { "text": "INSERT INTO authors (\n name, bio\n) VALUES (\n $1, $2\n)\nRETURNING id, name, bio", "name": "CreateAuthor", "cmd": ":one", "columns": [ { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "id", "unsigned": false, "array_dims": 0 }, { "name": "name", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "name", "unsigned": false, "array_dims": 0 }, { "name": "bio", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "bio", "unsigned": false, "array_dims": 0 } ], "params": [ { "number": 1, "column": { "name": "name", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "public", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "name", "unsigned": false, "array_dims": 0 } }, { "number": 2, "column": { "name": "bio", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "public", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "bio", "unsigned": false, "array_dims": 0 } } ], "comments": [], "filename": "query.sql", "insert_into_table": { "catalog": "", "schema": "", "name": "authors" } }, { "text": "DELETE FROM authors\nWHERE id = $1", "name": "DeleteAuthor", "cmd": ":exec", "columns": [], "params": [ { "number": 1, "column": { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "id", "unsigned": false, "array_dims": 0 } } ], "comments": [], "filename": "query.sql", "insert_into_table": null } ], "sqlc_version": "v1.30.0", "plugin_options": "eyJmaWxlbmFtZSI6ImNvZGVnZW4uanNvbiIsImluZGVudCI6IiAgIn0=" } ================================================ FILE: internal/endtoend/testdata/process_plugin_disabled/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/process_plugin_disabled/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/process_plugin_disabled/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "codegen": [ { "out": "gen", "plugin": "jsonb", "options": { "indent": " ", "filename": "codegen.json" } } ] } ], "plugins": [ { "name": "jsonb", "process": { "cmd": "sqlc-gen-json" } } ] } ================================================ FILE: internal/endtoend/testdata/process_plugin_disabled/stderr.txt ================================================ error validating sqlc.json: plugin: process-based plugins disabled via SQLCDEBUG=processplugins=0 ================================================ FILE: internal/endtoend/testdata/process_plugin_format_json/exec.json ================================================ { "process": "test-json-process-plugin", "os": [ "darwin", "linux" ] } ================================================ FILE: internal/endtoend/testdata/process_plugin_format_json/gen/hello.txt ================================================ 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 ================================================ FILE: internal/endtoend/testdata/process_plugin_format_json/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/process_plugin_format_json/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/process_plugin_format_json/sqlc.json ================================================ { "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" } } ] } ================================================ FILE: internal/endtoend/testdata/process_plugin_sqlc_gen_json/exec.json ================================================ { "contexts": ["base"], "process": "sqlc-gen-json" } ================================================ FILE: internal/endtoend/testdata/process_plugin_sqlc_gen_json/gen/codegen.json ================================================ { "settings": { "version": "2", "engine": "postgresql", "schema": [ "schema.sql" ], "queries": [ "query.sql" ], "codegen": { "out": "gen", "plugin": "jsonb", "options": "eyJmaWxlbmFtZSI6ImNvZGVnZW4uanNvbiIsImluZGVudCI6IiAgIn0=", "env": [], "process": { "cmd": "sqlc-gen-json" }, "wasm": null } }, "catalog": { "comment": "", "default_schema": "public", "name": "", "schemas": [ { "comment": "", "name": "public", "tables": [ { "rel": { "catalog": "", "schema": "", "name": "authors" }, "columns": [ { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "name", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "bio", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" } ], "enums": [], "composite_types": [] }, { "comment": "", "name": "pg_temp", "tables": [], "enums": [], "composite_types": [] }, { "comment": "", "name": "pg_catalog", "tables": [ { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggfnoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggkind", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggnumdirectargs", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggtransfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggfinalfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggcombinefn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggserialfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggdeserialfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmtransfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggminvtransfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmfinalfn", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggfinalextra", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmfinalextra", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggfinalmodify", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmfinalmodify", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggsortop", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggtranstype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggtransspace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmtranstype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggmtransspace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "agginitval", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "aggminitval", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_aggregate" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amhandler", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_am" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amopfamily", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amoplefttype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amoprighttype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amopstrategy", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amoppurpose", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amopopr", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amopmethod", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amopsortfamily", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amop" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amprocfamily", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amproclefttype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amprocrighttype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amprocnum", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "amproc", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_amproc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "adrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "adnum", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "adbin", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attrdef" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "atttypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attstattarget", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attlen", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attnum", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attndims", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attcacheoff", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "atttypmod", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attbyval", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attalign", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attstorage", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attcompression", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attnotnull", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "atthasdef", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "atthasmissing", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attidentity", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attgenerated", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attisdropped", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attislocal", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attinhcount", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attcollation", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attfdwoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attmissingval", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_attribute" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "roleid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "member", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantor", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "admin_option", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_auth_members" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolsuper", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolinherit", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcreaterole", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcreatedb", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcanlogin", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolreplication", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolbypassrls", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolconnlimit", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolpassword", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolvaliduntil", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_authid" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "installed", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "superuser", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trusted", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relocatable", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "requires", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comment", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extension_versions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extensions" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extensions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extensions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "installed_version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extensions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comment", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_available_extensions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ident", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parent", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "level", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_nblocks", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "free_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "free_chunks", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "used_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_backend_memory_contexts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "castsource", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "casttarget", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "castfunc", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "castcontext", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "castmethod", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cast" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reltype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reloftype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relam", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relfilenode", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reltablespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relpages", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reltuples", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relallvisible", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reltoastrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relhasindex", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relisshared", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relpersistence", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relkind", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relnatts", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relchecks", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relhasrules", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relhastriggers", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relhassubclass", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relrowsecurity", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relforcerowsecurity", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relispopulated", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relreplident", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relispartition", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relrewrite", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relfrozenxid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relminmxid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reloptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relpartbound", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_class" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collprovider", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collisdeterministic", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collencoding", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collcollate", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collctype", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "colliculocale", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collversion", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_collation" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_config" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setting", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "connamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "contype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "condeferrable", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "condeferred", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "convalidated", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "contypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conindid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conparentid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confupdtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confdeltype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confmatchtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conislocal", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "coninhcount", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "connoinherit", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conkey", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confkey", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conpfeqop", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conppeqop", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conffeqop", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confdelsetcols", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conexclop", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conbin", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_constraint" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "connamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conforencoding", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "contoencoding", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conproc", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "condefault", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_conversion" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statement", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_holdable", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_binary", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_scrollable", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "creation_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_cursors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datdba", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "encoding", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datlocprovider", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datistemplate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datallowconn", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datconnlimit", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datfrozenxid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datminmxid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dattablespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datcollate", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datctype", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "daticulocale", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datcollversion", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setdatabase", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setrole", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_db_role_setting" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "defaclrole", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "defaclnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "defaclobjtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "defaclacl", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_default_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "refclassid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "refobjid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "refobjsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "deptype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_depend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "description", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_description" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "enumtypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "enumsortorder", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "enumlabel", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_enum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evtname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evtevent", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evtowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evtfoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evtenabled", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "evttags", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_event_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extrelocatable", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extversion", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extcondition", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_extension" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "columns": [ { "name": "sourcefile", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sourceline", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqno", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setting", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "applied", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "error", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_file_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwhandler", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwvalidator", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_data_wrapper" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvfdw", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvtype", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvversion", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_server" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ftrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ftserver", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ftoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_foreign_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_group" }, "columns": [ { "name": "groname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_group" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grosysid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_group" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grolist", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_group" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "columns": [ { "name": "line_number", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "database", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_name", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "address", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "netmask", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "auth_method", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "options", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "error", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_hba_file_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "columns": [ { "name": "line_number", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "map_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sys_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pg_username", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "error", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ident_file_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indnatts", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indnkeyatts", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisunique", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indnullsnotdistinct", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisprimary", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisexclusion", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indimmediate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisclustered", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisvalid", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indcheckxmin", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisready", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indislive", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indisreplident", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indkey", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indcollation", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oidvector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indclass", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oidvector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indoption", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexprs", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indpred", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablespace", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexdef", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inhrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inhparent", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inhseqno", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inhdetachpending", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_inherits" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "initprivs", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_init_privs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanispl", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanpltrusted", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanplcallfoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "laninline", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanvalidator", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lanacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_language" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "loid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pageno", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bytea" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lomowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lomacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_largeobject_metadata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "columns": [ { "name": "locktype", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "database", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relation", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "page", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tuple", "not_null": false, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "virtualxid", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "transactionid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": false, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "virtualtransaction", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "mode", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "granted", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fastpath", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "waitstart", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_locks" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "matviewname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "matviewowner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablespace", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "hasindexes", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ispopulated", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "definition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_matviews" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "nspname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "nspowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "nspacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcmethod", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcfamily", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcintype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opcdefault", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opckeytype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opclass" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprkind", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprcanmerge", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprcanhash", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprleft", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprright", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprresult", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprcom", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprnegate", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprcode", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprrest", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oprjoin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_operator" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opfmethod", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opfname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opfnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "opfowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_opfamily" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parname", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "paracl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_parameter_acl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partstrat", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partnatts", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partdefid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partattrs", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partclass", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oidvector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partcollation", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oidvector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partexprs", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_partitioned_table" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "policyname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "permissive", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "roles", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmd", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "qual", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "with_check", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policies" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polcmd", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polpermissive", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polroles", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polqual", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "polwithcheck", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_policy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statement", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prepare_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parameter_types", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_regtype" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "from_sql", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "generic_plans", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "custom_plans", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_statements" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "columns": [ { "name": "transaction", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "gid", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prepared", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "owner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "database", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_prepared_xacts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pronamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prolang", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "procost", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prorows", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "provariadic", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prosupport", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prokind", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prosecdef", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proleakproof", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proisstrict", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proretset", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "provolatile", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proparallel", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pronargs", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pronargdefaults", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prorettype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proargtypes", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oidvector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proallargtypes", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proargmodes", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proargnames", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proargdefaults", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "protrftypes", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prosrc", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "probin", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prosqlbody", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "proacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_proc" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "puballtables", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubinsert", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubupdate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubdelete", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubtruncate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pubviaroot", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pnpubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pnnspid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_namespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prpubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prqual", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prattrs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "columns": [ { "name": "pubname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attnames", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rowfilter", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_publication_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngtypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngsubtype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngmultitypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngcollation", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngsubopc", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngcanonical", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rngsubdiff", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_range" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "roident", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "roname", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin_status" }, "columns": [ { "name": "local_id", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin_status" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "external_id", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin_status" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "remote_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin_status" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "local_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_origin_status" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "columns": [ { "name": "slot_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "plugin", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "slot_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datoid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "database", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "temporary", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "active", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "active_pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "catalog_xmin", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "restart_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confirmed_flush_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_status", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "safe_wal_size", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "two_phase", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rulename", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ev_class", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ev_type", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ev_enabled", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_instead", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ev_qual", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ev_action", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rewrite" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "columns": [ { "name": "rolname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolsuper", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolinherit", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcreaterole", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcreatedb", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolcanlogin", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolreplication", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolconnlimit", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolpassword", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolvaliduntil", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolbypassrls", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rolconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rules" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rulename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "definition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_rules" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "provider", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "label", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "columns": [ { "name": "objoid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objtype", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objnamespace", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objname", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "provider", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "label", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_seclabels" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqtypid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqstart", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqincrement", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqmax", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqmin", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqcache", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seqcycle", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequence" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequencename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequenceowner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regtype" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "start_value", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "min_value", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "max_value", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "increment_by", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cycle", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cache_size", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_value", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "setting", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "unit", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "category", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "short_desc", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "extra_desc", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "context", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "vartype", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "source", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "min_val", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "max_val", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "enumvals", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "boot_val", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reset_val", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sourcefile", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sourceline", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pending_restart", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_settings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "columns": [ { "name": "usename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesysid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usecreatedb", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesuper", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "userepl", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usebypassrls", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "passwd", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "valuntil", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "useconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shadow" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dbid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "refclassid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "refobjid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "deptype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdepend" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "description", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shdescription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shmem_allocations" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shmem_allocations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "off", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shmem_allocations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "size", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shmem_allocations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "allocated_size", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shmem_allocations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "objoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "classoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "provider", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "label", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_shseclabel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "columns": [ { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "leader_pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesysid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "application_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_addr", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "inet" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_hostname", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_port", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_start", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xact_start", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "query_start", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "state_change", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wait_event_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wait_event", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "state", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_xid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_xmin", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "query_id", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "query", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_activity" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_live_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_dead_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_mod_since_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_ins_since_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autovacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autoanalyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "vacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autovacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "analyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autoanalyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "columns": [ { "name": "archived_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_archived_wal", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_archived_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "failed_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_failed_wal", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_failed_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_archiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "columns": [ { "name": "checkpoints_timed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "checkpoints_req", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "checkpoint_write_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "checkpoint_sync_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "buffers_checkpoint", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "buffers_clean", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maxwritten_clean", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "buffers_backend", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "buffers_backend_fsync", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "buffers_alloc", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_bgwriter" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "columns": [ { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numbackends", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xact_commit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xact_rollback", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tup_returned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tup_fetched", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tup_inserted", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tup_updated", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tup_deleted", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conflicts", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "temp_files", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "temp_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "deadlocks", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "checksum_failures", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "checksum_last_failure", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blk_read_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blk_write_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "session_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "active_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idle_in_transaction_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sessions", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sessions_abandoned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sessions_fatal", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sessions_killed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "columns": [ { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confl_tablespace", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confl_lock", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confl_snapshot", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confl_bufferpin", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "confl_deadlock", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_database_conflicts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_gssapi" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_gssapi" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "gss_authenticated", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_gssapi" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "principal", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_gssapi" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "encrypted", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_gssapi" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "phase", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sample_blks_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sample_blks_scanned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ext_stats_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ext_stats_computed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "child_tables_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "child_tables_done", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "current_child_table_relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_analyze" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "phase", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backup_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backup_streamed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablespaces_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablespaces_streamed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_basebackup" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "command", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "phase", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cluster_index_relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_tuples_scanned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_tuples_written", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_scanned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "index_rebuild_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_cluster" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "command", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "bytes_processed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "bytes_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tuples_processed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tuples_excluded", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_copy" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "index_relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "command", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "phase", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lockers_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "lockers_done", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "current_locker_pid", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blocks_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blocks_done", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tuples_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tuples_done", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partitions_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "partitions_done", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_create_index" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "phase", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_total", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_scanned", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_vacuumed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "index_vacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "max_dead_tuples", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "num_dead_tuples", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_progress_vacuum" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "columns": [ { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prefetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "skip_init", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "skip_new", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "skip_fpw", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "skip_rep", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_distance", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "block_distance", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "io_depth", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_recovery_prefetch" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesysid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "application_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_addr", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "inet" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_hostname", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_port", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_start", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "backend_xmin", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "state", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sent_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "write_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "flush_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "replay_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "write_lag", "not_null": false, "is_array": false, "comment": "", "length": 16, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "interval" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "flush_lag", "not_null": false, "is_array": false, "comment": "", "length": 16, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "interval" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "replay_lag", "not_null": false, "is_array": false, "comment": "", "length": 16, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "interval" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sync_priority", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sync_state", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reply_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "columns": [ { "name": "slot_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spill_txns", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spill_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spill_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stream_txns", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stream_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stream_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_txns", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_bytes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_replication_slots" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_zeroed", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_written", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_exists", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "flushes", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "truncates", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_slru" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ssl", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cipher", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "bits", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_dn", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "client_serial", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "numeric" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "issuer_dn", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_ssl" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "columns": [ { "name": "subid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "received_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_msg_send_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_msg_receipt_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "latest_end_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "latest_end_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "columns": [ { "name": "subid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "apply_error_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sync_error_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_subscription_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_live_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_dead_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_mod_since_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_ins_since_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autovacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autoanalyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "vacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autovacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "analyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autoanalyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "columns": [ { "name": "funcid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "funcname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "calls", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "self_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_live_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_dead_tup", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_mod_since_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_ins_since_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_vacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autovacuum", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_analyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_autoanalyze", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "vacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autovacuum_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "analyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "autoanalyze_count", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "columns": [ { "name": "wal_records", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_fpi", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_bytes", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "numeric" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_buffers_full", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_write", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_sync", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_write_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "wal_sync_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stats_reset", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "columns": [ { "name": "pid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "status", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "receive_start_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "receive_start_tli", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "written_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "flushed_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "received_tli", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_msg_send_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_msg_receipt_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "latest_end_lsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "latest_end_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "slot_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sender_host", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sender_port", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "conninfo", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_wal_receiver" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "columns": [ { "name": "funcid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "funcname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "calls", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "total_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "self_time", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_functions" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "seq_tup_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_scan", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_tup_fetch", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_ins", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_del", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_tup_hot_upd", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stat_xact_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_all_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_sys_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "indexrelname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_indexes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "columns": [ { "name": "relid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "heap_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "idx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "toast_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_read", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tidx_blks_hit", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statio_user_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "starelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staattnum", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stainherit", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanullfrac", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stawidth", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stadistinct", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stakind1", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stakind2", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stakind3", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stakind4", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stakind5", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staop1", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staop2", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staop3", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staop4", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "staop5", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stacoll1", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stacoll2", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stacoll3", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stacoll4", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stacoll5", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanumbers1", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanumbers2", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanumbers3", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanumbers4", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stanumbers5", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stavalues1", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stavalues2", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stavalues3", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stavalues4", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stavalues5", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxstattarget", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxkeys", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxkind", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxexprs", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxdinherit", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxdndistinct", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_ndistinct" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxddependencies", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_dependencies" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxdmcv", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_mcv_list" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "stxdexpr", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_statistic_ext_data" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_pg_statistic" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inherited", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "null_frac", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "avg_width", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_distinct", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_vals", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "histogram_bounds", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "correlation", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_elems", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_elem_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "elem_count_histogram", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_owner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attnames", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "exprs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "kinds", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inherited", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_distinct", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_ndistinct" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dependencies", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_dependencies" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_vals", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_val_nulls", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_base_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float8" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "statistics_owner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "expr", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "inherited", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "null_frac", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "avg_width", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "n_distinct", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_vals", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "histogram_bounds", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "correlation", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_elems", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "anyarray" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "most_common_elem_freqs", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "elem_count_histogram", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_stats_ext_exprs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_float4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subdbid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subskiplsn", "not_null": true, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subenabled", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subbinary", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "substream", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subtwophasestate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subdisableonerr", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subconninfo", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subslotname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subsynccommit", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "subpublications", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srsubid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srsubstate", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srsublsn", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_subscription_rel" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_lsn" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tableowner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tablespace", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "hasindexes", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "hasrules", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "hastriggers", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "rowsecurity", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spcname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spcowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spcacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "spcoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_tablespace" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_abbrevs" }, "columns": [ { "name": "abbrev", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_abbrevs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "utc_offset", "not_null": false, "is_array": false, "comment": "", "length": 16, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_abbrevs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "interval" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_dst", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_abbrevs" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_names" }, "columns": [ { "name": "name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_names" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "abbrev", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_names" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "utc_offset", "not_null": false, "is_array": false, "comment": "", "length": 16, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_names" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "interval" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_dst", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_timezone_names" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trftype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trflang", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trffromsql", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trftosql", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_transform" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgparentid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgfoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgtype", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgenabled", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgisinternal", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgconstrrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgconstrindid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgconstraint", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgdeferrable", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tginitdeferred", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgnargs", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgattr", "not_null": true, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2vector" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgargs", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bytea" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgqual", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgoldtable", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tgnewtable", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_trigger" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cfgname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cfgnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cfgowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cfgparser", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "mapcfg", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maptokentype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "mapseqno", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "mapdict", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_config_map" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dictname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dictnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dictowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dicttemplate", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dictinitoption", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_dict" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prsname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prsnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prsstart", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prstoken", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prsend", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prsheadline", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "prslextype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_parser" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tmplname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tmplnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tmplinit", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "tmpllexize", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_ts_template" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typname", "not_null": true, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typnamespace", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typowner", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typlen", "not_null": true, "is_array": false, "comment": "", "length": 2, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int2" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typbyval", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typtype", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typcategory", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typispreferred", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typisdefined", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typdelim", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typrelid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typsubscript", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typelem", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typarray", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typinput", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typoutput", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typreceive", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typsend", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typmodin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typmodout", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typanalyze", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "regproc" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typalign", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typstorage", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "char" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typnotnull", "not_null": true, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typbasetype", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typtypmod", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typndims", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "int4" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typcollation", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typdefaultbin", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "pg_node_tree" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typdefault", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "typacl", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_type" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_aclitem" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "columns": [ { "name": "usename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesysid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usecreatedb", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usesuper", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "userepl", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usebypassrls", "not_null": false, "is_array": false, "comment": "", "length": 1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bool" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "passwd", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "valuntil", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "timestamptz" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "useconfig", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "oid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umuser", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umserver", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mapping" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "columns": [ { "name": "umid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umuser", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "usename", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_views" }, "columns": [ { "name": "schemaname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "viewname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "viewowner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "definition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "pg_catalog", "name": "pg_views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" } ], "enums": [], "composite_types": [] }, { "comment": "", "name": "information_schema", "tables": [ { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "columns": [ { "name": "oid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwowner", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "fdwoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_language", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "columns": [ { "name": "oid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_table_columns" }, "columns": [ { "name": "nspname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_table_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "relname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_table_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attname", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_table_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "name" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attfdwoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_table_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "columns": [ { "name": "foreign_table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ftoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "columns": [ { "name": "oid", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umoptions", "not_null": false, "is_array": true, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "_text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "umuser", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "srvowner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "_pg_user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "administrable_role_authorizations" }, "columns": [ { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "administrable_role_authorizations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "role_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "administrable_role_authorizations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "administrable_role_authorizations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "applicable_roles" }, "columns": [ { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "applicable_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "role_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "applicable_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "applicable_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "columns": [ { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attribute_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordinal_position", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attribute_default", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_nullable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attribute_udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attribute_udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "attribute_udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_derived_reference_attribute", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "attributes" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "columns": [ { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_repertoire", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "form_of_use", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_collate_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_collate_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_collate_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "character_sets" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraint_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraints" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "check_clause", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "check_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "columns": [ { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collation_character_set_applicability" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collations" }, "columns": [ { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "pad_attribute", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "collations" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dependent_column", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "columns": [ { "name": "domain_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_domain_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "columns": [ { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "column_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordinal_position", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_default", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_nullable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_self_referencing", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_identity", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_generation", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_start", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_increment", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_maximum", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_minimum", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "identity_cycle", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_generated", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "generation_expression", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_updatable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "constraint_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "columns": [ { "name": "object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "data_type_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_deferrable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "initially_deferred", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "columns": [ { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domain_udt_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "columns": [ { "name": "domain_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_default", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "domains" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "columns": [ { "name": "object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collection_type_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "domain_default", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "element_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "enabled_roles" }, "columns": [ { "name": "role_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "enabled_roles" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrapper_options" }, "columns": [ { "name": "foreign_data_wrapper_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrapper_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrapper_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrapper_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrapper_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "columns": [ { "name": "foreign_data_wrapper_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "library_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_language", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_data_wrappers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_server_options" }, "columns": [ { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_server_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_server_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_server_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_server_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "columns": [ { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_data_wrapper_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_version", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_servers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "columns": [ { "name": "foreign_table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_table_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "columns": [ { "name": "foreign_table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "foreign_tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "information_schema_catalog_name" }, "columns": [ { "name": "catalog_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "information_schema_catalog_name" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordinal_position", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "position_in_unique_constraint", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "key_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordinal_position", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parameter_mode", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_result", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "as_locator", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parameter_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parameter_default", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "parameters" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "unique_constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "unique_constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "unique_constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "match_option", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "update_rule", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "delete_rule", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "referential_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_column_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_routine_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "with_hierarchy", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_table_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_udt_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "role_usage_grants" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequence_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequence_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequence_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_sequence_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routine_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "columns": [ { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "module_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "module_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "module_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "type_udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "type_udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "type_udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_body", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "routine_definition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "external_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "external_language", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "parameter_style", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_deterministic", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sql_data_access", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_null_call", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sql_path", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schema_level_routine", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "max_dynamic_result_sets", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_user_defined_cast", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_implicitly_invocable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "security_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "to_sql_specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "to_sql_specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "to_sql_specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "as_locator", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "created", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "time_stamp" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "last_altered", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "time_stamp" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "new_savepoint_level", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_udt_dependent", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_from_data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_as_locator", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_char_max_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_char_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_char_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_char_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_char_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_type_udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_type_udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_type_udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_scope_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_scope_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_scope_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_maximum_cardinality", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "result_cast_dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "routines" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "columns": [ { "name": "catalog_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schema_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "schema_owner", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "default_character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sql_path", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "schemata" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "columns": [ { "name": "sequence_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequence_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sequence_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "start_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "minimum_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "maximum_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "increment", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cycle_option", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sequences" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "feature_id", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "feature_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sub_feature_id", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sub_feature_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_supported", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_verified_by", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comments", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_features" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "implementation_info_id", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "implementation_info_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "integer_value", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comments", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_implementation_info" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "feature_id", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "feature_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_supported", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_verified_by", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comments", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_parts" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "columns": [ { "name": "tableoid", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "oid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmax", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "cmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "xmin", "not_null": true, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "xid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ctid", "not_null": true, "is_array": false, "comment": "", "length": 6, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "tid" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sizing_id", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "sizing_name", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "supported_value", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "comments", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "sql_sizing" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "columns": [ { "name": "constraint_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "constraint_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_deferrable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "initially_deferred", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "enforced", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "nulls_distinct", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_constraints" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "with_hierarchy", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "table_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "self_referencing_column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reference_generation", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_insertable_into", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_typed", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "commit_action", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "tables" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "columns": [ { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "group_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "transform_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "transforms" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "columns": [ { "name": "trigger_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trigger_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trigger_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_table", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_column", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggered_update_columns" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "columns": [ { "name": "trigger_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trigger_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "trigger_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_manipulation", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "event_object_table", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_order", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_condition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_statement", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_orientation", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_timing", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_reference_old_table", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_reference_new_table", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_reference_old_row", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "action_reference_new_row", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "created", "not_null": false, "is_array": false, "comment": "", "length": 8, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "triggers" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "time_stamp" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "udt_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "udt_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "columns": [ { "name": "grantor", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "grantee", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "object_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "privilege_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_grantable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "usage_privileges" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "columns": [ { "name": "user_defined_type_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "user_defined_type_category", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_instantiable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_final", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordering_form", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordering_category", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordering_routine_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordering_routine_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ordering_routine_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "reference_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "data_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_maximum_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_octet_length", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "character_set_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "collation_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_precision_radix", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "numeric_scale", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "datetime_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_type", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "interval_precision", "not_null": false, "is_array": false, "comment": "", "length": 4, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "cardinal_number" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "source_dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "ref_dtd_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_defined_types" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "columns": [ { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "option_value", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mapping_options" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mappings" }, "columns": [ { "name": "authorization_identifier", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "foreign_server_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "user_mappings" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "columns": [ { "name": "view_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "view_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "view_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "column_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_column_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "specific_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_routine_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "columns": [ { "name": "view_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "view_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "view_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "view_table_usage" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" }, { "rel": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "columns": [ { "name": "table_catalog", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_schema", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "table_name", "not_null": false, "is_array": false, "comment": "", "length": 64, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "sql_identifier" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "view_definition", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "check_option", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "character_data" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_updatable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_insertable_into", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_trigger_updatable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_trigger_deletable", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 }, { "name": "is_trigger_insertable_into", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "pg_catalog", "schema": "information_schema", "name": "views" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "yes_or_no" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "", "unsigned": false, "array_dims": 0 } ], "comment": "" } ], "enums": [], "composite_types": [] } ] }, "queries": [ { "text": "SELECT id, name, bio FROM authors\nWHERE id = $1 LIMIT 1", "name": "GetAuthor", "cmd": ":one", "columns": [ { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "id", "unsigned": false, "array_dims": 0 }, { "name": "name", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "name", "unsigned": false, "array_dims": 0 }, { "name": "bio", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "bio", "unsigned": false, "array_dims": 0 } ], "params": [ { "number": 1, "column": { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "id", "unsigned": false, "array_dims": 0 } } ], "comments": [], "filename": "query.sql", "insert_into_table": null }, { "text": "SELECT id, name, bio FROM authors\nORDER BY name", "name": "ListAuthors", "cmd": ":many", "columns": [ { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "id", "unsigned": false, "array_dims": 0 }, { "name": "name", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "name", "unsigned": false, "array_dims": 0 }, { "name": "bio", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "bio", "unsigned": false, "array_dims": 0 } ], "params": [], "comments": [], "filename": "query.sql", "insert_into_table": null }, { "text": "INSERT INTO authors (\n name, bio\n) VALUES (\n $1, $2\n)\nRETURNING id, name, bio", "name": "CreateAuthor", "cmd": ":one", "columns": [ { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "id", "unsigned": false, "array_dims": 0 }, { "name": "name", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "name", "unsigned": false, "array_dims": 0 }, { "name": "bio", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "bio", "unsigned": false, "array_dims": 0 } ], "params": [ { "number": 1, "column": { "name": "name", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "public", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "name", "unsigned": false, "array_dims": 0 } }, { "number": 2, "column": { "name": "bio", "not_null": false, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "public", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "text" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "bio", "unsigned": false, "array_dims": 0 } } ], "comments": [], "filename": "query.sql", "insert_into_table": { "catalog": "", "schema": "", "name": "authors" } }, { "text": "DELETE FROM authors\nWHERE id = $1", "name": "DeleteAuthor", "cmd": ":exec", "columns": [], "params": [ { "number": 1, "column": { "name": "id", "not_null": true, "is_array": false, "comment": "", "length": -1, "is_named_param": false, "is_func_call": false, "scope": "", "table": { "catalog": "", "schema": "", "name": "authors" }, "table_alias": "", "type": { "catalog": "", "schema": "", "name": "bigserial" }, "is_sqlc_slice": false, "embed_table": null, "original_name": "id", "unsigned": false, "array_dims": 0 } } ], "comments": [], "filename": "query.sql", "insert_into_table": null } ], "sqlc_version": "v1.30.0", "plugin_options": "eyJmaWxlbmFtZSI6ImNvZGVnZW4uanNvbiIsImluZGVudCI6IiAgIn0=", "global_options": "" } ================================================ FILE: internal/endtoend/testdata/process_plugin_sqlc_gen_json/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/process_plugin_sqlc_gen_json/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/process_plugin_sqlc_gen_json/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "codegen": [ { "out": "gen", "plugin": "jsonb", "options": { "indent": " ", "filename": "codegen.json" } } ] } ], "plugins": [ { "name": "jsonb", "process": { "cmd": "sqlc-gen-json" } } ] } ================================================ FILE: internal/endtoend/testdata/process_plugin_sqlc_gen_test/exec.json ================================================ { "process": "sqlc-gen-test", "os": ["linux", "darwin"] } ================================================ FILE: internal/endtoend/testdata/process_plugin_sqlc_gen_test/gen/env.json ================================================ { "env": [ "SQLC_VERSION=v1.30.0", "SQLC_DUMMY_VALUE=true" ] } ================================================ FILE: internal/endtoend/testdata/process_plugin_sqlc_gen_test/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/process_plugin_sqlc_gen_test/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/process_plugin_sqlc_gen_test/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "codegen": [ { "out": "gen", "plugin": "test" } ] } ], "plugins": [ { "name": "test", "env": ["SQLC_DUMMY_VALUE"], "process": { "cmd": "sqlc-gen-test" } } ] } ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_invalid/postgresql/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE name = $1 AND country_code = $2 LIMIT 1; -- name: ListAuthors :many SELECT * FROM authors ORDER BY name; -- name: CreateAuthor :one INSERT INTO authors ( name, bio, country_code ) VALUES ( $1, $2, $3 ) RETURNING *; -- name: DeleteAuthor :exec DELETE FROM authors WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_invalid/postgresql/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text, country_code CHAR(2) NOT NULL ); ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_invalid/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "query_parameter_limit": -1 } ] } ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_invalid/postgresql/stderr.txt ================================================ # package querytest error generating code: invalid options: query parameter limit must not be negative ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "time" ) type Notice struct { ID int32 Cnt int32 Status string NoticeAt sql.NullTime CreatedAt time.Time } ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" "database/sql" "time" ) type Querier interface { CreateNotice(ctx context.Context, cnt int32, createdAt time.Time) error MarkNoticeDone(ctx context.Context, noticeAt sql.NullTime, iD int32) error } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "time" ) const createNotice = `-- name: CreateNotice :exec INSERT INTO notice (cnt, created_at) VALUES ($1, $2) ` func (q *Queries) CreateNotice(ctx context.Context, cnt int32, createdAt time.Time) error { _, err := q.db.ExecContext(ctx, createNotice, cnt, createdAt) return err } const markNoticeDone = `-- name: MarkNoticeDone :exec UPDATE notice SET status='done', notice_at=$1 WHERE id=$2 ` func (q *Queries) MarkNoticeDone(ctx context.Context, noticeAt sql.NullTime, iD int32) error { _, err := q.db.ExecContext(ctx, markNoticeDone, noticeAt, iD) return err } ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/query.sql ================================================ -- name: MarkNoticeDone :exec UPDATE notice SET status='done', notice_at=$1 WHERE id=$2; -- name: CreateNotice :exec INSERT INTO notice (cnt, created_at) VALUES ($1, $2); ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/schema.sql ================================================ CREATE TABLE notice ( id INTEGER NOT NULL, cnt INTEGER NOT NULL, status TEXT NOT NULL, notice_at TIMESTAMP, created_at TIMESTAMP NOT NULL ); ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_param_only/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "query_parameter_limit": 2, "emit_interface": true, "name": "querytest" } ] } ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/go/models.go ================================================ // 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 CountryCode string Titles []string } type Client struct { ID int32 Name string } ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "strings" "github.com/lib/pq" ) const addNewClient = `-- name: AddNewClient :one INSERT INTO clients ( id, name ) VALUES ( $1, $2 ) RETURNING id, name ` func (q *Queries) AddNewClient(ctx context.Context, iD int32, name string) (Client, error) { row := q.db.QueryRowContext(ctx, addNewClient, iD, name) var i Client err := row.Scan(&i.ID, &i.Name) return i, err } const createAuthor = `-- name: CreateAuthor :one INSERT INTO authors ( name, bio, country_code, titles ) VALUES ( $1, $2, $3, $4 ) RETURNING id, name, bio, country_code, titles ` type CreateAuthorParams struct { Name string Bio sql.NullString CountryCode string Titles []string } func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (Author, error) { row := q.db.QueryRowContext(ctx, createAuthor, arg.Name, arg.Bio, arg.CountryCode, pq.Array(arg.Titles), ) var i Author err := row.Scan( &i.ID, &i.Name, &i.Bio, &i.CountryCode, pq.Array(&i.Titles), ) return i, err } const createAuthorOnlyTitles = `-- name: CreateAuthorOnlyTitles :one INSERT INTO authors (name, titles) VALUES ($1, $2) RETURNING id, name, bio, country_code, titles ` func (q *Queries) CreateAuthorOnlyTitles(ctx context.Context, name string, titles []string) (Author, error) { row := q.db.QueryRowContext(ctx, createAuthorOnlyTitles, name, pq.Array(titles)) var i Author err := row.Scan( &i.ID, &i.Name, &i.Bio, &i.CountryCode, pq.Array(&i.Titles), ) 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 deleteAuthors = `-- name: DeleteAuthors :exec DELETE FROM authors WHERE id IN ($2) AND name = $1 ` func (q *Queries) DeleteAuthors(ctx context.Context, name string, ids []int64) error { query := deleteAuthors var queryParams []interface{} queryParams = append(queryParams, name) if len(ids) > 0 { for _, v := range ids { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:ids*/?", strings.Repeat(",?", len(ids))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:ids*/?", "NULL", 1) } _, err := q.db.ExecContext(ctx, query, queryParams...) return err } const getAuthor = `-- name: GetAuthor :one SELECT id, name, bio, country_code, titles FROM authors WHERE name = $1 AND country_code = $2 LIMIT 1 ` func (q *Queries) GetAuthor(ctx context.Context, name string, countryCode string) (Author, error) { row := q.db.QueryRowContext(ctx, getAuthor, name, countryCode) var i Author err := row.Scan( &i.ID, &i.Name, &i.Bio, &i.CountryCode, pq.Array(&i.Titles), ) return i, err } const listAuthors = `-- name: ListAuthors :many SELECT id, name, bio, country_code, titles 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, &i.CountryCode, pq.Array(&i.Titles), ); 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 } ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE name = $1 AND country_code = $2 LIMIT 1; -- name: ListAuthors :many SELECT * FROM authors ORDER BY name; -- name: CreateAuthor :one INSERT INTO authors ( name, bio, country_code, titles ) VALUES ( $1, $2, $3, $4 ) RETURNING *; -- name: DeleteAuthor :exec DELETE FROM authors WHERE id = $1; -- name: DeleteAuthors :exec DELETE FROM authors WHERE id IN (sqlc.slice(ids)) AND name = $1; -- name: CreateAuthorOnlyTitles :one INSERT INTO authors (name, titles) VALUES ($1, $2) RETURNING *; -- name: AddNewClient :one INSERT INTO clients ( id, name ) VALUES ( $1, $2 ) RETURNING *; ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text, country_code CHAR(2) NOT NULL, titles TEXT[] ); CREATE TABLE clients ( id INT PRIMARY KEY, name TEXT NOT NULL ); ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_to_two/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "query_parameter_limit": 2 } ] } ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/models.go ================================================ // 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 CountryCode string } ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { CreateAuthor(ctx context.Context, arg CreateAuthorParams) (Author, error) DeleteAuthor(ctx context.Context, arg DeleteAuthorParams) error GetAuthor(ctx context.Context, arg GetAuthorParams) (Author, error) ListAuthors(ctx context.Context) ([]Author, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const createAuthor = `-- name: CreateAuthor :one INSERT INTO authors ( name, bio, country_code ) VALUES ( $1, $2, $3 ) RETURNING id, name, bio, country_code ` type CreateAuthorParams struct { Name string Bio sql.NullString CountryCode string } func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (Author, error) { row := q.db.QueryRowContext(ctx, createAuthor, arg.Name, arg.Bio, arg.CountryCode) var i Author err := row.Scan( &i.ID, &i.Name, &i.Bio, &i.CountryCode, ) return i, err } const deleteAuthor = `-- name: DeleteAuthor :exec DELETE FROM authors WHERE id = $1 ` type DeleteAuthorParams struct { ID int64 } func (q *Queries) DeleteAuthor(ctx context.Context, arg DeleteAuthorParams) error { _, err := q.db.ExecContext(ctx, deleteAuthor, arg.ID) return err } const getAuthor = `-- name: GetAuthor :one SELECT id, name, bio, country_code FROM authors WHERE name = $1 AND country_code = $2 LIMIT 1 ` type GetAuthorParams struct { Name string CountryCode string } func (q *Queries) GetAuthor(ctx context.Context, arg GetAuthorParams) (Author, error) { row := q.db.QueryRowContext(ctx, getAuthor, arg.Name, arg.CountryCode) var i Author err := row.Scan( &i.ID, &i.Name, &i.Bio, &i.CountryCode, ) return i, err } const listAuthors = `-- name: ListAuthors :many SELECT id, name, bio, country_code 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, &i.CountryCode, ); 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 } ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors WHERE name = $1 AND country_code = $2 LIMIT 1; -- name: ListAuthors :many SELECT * FROM authors ORDER BY name; -- name: CreateAuthor :one INSERT INTO authors ( name, bio, country_code ) VALUES ( $1, $2, $3 ) RETURNING *; -- name: DeleteAuthor :exec DELETE FROM authors WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text, country_code CHAR(2) NOT NULL ); ================================================ FILE: internal/endtoend/testdata/query_parameter_limit_to_zero/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "query_parameter_limit": 0, "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/quoted_colname/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/quoted_colname/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Test struct { ID string } ================================================ FILE: internal/endtoend/testdata/quoted_colname/sqlite/go/query.sql.go ================================================ // 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 "test" ` 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 } ================================================ FILE: internal/endtoend/testdata/quoted_colname/sqlite/query.sql ================================================ -- name: TestList :many SELECT * FROM "test"; ================================================ FILE: internal/endtoend/testdata/quoted_colname/sqlite/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE "test" ( "id" TEXT NOT NULL ); ================================================ FILE: internal/endtoend/testdata/quoted_colname/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "name": "querytest" } ] } ================================================ FILE: internal/endtoend/testdata/quoted_names_complex/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/quoted_names_complex/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/quoted_names_complex/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/quoted_names_complex/sqlite/query.sql ================================================ -- name: Placeholder :exec SELECT 1; ================================================ FILE: internal/endtoend/testdata/quoted_names_complex/sqlite/schema.sql ================================================ -- 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 "customer_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; ================================================ FILE: internal/endtoend/testdata/quoted_names_complex/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/quoted_tablename/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/quoted_tablename/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type User struct { ID string } ================================================ FILE: internal/endtoend/testdata/quoted_tablename/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/quoted_tablename/sqlite/query.sql ================================================ -- name: TestList :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/quoted_tablename/sqlite/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE "users" ( id TEXT NOT NULL ); ================================================ FILE: internal/endtoend/testdata/quoted_tablename/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "name": "querytest" } ] } ================================================ FILE: internal/endtoend/testdata/ranges/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/ranges/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type TestTable struct { VDaterangeNull pgtype.Range[pgtype.Date] VDatemultirangeNull pgtype.Multirange[pgtype.Range[pgtype.Date]] VTsrangeNull pgtype.Range[pgtype.Timestamp] VTsmultirangeNull pgtype.Multirange[pgtype.Range[pgtype.Timestamp]] VTstzrangeNull pgtype.Range[pgtype.Timestamptz] VTstzmultirangeNull pgtype.Multirange[pgtype.Range[pgtype.Timestamptz]] VNumrangeNull pgtype.Range[pgtype.Numeric] VNummultirangeNull pgtype.Multirange[pgtype.Range[pgtype.Numeric]] VInt4rangeNull pgtype.Range[pgtype.Int4] VInt4multirangeNull pgtype.Multirange[pgtype.Range[pgtype.Int4]] VInt8rangeNull pgtype.Range[pgtype.Int8] VInt8multirangeNull pgtype.Multirange[pgtype.Range[pgtype.Int8]] VDaterange pgtype.Range[pgtype.Date] VDatemultirange pgtype.Multirange[pgtype.Range[pgtype.Date]] VTsrange pgtype.Range[pgtype.Timestamp] VTsmultirange pgtype.Multirange[pgtype.Range[pgtype.Timestamp]] VTstzrange pgtype.Range[pgtype.Timestamptz] VTstzmultirange pgtype.Multirange[pgtype.Range[pgtype.Timestamptz]] VNumrange pgtype.Range[pgtype.Numeric] VNummultirange pgtype.Multirange[pgtype.Range[pgtype.Numeric]] VInt4range pgtype.Range[pgtype.Int4] VInt4multirange pgtype.Multirange[pgtype.Range[pgtype.Int4]] VInt8range pgtype.Range[pgtype.Int8] VInt8multirange pgtype.Multirange[pgtype.Range[pgtype.Int8]] } ================================================ FILE: internal/endtoend/testdata/ranges/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectTest = `-- name: SelectTest :many SELECT v_daterange_null, v_datemultirange_null, v_tsrange_null, v_tsmultirange_null, v_tstzrange_null, v_tstzmultirange_null, v_numrange_null, v_nummultirange_null, v_int4range_null, v_int4multirange_null, v_int8range_null, v_int8multirange_null, v_daterange, v_datemultirange, v_tsrange, v_tsmultirange, v_tstzrange, v_tstzmultirange, v_numrange, v_nummultirange, v_int4range, v_int4multirange, v_int8range, v_int8multirange from test_table ` func (q *Queries) SelectTest(ctx context.Context) ([]TestTable, error) { rows, err := q.db.Query(ctx, selectTest) if err != nil { return nil, err } defer rows.Close() var items []TestTable for rows.Next() { var i TestTable if err := rows.Scan( &i.VDaterangeNull, &i.VDatemultirangeNull, &i.VTsrangeNull, &i.VTsmultirangeNull, &i.VTstzrangeNull, &i.VTstzmultirangeNull, &i.VNumrangeNull, &i.VNummultirangeNull, &i.VInt4rangeNull, &i.VInt4multirangeNull, &i.VInt8rangeNull, &i.VInt8multirangeNull, &i.VDaterange, &i.VDatemultirange, &i.VTsrange, &i.VTsmultirange, &i.VTstzrange, &i.VTstzmultirange, &i.VNumrange, &i.VNummultirange, &i.VInt4range, &i.VInt4multirange, &i.VInt8range, &i.VInt8multirange, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/ranges/pgx/v5/query.sql ================================================ -- name: SelectTest :many SELECT * from test_table; ================================================ FILE: internal/endtoend/testdata/ranges/pgx/v5/schema.sql ================================================ CREATE TABLE test_table ( v_daterange_null daterange, v_datemultirange_null datemultirange, v_tsrange_null tsrange, v_tsmultirange_null tsmultirange, v_tstzrange_null tstzrange, v_tstzmultirange_null tstzmultirange, v_numrange_null numrange, v_nummultirange_null nummultirange, v_int4range_null int4range, v_int4multirange_null int4multirange, v_int8range_null int8range, v_int8multirange_null int8multirange, v_daterange daterange not null, v_datemultirange datemultirange not null, v_tsrange tsrange not null, v_tsmultirange tsmultirange not null, v_tstzrange tstzrange not null, v_tstzmultirange tstzmultirange not null, v_numrange numrange not null, v_nummultirange nummultirange not null, v_int4range int4range not null, v_int4multirange int4multirange not null, v_int8range int8range not null, v_int8multirange int8multirange not null ); ================================================ FILE: internal/endtoend/testdata/ranges/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Myview struct { int32 } ================================================ FILE: internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const refresh = `-- name: Refresh :exec REFRESH MATERIALIZED VIEW myview ` func (q *Queries) Refresh(ctx context.Context) error { _, err := q.db.Exec(ctx, refresh) return err } ================================================ FILE: internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/query.sql ================================================ -- name: Refresh :exec REFRESH MATERIALIZED VIEW myview; ================================================ FILE: internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/schema.sql ================================================ CREATE MATERIALIZED VIEW myview AS (SELECT 1); ================================================ FILE: internal/endtoend/testdata/refreshmatview/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Myview struct { int32 } ================================================ FILE: internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const refresh = `-- name: Refresh :exec REFRESH MATERIALIZED VIEW myview ` func (q *Queries) Refresh(ctx context.Context) error { _, err := q.db.Exec(ctx, refresh) return err } ================================================ FILE: internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/query.sql ================================================ -- name: Refresh :exec REFRESH MATERIALIZED VIEW myview; ================================================ FILE: internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/schema.sql ================================================ CREATE MATERIALIZED VIEW myview AS (SELECT 1); ================================================ FILE: internal/endtoend/testdata/refreshmatview/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/relation_does_not_exist/postgresql/query.sql ================================================ -- name: MissingSelect :many SELECT * FROM nonexisting_relation WHERE name = 'foo'; -- name: MissingParam :many SELECT * FROM nonexisting_relation WHERE name = $1; -- name: MissingUpdate :exec UPDATE nonexisting_relation SET name = $1; -- name: MisingInsert :exec INSERT INTO nonexisting_relation (id) VALUES ($1); ================================================ FILE: internal/endtoend/testdata/relation_does_not_exist/postgresql/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/relation_does_not_exist/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/relation_does_not_exist/postgresql/stderr/base.txt ================================================ # package querytest query.sql:1:1: relation "nonexisting_relation" does not exist query.sql:5:1: relation "nonexisting_relation" does not exist query.sql:8:1: relation "nonexisting_relation" does not exist query.sql:11:1: relation "nonexisting_relation" does not exist ================================================ FILE: internal/endtoend/testdata/relation_does_not_exist/postgresql/stderr/managed-db.txt ================================================ # package querytest query.sql:2:15: relation "nonexisting_relation" does not exist query.sql:5:15: relation "nonexisting_relation" does not exist query.sql:8:8: relation "nonexisting_relation" does not exist query.sql:11:13: relation "nonexisting_relation" does not exist ================================================ FILE: internal/endtoend/testdata/rename/v1/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/rename/v1/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type IPProtocol string const ( IPProtocolTCP IPProtocol = "tcp" IpProtocolIp IPProtocol = "ip" IpProtocolIcmp IPProtocol = "icmp" ) func (e *IPProtocol) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = IPProtocol(s) case string: *e = IPProtocol(s) default: return fmt.Errorf("unsupported scan type for IPProtocol: %T", src) } return nil } type NullIPProtocol struct { IPProtocol IPProtocol Valid bool // Valid is true if IPProtocol is not NULL } // Scan implements the Scanner interface. func (ns *NullIPProtocol) Scan(value interface{}) error { if value == nil { ns.IPProtocol, ns.Valid = "", false return nil } ns.Valid = true return ns.IPProtocol.Scan(value) } // Value implements the driver Valuer interface. func (ns NullIPProtocol) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.IPProtocol), nil } type BarNew struct { IDNew int32 IpOld IPProtocol } ================================================ FILE: internal/endtoend/testdata/rename/v1/pgx/v4/go/query.sql.go ================================================ // 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_old, ip_old FROM bar_old ` func (q *Queries) ListBar(ctx context.Context) ([]BarNew, error) { rows, err := q.db.Query(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []BarNew for rows.Next() { var i BarNew if err := rows.Scan(&i.IDNew, &i.IpOld); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listFoo = `-- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old WHERE ip_old = $1 AND id_old = $2 ` type ListFooParams struct { IpOld IPProtocol IDNew int32 } type ListFooRow struct { FooNew int32 BazOld int32 } func (q *Queries) ListFoo(ctx context.Context, arg ListFooParams) ([]ListFooRow, error) { rows, err := q.db.Query(ctx, listFoo, arg.IpOld, arg.IDNew) if err != nil { return nil, err } defer rows.Close() var items []ListFooRow for rows.Next() { var i ListFooRow if err := rows.Scan(&i.FooNew, &i.BazOld); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/rename/v1/pgx/v4/query.sql ================================================ -- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old WHERE ip_old = $1 AND id_old = $2; -- name: ListBar :many SELECT * FROM bar_old; ================================================ FILE: internal/endtoend/testdata/rename/v1/pgx/v4/schema.sql ================================================ CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); ================================================ FILE: internal/endtoend/testdata/rename/v1/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ], "rename": { "id_old": "IDNew", "bar_old": "BarNew", "foo_old": "FooNew", "ip_protocol": "IPProtocol", "ip_protocol_tcp": "IPProtocolTCP" } } ================================================ FILE: internal/endtoend/testdata/rename/v1/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/rename/v1/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type IPProtocol string const ( IPProtocolTCP IPProtocol = "tcp" IpProtocolIp IPProtocol = "ip" IpProtocolIcmp IPProtocol = "icmp" ) func (e *IPProtocol) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = IPProtocol(s) case string: *e = IPProtocol(s) default: return fmt.Errorf("unsupported scan type for IPProtocol: %T", src) } return nil } type NullIPProtocol struct { IPProtocol IPProtocol Valid bool // Valid is true if IPProtocol is not NULL } // Scan implements the Scanner interface. func (ns *NullIPProtocol) Scan(value interface{}) error { if value == nil { ns.IPProtocol, ns.Valid = "", false return nil } ns.Valid = true return ns.IPProtocol.Scan(value) } // Value implements the driver Valuer interface. func (ns NullIPProtocol) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.IPProtocol), nil } type BarNew struct { IDNew int32 IpOld IPProtocol } ================================================ FILE: internal/endtoend/testdata/rename/v1/pgx/v5/go/query.sql.go ================================================ // 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_old, ip_old FROM bar_old ` func (q *Queries) ListBar(ctx context.Context) ([]BarNew, error) { rows, err := q.db.Query(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []BarNew for rows.Next() { var i BarNew if err := rows.Scan(&i.IDNew, &i.IpOld); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listFoo = `-- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old WHERE ip_old = $1 AND id_old = $2 ` type ListFooParams struct { IpOld IPProtocol IDNew int32 } type ListFooRow struct { FooNew int32 BazOld int32 } func (q *Queries) ListFoo(ctx context.Context, arg ListFooParams) ([]ListFooRow, error) { rows, err := q.db.Query(ctx, listFoo, arg.IpOld, arg.IDNew) if err != nil { return nil, err } defer rows.Close() var items []ListFooRow for rows.Next() { var i ListFooRow if err := rows.Scan(&i.FooNew, &i.BazOld); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/rename/v1/pgx/v5/query.sql ================================================ -- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old WHERE ip_old = $1 AND id_old = $2; -- name: ListBar :many SELECT * FROM bar_old; ================================================ FILE: internal/endtoend/testdata/rename/v1/pgx/v5/schema.sql ================================================ CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); ================================================ FILE: internal/endtoend/testdata/rename/v1/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ], "rename": { "id_old": "IDNew", "bar_old": "BarNew", "foo_old": "FooNew", "ip_protocol": "IPProtocol", "ip_protocol_tcp": "IPProtocolTCP" } } ================================================ FILE: internal/endtoend/testdata/rename/v1/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/rename/v1/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type IPProtocol string const ( IPProtocolTCP IPProtocol = "tcp" IpProtocolIp IPProtocol = "ip" IpProtocolIcmp IPProtocol = "icmp" ) func (e *IPProtocol) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = IPProtocol(s) case string: *e = IPProtocol(s) default: return fmt.Errorf("unsupported scan type for IPProtocol: %T", src) } return nil } type NullIPProtocol struct { IPProtocol IPProtocol Valid bool // Valid is true if IPProtocol is not NULL } // Scan implements the Scanner interface. func (ns *NullIPProtocol) Scan(value interface{}) error { if value == nil { ns.IPProtocol, ns.Valid = "", false return nil } ns.Valid = true return ns.IPProtocol.Scan(value) } // Value implements the driver Valuer interface. func (ns NullIPProtocol) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.IPProtocol), nil } type BarNew struct { IDNew int32 IpOld IPProtocol } ================================================ FILE: internal/endtoend/testdata/rename/v1/stdlib/go/query.sql.go ================================================ // 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_old, ip_old FROM bar_old ` func (q *Queries) ListBar(ctx context.Context) ([]BarNew, error) { rows, err := q.db.QueryContext(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []BarNew for rows.Next() { var i BarNew if err := rows.Scan(&i.IDNew, &i.IpOld); 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 listFoo = `-- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old WHERE ip_old = $1 AND id_old = $2 ` type ListFooParams struct { IpOld IPProtocol IDNew int32 } type ListFooRow struct { FooNew int32 BazOld int32 } func (q *Queries) ListFoo(ctx context.Context, arg ListFooParams) ([]ListFooRow, error) { rows, err := q.db.QueryContext(ctx, listFoo, arg.IpOld, arg.IDNew) if err != nil { return nil, err } defer rows.Close() var items []ListFooRow for rows.Next() { var i ListFooRow if err := rows.Scan(&i.FooNew, &i.BazOld); 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 } ================================================ FILE: internal/endtoend/testdata/rename/v1/stdlib/query.sql ================================================ -- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old WHERE ip_old = $1 AND id_old = $2; -- name: ListBar :many SELECT * FROM bar_old; ================================================ FILE: internal/endtoend/testdata/rename/v1/stdlib/schema.sql ================================================ CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); ================================================ FILE: internal/endtoend/testdata/rename/v1/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ], "rename": { "id_old": "IDNew", "bar_old": "BarNew", "foo_old": "FooNew", "ip_protocol": "IPProtocol", "ip_protocol_tcp": "IPProtocolTCP" } } ================================================ FILE: internal/endtoend/testdata/rename/v2/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/rename/v2/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type IPProtocol string const ( IPProtocolTCP IPProtocol = "tcp" IpProtocolIp IPProtocol = "ip" IpProtocolIcmp IPProtocol = "icmp" ) func (e *IPProtocol) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = IPProtocol(s) case string: *e = IPProtocol(s) default: return fmt.Errorf("unsupported scan type for IPProtocol: %T", src) } return nil } type NullIPProtocol struct { IPProtocol IPProtocol Valid bool // Valid is true if IPProtocol is not NULL } // Scan implements the Scanner interface. func (ns *NullIPProtocol) Scan(value interface{}) error { if value == nil { ns.IPProtocol, ns.Valid = "", false return nil } ns.Valid = true return ns.IPProtocol.Scan(value) } // Value implements the driver Valuer interface. func (ns NullIPProtocol) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.IPProtocol), nil } type BarNew struct { IDNew int32 IpOld IPProtocol } ================================================ FILE: internal/endtoend/testdata/rename/v2/pgx/v4/go/query.sql.go ================================================ // 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_old, ip_old FROM bar_old ` func (q *Queries) ListBar(ctx context.Context) ([]BarNew, error) { rows, err := q.db.Query(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []BarNew for rows.Next() { var i BarNew if err := rows.Scan(&i.IDNew, &i.IpOld); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listFoo = `-- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old WHERE ip_old = $1 AND id_old = $2 ` type ListFooParams struct { IpOld IPProtocol IDNew int32 } type ListFooRow struct { FooNew int32 BazOld int32 } func (q *Queries) ListFoo(ctx context.Context, arg ListFooParams) ([]ListFooRow, error) { rows, err := q.db.Query(ctx, listFoo, arg.IpOld, arg.IDNew) if err != nil { return nil, err } defer rows.Close() var items []ListFooRow for rows.Next() { var i ListFooRow if err := rows.Scan(&i.FooNew, &i.BazOld); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/rename/v2/pgx/v4/query.sql ================================================ -- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old WHERE ip_old = $1 AND id_old = $2; -- name: ListBar :many SELECT * FROM bar_old; ================================================ FILE: internal/endtoend/testdata/rename/v2/pgx/v4/schema.sql ================================================ CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); ================================================ FILE: internal/endtoend/testdata/rename/v2/pgx/v4/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "go": { "sql_package": "pgx/v4", "package": "querytest", "out": "go", "rename": { "id_old": "IDNew", "bar_old": "BarNew", "foo_old": "FooNew", "ip_protocol": "IPProtocol", "ip_protocol_tcp": "IPProtocolTCP" } } } } ] } ================================================ FILE: internal/endtoend/testdata/rename/v2/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/rename/v2/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type IPProtocol string const ( IPProtocolTCP IPProtocol = "tcp" IpProtocolIp IPProtocol = "ip" IpProtocolIcmp IPProtocol = "icmp" ) func (e *IPProtocol) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = IPProtocol(s) case string: *e = IPProtocol(s) default: return fmt.Errorf("unsupported scan type for IPProtocol: %T", src) } return nil } type NullIPProtocol struct { IPProtocol IPProtocol Valid bool // Valid is true if IPProtocol is not NULL } // Scan implements the Scanner interface. func (ns *NullIPProtocol) Scan(value interface{}) error { if value == nil { ns.IPProtocol, ns.Valid = "", false return nil } ns.Valid = true return ns.IPProtocol.Scan(value) } // Value implements the driver Valuer interface. func (ns NullIPProtocol) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.IPProtocol), nil } type BarNew struct { IDNew int32 IpOld IPProtocol } ================================================ FILE: internal/endtoend/testdata/rename/v2/pgx/v5/go/query.sql.go ================================================ // 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_old, ip_old FROM bar_old ` func (q *Queries) ListBar(ctx context.Context) ([]BarNew, error) { rows, err := q.db.Query(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []BarNew for rows.Next() { var i BarNew if err := rows.Scan(&i.IDNew, &i.IpOld); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listFoo = `-- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old WHERE ip_old = $1 AND id_old = $2 ` type ListFooParams struct { IpOld IPProtocol IDNew int32 } type ListFooRow struct { FooNew int32 BazOld int32 } func (q *Queries) ListFoo(ctx context.Context, arg ListFooParams) ([]ListFooRow, error) { rows, err := q.db.Query(ctx, listFoo, arg.IpOld, arg.IDNew) if err != nil { return nil, err } defer rows.Close() var items []ListFooRow for rows.Next() { var i ListFooRow if err := rows.Scan(&i.FooNew, &i.BazOld); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/rename/v2/pgx/v5/query.sql ================================================ -- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old WHERE ip_old = $1 AND id_old = $2; -- name: ListBar :many SELECT * FROM bar_old; ================================================ FILE: internal/endtoend/testdata/rename/v2/pgx/v5/schema.sql ================================================ CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); ================================================ FILE: internal/endtoend/testdata/rename/v2/pgx/v5/sqlc.json ================================================ { "version": "2", "sql": [ { "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { "package": "querytest", "out": "go", "sql_package": "pgx/v5", "rename": { "id_old": "IDNew", "bar_old": "BarNew", "foo_old": "FooNew", "ip_protocol": "IPProtocol", "ip_protocol_tcp": "IPProtocolTCP" } } } } ] } ================================================ FILE: internal/endtoend/testdata/rename/v2/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/rename/v2/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type IPProtocol string const ( IPProtocolTCP IPProtocol = "tcp" IpProtocolIp IPProtocol = "ip" IpProtocolIcmp IPProtocol = "icmp" ) func (e *IPProtocol) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = IPProtocol(s) case string: *e = IPProtocol(s) default: return fmt.Errorf("unsupported scan type for IPProtocol: %T", src) } return nil } type NullIPProtocol struct { IPProtocol IPProtocol Valid bool // Valid is true if IPProtocol is not NULL } // Scan implements the Scanner interface. func (ns *NullIPProtocol) Scan(value interface{}) error { if value == nil { ns.IPProtocol, ns.Valid = "", false return nil } ns.Valid = true return ns.IPProtocol.Scan(value) } // Value implements the driver Valuer interface. func (ns NullIPProtocol) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.IPProtocol), nil } type BarNew struct { IDNew int32 IpOld IPProtocol } ================================================ FILE: internal/endtoend/testdata/rename/v2/stdlib/go/query.sql.go ================================================ // 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_old, ip_old FROM bar_old ` func (q *Queries) ListBar(ctx context.Context) ([]BarNew, error) { rows, err := q.db.QueryContext(ctx, listBar) if err != nil { return nil, err } defer rows.Close() var items []BarNew for rows.Next() { var i BarNew if err := rows.Scan(&i.IDNew, &i.IpOld); 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 listFoo = `-- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old WHERE ip_old = $1 AND id_old = $2 ` type ListFooParams struct { IpOld IPProtocol IDNew int32 } type ListFooRow struct { FooNew int32 BazOld int32 } func (q *Queries) ListFoo(ctx context.Context, arg ListFooParams) ([]ListFooRow, error) { rows, err := q.db.QueryContext(ctx, listFoo, arg.IpOld, arg.IDNew) if err != nil { return nil, err } defer rows.Close() var items []ListFooRow for rows.Next() { var i ListFooRow if err := rows.Scan(&i.FooNew, &i.BazOld); 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 } ================================================ FILE: internal/endtoend/testdata/rename/v2/stdlib/query.sql ================================================ -- name: ListFoo :many SELECT id_old as foo_old, id_old as baz_old FROM bar_old WHERE ip_old = $1 AND id_old = $2; -- name: ListBar :many SELECT * FROM bar_old; ================================================ FILE: internal/endtoend/testdata/rename/v2/stdlib/schema.sql ================================================ CREATE TYPE ip_protocol AS enum('tcp', 'ip', 'icmp'); CREATE TABLE bar_old (id_old serial not null, ip_old ip_protocol NOT NULL); ================================================ FILE: internal/endtoend/testdata/rename/v2/stdlib/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "go": { "package": "querytest", "out": "go", "rename": { "id_old": "IDNew", "bar_old": "BarNew", "foo_old": "FooNew", "ip_protocol": "IPProtocol", "ip_protocol_tcp": "IPProtocolTCP" } } } } ] } ================================================ FILE: internal/endtoend/testdata/returning/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/returning/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { Name sql.NullString ID int32 } ================================================ FILE: internal/endtoend/testdata/returning/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const deleteUserAndReturnID = `-- name: DeleteUserAndReturnID :one DELETE FROM users WHERE name = $1 RETURNING id ` func (q *Queries) DeleteUserAndReturnID(ctx context.Context, name sql.NullString) (int32, error) { row := q.db.QueryRow(ctx, deleteUserAndReturnID, name) var id int32 err := row.Scan(&id) return id, err } const deleteUserAndReturnUser = `-- name: DeleteUserAndReturnUser :one DELETE FROM users WHERE name = $1 RETURNING name, id ` func (q *Queries) DeleteUserAndReturnUser(ctx context.Context, name sql.NullString) (User, error) { row := q.db.QueryRow(ctx, deleteUserAndReturnUser, name) var i User err := row.Scan(&i.Name, &i.ID) return i, err } const insertUserAndReturnID = `-- name: InsertUserAndReturnID :one INSERT INTO users (name) VALUES ($1) RETURNING id ` func (q *Queries) InsertUserAndReturnID(ctx context.Context, name sql.NullString) (int32, error) { row := q.db.QueryRow(ctx, insertUserAndReturnID, name) var id int32 err := row.Scan(&id) return id, err } const insertUserAndReturnUser = `-- name: InsertUserAndReturnUser :one INSERT INTO users (name) VALUES ($1) RETURNING name, id ` func (q *Queries) InsertUserAndReturnUser(ctx context.Context, name sql.NullString) (User, error) { row := q.db.QueryRow(ctx, insertUserAndReturnUser, name) var i User err := row.Scan(&i.Name, &i.ID) return i, err } const updateUserAndReturnID = `-- name: UpdateUserAndReturnID :one UPDATE users SET name = $1 WHERE name = $2 RETURNING id ` type UpdateUserAndReturnIDParams struct { Name sql.NullString Name_2 sql.NullString } func (q *Queries) UpdateUserAndReturnID(ctx context.Context, arg UpdateUserAndReturnIDParams) (int32, error) { row := q.db.QueryRow(ctx, updateUserAndReturnID, arg.Name, arg.Name_2) var id int32 err := row.Scan(&id) return id, err } const updateUserAndReturnUser = `-- name: UpdateUserAndReturnUser :one UPDATE users SET name = $1 WHERE name = $2 RETURNING name, id ` type UpdateUserAndReturnUserParams struct { Name sql.NullString Name_2 sql.NullString } func (q *Queries) UpdateUserAndReturnUser(ctx context.Context, arg UpdateUserAndReturnUserParams) (User, error) { row := q.db.QueryRow(ctx, updateUserAndReturnUser, arg.Name, arg.Name_2) var i User err := row.Scan(&i.Name, &i.ID) return i, err } ================================================ FILE: internal/endtoend/testdata/returning/postgresql/pgx/v4/query.sql ================================================ -- name: InsertUserAndReturnID :one INSERT INTO users (name) VALUES ($1) RETURNING id; -- name: InsertUserAndReturnUser :one INSERT INTO users (name) VALUES ($1) RETURNING *; -- name: UpdateUserAndReturnID :one UPDATE users SET name = $1 WHERE name = $2 RETURNING id; -- name: UpdateUserAndReturnUser :one UPDATE users SET name = $1 WHERE name = $2 RETURNING *; -- name: DeleteUserAndReturnID :one DELETE FROM users WHERE name = $1 RETURNING id; -- name: DeleteUserAndReturnUser :one DELETE FROM users WHERE name = $1 RETURNING *; ================================================ FILE: internal/endtoend/testdata/returning/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE users (name text, id serial primary key); ================================================ FILE: internal/endtoend/testdata/returning/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/returning/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/returning/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type User struct { Name pgtype.Text ID int32 } ================================================ FILE: internal/endtoend/testdata/returning/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 deleteUserAndReturnID = `-- name: DeleteUserAndReturnID :one DELETE FROM users WHERE name = $1 RETURNING id ` func (q *Queries) DeleteUserAndReturnID(ctx context.Context, name pgtype.Text) (int32, error) { row := q.db.QueryRow(ctx, deleteUserAndReturnID, name) var id int32 err := row.Scan(&id) return id, err } const deleteUserAndReturnUser = `-- name: DeleteUserAndReturnUser :one DELETE FROM users WHERE name = $1 RETURNING name, id ` func (q *Queries) DeleteUserAndReturnUser(ctx context.Context, name pgtype.Text) (User, error) { row := q.db.QueryRow(ctx, deleteUserAndReturnUser, name) var i User err := row.Scan(&i.Name, &i.ID) return i, err } const insertUserAndReturnID = `-- name: InsertUserAndReturnID :one INSERT INTO users (name) VALUES ($1) RETURNING id ` func (q *Queries) InsertUserAndReturnID(ctx context.Context, name pgtype.Text) (int32, error) { row := q.db.QueryRow(ctx, insertUserAndReturnID, name) var id int32 err := row.Scan(&id) return id, err } const insertUserAndReturnUser = `-- name: InsertUserAndReturnUser :one INSERT INTO users (name) VALUES ($1) RETURNING name, id ` func (q *Queries) InsertUserAndReturnUser(ctx context.Context, name pgtype.Text) (User, error) { row := q.db.QueryRow(ctx, insertUserAndReturnUser, name) var i User err := row.Scan(&i.Name, &i.ID) return i, err } const updateUserAndReturnID = `-- name: UpdateUserAndReturnID :one UPDATE users SET name = $1 WHERE name = $2 RETURNING id ` type UpdateUserAndReturnIDParams struct { Name pgtype.Text Name_2 pgtype.Text } func (q *Queries) UpdateUserAndReturnID(ctx context.Context, arg UpdateUserAndReturnIDParams) (int32, error) { row := q.db.QueryRow(ctx, updateUserAndReturnID, arg.Name, arg.Name_2) var id int32 err := row.Scan(&id) return id, err } const updateUserAndReturnUser = `-- name: UpdateUserAndReturnUser :one UPDATE users SET name = $1 WHERE name = $2 RETURNING name, id ` type UpdateUserAndReturnUserParams struct { Name pgtype.Text Name_2 pgtype.Text } func (q *Queries) UpdateUserAndReturnUser(ctx context.Context, arg UpdateUserAndReturnUserParams) (User, error) { row := q.db.QueryRow(ctx, updateUserAndReturnUser, arg.Name, arg.Name_2) var i User err := row.Scan(&i.Name, &i.ID) return i, err } ================================================ FILE: internal/endtoend/testdata/returning/postgresql/pgx/v5/query.sql ================================================ -- name: InsertUserAndReturnID :one INSERT INTO users (name) VALUES ($1) RETURNING id; -- name: InsertUserAndReturnUser :one INSERT INTO users (name) VALUES ($1) RETURNING *; -- name: UpdateUserAndReturnID :one UPDATE users SET name = $1 WHERE name = $2 RETURNING id; -- name: UpdateUserAndReturnUser :one UPDATE users SET name = $1 WHERE name = $2 RETURNING *; -- name: DeleteUserAndReturnID :one DELETE FROM users WHERE name = $1 RETURNING id; -- name: DeleteUserAndReturnUser :one DELETE FROM users WHERE name = $1 RETURNING *; ================================================ FILE: internal/endtoend/testdata/returning/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE users (name text, id serial primary key); ================================================ FILE: internal/endtoend/testdata/returning/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/returning/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/returning/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { Name sql.NullString ID int32 } ================================================ FILE: internal/endtoend/testdata/returning/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const deleteUserAndReturnID = `-- name: DeleteUserAndReturnID :one DELETE FROM users WHERE name = $1 RETURNING id ` func (q *Queries) DeleteUserAndReturnID(ctx context.Context, name sql.NullString) (int32, error) { row := q.db.QueryRowContext(ctx, deleteUserAndReturnID, name) var id int32 err := row.Scan(&id) return id, err } const deleteUserAndReturnUser = `-- name: DeleteUserAndReturnUser :one DELETE FROM users WHERE name = $1 RETURNING name, id ` func (q *Queries) DeleteUserAndReturnUser(ctx context.Context, name sql.NullString) (User, error) { row := q.db.QueryRowContext(ctx, deleteUserAndReturnUser, name) var i User err := row.Scan(&i.Name, &i.ID) return i, err } const insertUserAndReturnID = `-- name: InsertUserAndReturnID :one INSERT INTO users (name) VALUES ($1) RETURNING id ` func (q *Queries) InsertUserAndReturnID(ctx context.Context, name sql.NullString) (int32, error) { row := q.db.QueryRowContext(ctx, insertUserAndReturnID, name) var id int32 err := row.Scan(&id) return id, err } const insertUserAndReturnUser = `-- name: InsertUserAndReturnUser :one INSERT INTO users (name) VALUES ($1) RETURNING name, id ` func (q *Queries) InsertUserAndReturnUser(ctx context.Context, name sql.NullString) (User, error) { row := q.db.QueryRowContext(ctx, insertUserAndReturnUser, name) var i User err := row.Scan(&i.Name, &i.ID) return i, err } const updateUserAndReturnID = `-- name: UpdateUserAndReturnID :one UPDATE users SET name = $1 WHERE name = $2 RETURNING id ` type UpdateUserAndReturnIDParams struct { Name sql.NullString Name_2 sql.NullString } func (q *Queries) UpdateUserAndReturnID(ctx context.Context, arg UpdateUserAndReturnIDParams) (int32, error) { row := q.db.QueryRowContext(ctx, updateUserAndReturnID, arg.Name, arg.Name_2) var id int32 err := row.Scan(&id) return id, err } const updateUserAndReturnUser = `-- name: UpdateUserAndReturnUser :one UPDATE users SET name = $1 WHERE name = $2 RETURNING name, id ` type UpdateUserAndReturnUserParams struct { Name sql.NullString Name_2 sql.NullString } func (q *Queries) UpdateUserAndReturnUser(ctx context.Context, arg UpdateUserAndReturnUserParams) (User, error) { row := q.db.QueryRowContext(ctx, updateUserAndReturnUser, arg.Name, arg.Name_2) var i User err := row.Scan(&i.Name, &i.ID) return i, err } ================================================ FILE: internal/endtoend/testdata/returning/postgresql/stdlib/query.sql ================================================ -- name: InsertUserAndReturnID :one INSERT INTO users (name) VALUES ($1) RETURNING id; -- name: InsertUserAndReturnUser :one INSERT INTO users (name) VALUES ($1) RETURNING *; -- name: UpdateUserAndReturnID :one UPDATE users SET name = $1 WHERE name = $2 RETURNING id; -- name: UpdateUserAndReturnUser :one UPDATE users SET name = $1 WHERE name = $2 RETURNING *; -- name: DeleteUserAndReturnID :one DELETE FROM users WHERE name = $1 RETURNING id; -- name: DeleteUserAndReturnUser :one DELETE FROM users WHERE name = $1 RETURNING *; ================================================ FILE: internal/endtoend/testdata/returning/postgresql/stdlib/schema.sql ================================================ CREATE TABLE users (name text, id serial primary key); ================================================ FILE: internal/endtoend/testdata/returning/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/returning/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/returning/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { Name sql.NullString ID int64 } ================================================ FILE: internal/endtoend/testdata/returning/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const deleteUserAndReturnID = `-- name: DeleteUserAndReturnID :one DELETE FROM users WHERE name = ?1 RETURNING id ` func (q *Queries) DeleteUserAndReturnID(ctx context.Context, name sql.NullString) (int64, error) { row := q.db.QueryRowContext(ctx, deleteUserAndReturnID, name) var id int64 err := row.Scan(&id) return id, err } const deleteUserAndReturnUser = `-- name: DeleteUserAndReturnUser :one DELETE FROM users WHERE name = ?1 RETURNING name, id ` func (q *Queries) DeleteUserAndReturnUser(ctx context.Context, name sql.NullString) (User, error) { row := q.db.QueryRowContext(ctx, deleteUserAndReturnUser, name) var i User err := row.Scan(&i.Name, &i.ID) return i, err } const insertUserAndReturnID = `-- name: InsertUserAndReturnID :one INSERT INTO users (name) VALUES (?1) RETURNING id ` func (q *Queries) InsertUserAndReturnID(ctx context.Context, name sql.NullString) (int64, error) { row := q.db.QueryRowContext(ctx, insertUserAndReturnID, name) var id int64 err := row.Scan(&id) return id, err } const insertUserAndReturnUser = `-- name: InsertUserAndReturnUser :one INSERT INTO users (name) VALUES (?1) RETURNING name, id ` func (q *Queries) InsertUserAndReturnUser(ctx context.Context, name sql.NullString) (User, error) { row := q.db.QueryRowContext(ctx, insertUserAndReturnUser, name) var i User err := row.Scan(&i.Name, &i.ID) return i, err } const updateUserAndReturnID = `-- name: UpdateUserAndReturnID :one UPDATE users SET name = ?1 WHERE name = ?2 RETURNING id ` type UpdateUserAndReturnIDParams struct { Name sql.NullString Name_2 sql.NullString } func (q *Queries) UpdateUserAndReturnID(ctx context.Context, arg UpdateUserAndReturnIDParams) (int64, error) { row := q.db.QueryRowContext(ctx, updateUserAndReturnID, arg.Name, arg.Name_2) var id int64 err := row.Scan(&id) return id, err } const updateUserAndReturnUser = `-- name: UpdateUserAndReturnUser :one UPDATE users SET name = ?1 WHERE name = ?2 RETURNING name, id ` type UpdateUserAndReturnUserParams struct { Name sql.NullString Name_2 sql.NullString } func (q *Queries) UpdateUserAndReturnUser(ctx context.Context, arg UpdateUserAndReturnUserParams) (User, error) { row := q.db.QueryRowContext(ctx, updateUserAndReturnUser, arg.Name, arg.Name_2) var i User err := row.Scan(&i.Name, &i.ID) return i, err } ================================================ FILE: internal/endtoend/testdata/returning/sqlite/query.sql ================================================ -- name: InsertUserAndReturnID :one INSERT INTO users (name) VALUES (?1) RETURNING id; -- name: InsertUserAndReturnUser :one INSERT INTO users (name) VALUES (?1) RETURNING *; -- name: UpdateUserAndReturnID :one UPDATE users SET name = ?1 WHERE name = ?2 RETURNING id; -- name: UpdateUserAndReturnUser :one UPDATE users SET name = ?1 WHERE name = ?2 RETURNING *; -- name: DeleteUserAndReturnID :one DELETE FROM users WHERE name = ?1 RETURNING id; -- name: DeleteUserAndReturnUser :one DELETE FROM users WHERE name = ?1 RETURNING *; ================================================ FILE: internal/endtoend/testdata/returning/sqlite/schema.sql ================================================ CREATE TABLE users (name text, id integer PRIMARY KEY AUTOINCREMENT); ================================================ FILE: internal/endtoend/testdata/returning/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/mysql/exec.json ================================================ { "contexts": ["base"], "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID uint64 Name string } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const schemaScopedCreate = `-- name: SchemaScopedCreate :execresult INSERT INTO foo.bar (id, name) VALUES (?, ?) ` type SchemaScopedCreateParams struct { ID uint64 Name string } func (q *Queries) SchemaScopedCreate(ctx context.Context, arg SchemaScopedCreateParams) (sql.Result, error) { return q.db.ExecContext(ctx, schemaScopedCreate, arg.ID, arg.Name) } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/mysql/query.sql ================================================ -- name: SchemaScopedCreate :execresult INSERT INTO foo.bar (id, name) VALUES (?, ?); ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/mysql/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null, name text not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID int32 Name string } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedCreate = `-- name: SchemaScopedCreate :one INSERT INTO foo.bar (id, name) VALUES ($1, $2) RETURNING id ` type SchemaScopedCreateParams struct { ID int32 Name string } func (q *Queries) SchemaScopedCreate(ctx context.Context, arg SchemaScopedCreateParams) (int32, error) { row := q.db.QueryRow(ctx, schemaScopedCreate, arg.ID, arg.Name) var id int32 err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/query.sql ================================================ -- name: SchemaScopedCreate :one INSERT INTO foo.bar (id, name) VALUES ($1, $2) RETURNING id; ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null, name text not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID int32 Name string } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedCreate = `-- name: SchemaScopedCreate :one INSERT INTO foo.bar (id, name) VALUES ($1, $2) RETURNING id ` type SchemaScopedCreateParams struct { ID int32 Name string } func (q *Queries) SchemaScopedCreate(ctx context.Context, arg SchemaScopedCreateParams) (int32, error) { row := q.db.QueryRow(ctx, schemaScopedCreate, arg.ID, arg.Name) var id int32 err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/query.sql ================================================ -- name: SchemaScopedCreate :one INSERT INTO foo.bar (id, name) VALUES ($1, $2) RETURNING id; ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null, name text not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID int32 Name string } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedCreate = `-- name: SchemaScopedCreate :one INSERT INTO foo.bar (id, name) VALUES ($1, $2) RETURNING id ` type SchemaScopedCreateParams struct { ID int32 Name string } func (q *Queries) SchemaScopedCreate(ctx context.Context, arg SchemaScopedCreateParams) (int32, error) { row := q.db.QueryRowContext(ctx, schemaScopedCreate, arg.ID, arg.Name) var id int32 err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/query.sql ================================================ -- name: SchemaScopedCreate :one INSERT INTO foo.bar (id, name) VALUES ($1, $2) RETURNING id; ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null, name text not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_create/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/mysql/exec.json ================================================ { "contexts": ["base"], "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID uint64 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedDelete = `-- name: SchemaScopedDelete :exec DELETE FROM foo.bar WHERE id = ? ` func (q *Queries) SchemaScopedDelete(ctx context.Context, id uint64) error { _, err := q.db.ExecContext(ctx, schemaScopedDelete, id) return err } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/mysql/query.sql ================================================ -- name: SchemaScopedDelete :exec DELETE FROM foo.bar WHERE id = ?; ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/mysql/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedDelete = `-- name: SchemaScopedDelete :exec DELETE FROM foo.bar WHERE id = $1 ` func (q *Queries) SchemaScopedDelete(ctx context.Context, id int32) error { _, err := q.db.Exec(ctx, schemaScopedDelete, id) return err } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/query.sql ================================================ -- name: SchemaScopedDelete :exec DELETE FROM foo.bar WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedDelete = `-- name: SchemaScopedDelete :exec DELETE FROM foo.bar WHERE id = $1 ` func (q *Queries) SchemaScopedDelete(ctx context.Context, id int32) error { _, err := q.db.Exec(ctx, schemaScopedDelete, id) return err } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/query.sql ================================================ -- name: SchemaScopedDelete :exec DELETE FROM foo.bar WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedDelete = `-- name: SchemaScopedDelete :exec DELETE FROM foo.bar WHERE id = $1 ` func (q *Queries) SchemaScopedDelete(ctx context.Context, id int32) error { _, err := q.db.ExecContext(ctx, schemaScopedDelete, id) return err } ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/query.sql ================================================ -- name: SchemaScopedDelete :exec DELETE FROM foo.bar WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_delete/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type FooTypeUserRole string const ( FooTypeUserRoleAdmin FooTypeUserRole = "admin" FooTypeUserRoleUser FooTypeUserRole = "user" ) func (e *FooTypeUserRole) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = FooTypeUserRole(s) case string: *e = FooTypeUserRole(s) default: return fmt.Errorf("unsupported scan type for FooTypeUserRole: %T", src) } return nil } type NullFooTypeUserRole struct { FooTypeUserRole FooTypeUserRole Valid bool // Valid is true if FooTypeUserRole is not NULL } // Scan implements the Scanner interface. func (ns *NullFooTypeUserRole) Scan(value interface{}) error { if value == nil { ns.FooTypeUserRole, ns.Valid = "", false return nil } ns.Valid = true return ns.FooTypeUserRole.Scan(value) } // Value implements the driver Valuer interface. func (ns NullFooTypeUserRole) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.FooTypeUserRole), nil } type FooUser struct { Role NullFooTypeUserRole } ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listUsersByRole = `-- name: ListUsersByRole :many SELECT role FROM foo.users WHERE role = $1 ` func (q *Queries) ListUsersByRole(ctx context.Context, role NullFooTypeUserRole) ([]NullFooTypeUserRole, error) { rows, err := q.db.Query(ctx, listUsersByRole, role) if err != nil { return nil, err } defer rows.Close() var items []NullFooTypeUserRole for rows.Next() { var role NullFooTypeUserRole if err := rows.Scan(&role); err != nil { return nil, err } items = append(items, role) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/pgx/v4/query.sql ================================================ -- name: ListUsersByRole :many SELECT * FROM foo.users WHERE role = $1; ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/pgx/v4/schema.sql ================================================ CREATE SCHEMA foo; CREATE TYPE foo.type_user_role AS ENUM ('admin', 'user'); CREATE TABLE foo.users ( role foo.type_user_role ); ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type FooTypeUserRole string const ( FooTypeUserRoleAdmin FooTypeUserRole = "admin" FooTypeUserRoleUser FooTypeUserRole = "user" ) func (e *FooTypeUserRole) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = FooTypeUserRole(s) case string: *e = FooTypeUserRole(s) default: return fmt.Errorf("unsupported scan type for FooTypeUserRole: %T", src) } return nil } type NullFooTypeUserRole struct { FooTypeUserRole FooTypeUserRole Valid bool // Valid is true if FooTypeUserRole is not NULL } // Scan implements the Scanner interface. func (ns *NullFooTypeUserRole) Scan(value interface{}) error { if value == nil { ns.FooTypeUserRole, ns.Valid = "", false return nil } ns.Valid = true return ns.FooTypeUserRole.Scan(value) } // Value implements the driver Valuer interface. func (ns NullFooTypeUserRole) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.FooTypeUserRole), nil } type FooUser struct { Role NullFooTypeUserRole } ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listUsersByRole = `-- name: ListUsersByRole :many SELECT role FROM foo.users WHERE role = $1 ` func (q *Queries) ListUsersByRole(ctx context.Context, role NullFooTypeUserRole) ([]NullFooTypeUserRole, error) { rows, err := q.db.Query(ctx, listUsersByRole, role) if err != nil { return nil, err } defer rows.Close() var items []NullFooTypeUserRole for rows.Next() { var role NullFooTypeUserRole if err := rows.Scan(&role); err != nil { return nil, err } items = append(items, role) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/pgx/v5/query.sql ================================================ -- name: ListUsersByRole :many SELECT * FROM foo.users WHERE role = $1; ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/pgx/v5/schema.sql ================================================ CREATE SCHEMA foo; CREATE TYPE foo.type_user_role AS ENUM ('admin', 'user'); CREATE TABLE foo.users ( role foo.type_user_role ); ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql/driver" "fmt" ) type FooTypeUserRole string const ( FooTypeUserRoleAdmin FooTypeUserRole = "admin" FooTypeUserRoleUser FooTypeUserRole = "user" ) func (e *FooTypeUserRole) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = FooTypeUserRole(s) case string: *e = FooTypeUserRole(s) default: return fmt.Errorf("unsupported scan type for FooTypeUserRole: %T", src) } return nil } type NullFooTypeUserRole struct { FooTypeUserRole FooTypeUserRole Valid bool // Valid is true if FooTypeUserRole is not NULL } // Scan implements the Scanner interface. func (ns *NullFooTypeUserRole) Scan(value interface{}) error { if value == nil { ns.FooTypeUserRole, ns.Valid = "", false return nil } ns.Valid = true return ns.FooTypeUserRole.Scan(value) } // Value implements the driver Valuer interface. func (ns NullFooTypeUserRole) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.FooTypeUserRole), nil } type FooUser struct { Role NullFooTypeUserRole } ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listUsersByRole = `-- name: ListUsersByRole :many SELECT role FROM foo.users WHERE role = $1 ` func (q *Queries) ListUsersByRole(ctx context.Context, role NullFooTypeUserRole) ([]NullFooTypeUserRole, error) { rows, err := q.db.QueryContext(ctx, listUsersByRole, role) if err != nil { return nil, err } defer rows.Close() var items []NullFooTypeUserRole for rows.Next() { var role NullFooTypeUserRole if err := rows.Scan(&role); err != nil { return nil, err } items = append(items, role) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/stdlib/query.sql ================================================ -- name: ListUsersByRole :many SELECT * FROM foo.users WHERE role = $1; ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/stdlib/schema.sql ================================================ CREATE SCHEMA foo; CREATE TYPE foo.type_user_role AS ENUM ('admin', 'user'); CREATE TABLE foo.users ( role foo.type_user_role ); ================================================ FILE: internal/endtoend/testdata/schema_scoped_enum/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/mysql/exec.json ================================================ { "contexts": ["base"], "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID uint64 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedFilter = `-- name: SchemaScopedFilter :many SELECT id FROM foo.bar WHERE id = ? ` func (q *Queries) SchemaScopedFilter(ctx context.Context, id uint64) ([]uint64, error) { rows, err := q.db.QueryContext(ctx, schemaScopedFilter, id) if err != nil { return nil, err } defer rows.Close() var items []uint64 for rows.Next() { var id uint64 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 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/mysql/query.sql ================================================ -- name: SchemaScopedFilter :many SELECT * FROM foo.bar WHERE id = ?; ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/mysql/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedFilter = `-- name: SchemaScopedFilter :many SELECT id FROM foo.bar WHERE id = $1 ` func (q *Queries) SchemaScopedFilter(ctx context.Context, id int32) ([]int32, error) { rows, err := q.db.Query(ctx, schemaScopedFilter, id) 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.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/query.sql ================================================ -- name: SchemaScopedFilter :many SELECT * FROM foo.bar WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedFilter = `-- name: SchemaScopedFilter :many SELECT id FROM foo.bar WHERE id = $1 ` func (q *Queries) SchemaScopedFilter(ctx context.Context, id int32) ([]int32, error) { rows, err := q.db.Query(ctx, schemaScopedFilter, id) 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.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/query.sql ================================================ -- name: SchemaScopedFilter :many SELECT * FROM foo.bar WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedFilter = `-- name: SchemaScopedFilter :many SELECT id FROM foo.bar WHERE id = $1 ` func (q *Queries) SchemaScopedFilter(ctx context.Context, id int32) ([]int32, error) { rows, err := q.db.QueryContext(ctx, schemaScopedFilter, id) 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 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/query.sql ================================================ -- name: SchemaScopedFilter :many SELECT * FROM foo.bar WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_filter/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/mysql/exec.json ================================================ { "contexts": ["base"], "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID uint64 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedColList = `-- name: SchemaScopedColList :many SELECT foo.bar.id FROM foo.bar ` func (q *Queries) SchemaScopedColList(ctx context.Context) ([]uint64, error) { rows, err := q.db.QueryContext(ctx, schemaScopedColList) if err != nil { return nil, err } defer rows.Close() var items []uint64 for rows.Next() { var id uint64 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 schemaScopedList = `-- name: SchemaScopedList :many SELECT id FROM foo.bar ` func (q *Queries) SchemaScopedList(ctx context.Context) ([]uint64, error) { rows, err := q.db.QueryContext(ctx, schemaScopedList) if err != nil { return nil, err } defer rows.Close() var items []uint64 for rows.Next() { var id uint64 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 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/mysql/query.sql ================================================ -- name: SchemaScopedList :many SELECT * FROM foo.bar; -- name: SchemaScopedColList :many SELECT foo.bar.id FROM foo.bar; ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/mysql/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedColList = `-- name: SchemaScopedColList :many SELECT foo.bar.id FROM foo.bar ` func (q *Queries) SchemaScopedColList(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(ctx, schemaScopedColList) 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.Err(); err != nil { return nil, err } return items, nil } const schemaScopedList = `-- name: SchemaScopedList :many SELECT id FROM foo.bar ` func (q *Queries) SchemaScopedList(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(ctx, schemaScopedList) 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.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/query.sql ================================================ -- name: SchemaScopedList :many SELECT * FROM foo.bar; -- name: SchemaScopedColList :many SELECT foo.bar.id FROM foo.bar; ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedColList = `-- name: SchemaScopedColList :many SELECT foo.bar.id FROM foo.bar ` func (q *Queries) SchemaScopedColList(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(ctx, schemaScopedColList) 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.Err(); err != nil { return nil, err } return items, nil } const schemaScopedList = `-- name: SchemaScopedList :many SELECT id FROM foo.bar ` func (q *Queries) SchemaScopedList(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(ctx, schemaScopedList) 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.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/query.sql ================================================ -- name: SchemaScopedList :many SELECT * FROM foo.bar; -- name: SchemaScopedColList :many SELECT foo.bar.id FROM foo.bar; ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedColList = `-- name: SchemaScopedColList :many SELECT foo.bar.id FROM foo.bar ` func (q *Queries) SchemaScopedColList(ctx context.Context) ([]int32, error) { rows, err := q.db.QueryContext(ctx, schemaScopedColList) 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 schemaScopedList = `-- name: SchemaScopedList :many SELECT id FROM foo.bar ` func (q *Queries) SchemaScopedList(ctx context.Context) ([]int32, error) { rows, err := q.db.QueryContext(ctx, schemaScopedList) 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 } ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/query.sql ================================================ -- name: SchemaScopedList :many SELECT * FROM foo.bar; -- name: SchemaScopedColList :many SELECT foo.bar.id FROM foo.bar; ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_list/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/mysql/exec.json ================================================ { "contexts": ["base"], "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID uint64 Name string } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedUpdate = `-- name: SchemaScopedUpdate :exec UPDATE foo.bar SET name = ? WHERE id = ? ` type SchemaScopedUpdateParams struct { Name string ID uint64 } func (q *Queries) SchemaScopedUpdate(ctx context.Context, arg SchemaScopedUpdateParams) error { _, err := q.db.ExecContext(ctx, schemaScopedUpdate, arg.Name, arg.ID) return err } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/mysql/query.sql ================================================ -- name: SchemaScopedUpdate :exec UPDATE foo.bar SET name = ? WHERE id = ?; ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/mysql/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null, name text not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID int32 Name string } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedUpdate = `-- name: SchemaScopedUpdate :exec UPDATE foo.bar SET name = $2 WHERE id = $1 ` type SchemaScopedUpdateParams struct { ID int32 Name string } func (q *Queries) SchemaScopedUpdate(ctx context.Context, arg SchemaScopedUpdateParams) error { _, err := q.db.Exec(ctx, schemaScopedUpdate, arg.ID, arg.Name) return err } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/query.sql ================================================ -- name: SchemaScopedUpdate :exec UPDATE foo.bar SET name = $2 WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null, name text not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID int32 Name string } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedUpdate = `-- name: SchemaScopedUpdate :exec UPDATE foo.bar SET name = $2 WHERE id = $1 ` type SchemaScopedUpdateParams struct { ID int32 Name string } func (q *Queries) SchemaScopedUpdate(ctx context.Context, arg SchemaScopedUpdateParams) error { _, err := q.db.Exec(ctx, schemaScopedUpdate, arg.ID, arg.Name) return err } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/query.sql ================================================ -- name: SchemaScopedUpdate :exec UPDATE foo.bar SET name = $2 WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null, name text not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type FooBar struct { ID int32 Name string } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const schemaScopedUpdate = `-- name: SchemaScopedUpdate :exec UPDATE foo.bar SET name = $2 WHERE id = $1 ` type SchemaScopedUpdateParams struct { ID int32 Name string } func (q *Queries) SchemaScopedUpdate(ctx context.Context, arg SchemaScopedUpdateParams) error { _, err := q.db.ExecContext(ctx, schemaScopedUpdate, arg.ID, arg.Name) return err } ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/query.sql ================================================ -- name: SchemaScopedUpdate :exec UPDATE foo.bar SET name = $2 WHERE id = $1; ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/schema.sql ================================================ CREATE SCHEMA foo; CREATE TABLE foo.bar (id serial not null, name text not null); ================================================ FILE: internal/endtoend/testdata/schema_scoped_update/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/schema_table_column_ref/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/2948 ================================================ FILE: internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/schema.sql ================================================ 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 ); ================================================ FILE: internal/endtoend/testdata/schema_table_column_ref/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/select_column_cast/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_column_cast/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar bool } ================================================ FILE: internal/endtoend/testdata/select_column_cast/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectColumnCast = `-- name: SelectColumnCast :many SELECT CAST(bar AS UNSIGNED) FROM foo ` func (q *Queries) SelectColumnCast(ctx context.Context) ([]int64, error) { rows, err := q.db.QueryContext(ctx, selectColumnCast) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var bar int64 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 } ================================================ FILE: internal/endtoend/testdata/select_column_cast/mysql/query.sql ================================================ -- name: SelectColumnCast :many SELECT CAST(bar AS UNSIGNED) FROM foo; ================================================ FILE: internal/endtoend/testdata/select_column_cast/mysql/schema.sql ================================================ CREATE TABLE foo (bar BOOLEAN NOT NULL); ================================================ FILE: internal/endtoend/testdata/select_column_cast/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar bool } ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectColumnCast = `-- name: SelectColumnCast :many SELECT bar::int FROM foo ` func (q *Queries) SelectColumnCast(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(ctx, selectColumnCast) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var bar int32 if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/query.sql ================================================ -- name: SelectColumnCast :many SELECT bar::int FROM foo; ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar bool not null); ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar bool } ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectColumnCast = `-- name: SelectColumnCast :many SELECT bar::int FROM foo ` func (q *Queries) SelectColumnCast(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(ctx, selectColumnCast) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var bar int32 if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/query.sql ================================================ -- name: SelectColumnCast :many SELECT bar::int FROM foo; ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar bool not null); ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar bool } ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectColumnCast = `-- name: SelectColumnCast :many SELECT bar::int FROM foo ` func (q *Queries) SelectColumnCast(ctx context.Context) ([]int32, error) { rows, err := q.db.QueryContext(ctx, selectColumnCast) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var bar int32 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 } ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/stdlib/query.sql ================================================ -- name: SelectColumnCast :many SELECT bar::int FROM foo; ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (bar bool not null); ================================================ FILE: internal/endtoend/testdata/select_column_cast/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_column_cast/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_column_cast/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Bar string } ================================================ FILE: internal/endtoend/testdata/select_column_cast/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectColumnCast = `-- name: SelectColumnCast :many SELECT CAST(bar AS BLOB) FROM foo ` func (q *Queries) SelectColumnCast(ctx context.Context) ([][]byte, error) { rows, err := q.db.QueryContext(ctx, selectColumnCast) if err != nil { return nil, err } defer rows.Close() var items [][]byte for rows.Next() { var bar []byte 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 } ================================================ FILE: internal/endtoend/testdata/select_column_cast/sqlite/query.sql ================================================ -- name: SelectColumnCast :many SELECT CAST(bar AS BLOB) FROM foo; ================================================ FILE: internal/endtoend/testdata/select_column_cast/sqlite/schema.sql ================================================ CREATE TABLE foo (bar TEXT NOT NULL); ================================================ FILE: internal/endtoend/testdata/select_column_cast/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_cte/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_cte/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/select_cte/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listAuthors = `-- name: ListAuthors :many WITH abc AS ( SELECT 1 AS n ) SELECT n FROM abc ` func (q *Queries) ListAuthors(ctx context.Context) ([]int64, error) { rows, err := q.db.QueryContext(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var n int64 if err := rows.Scan(&n); err != nil { return nil, err } items = append(items, n) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_cte/sqlite/query.sql ================================================ -- name: ListAuthors :many WITH abc AS ( SELECT 1 AS n ) SELECT * FROM abc; ================================================ FILE: internal/endtoend/testdata/select_cte/sqlite/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/select_cte/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "name": "querytest" } ] } ================================================ FILE: internal/endtoend/testdata/select_distinct/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_distinct/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_distinct/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getBars = `-- name: GetBars :many SELECT DISTINCT ON (a.id) a.id, a.name FROM bar a ` func (q *Queries) GetBars(ctx context.Context) ([]Bar, error) { rows, err := q.db.Query(ctx, getBars) if err != nil { return nil, err } defer rows.Close() var items []Bar for rows.Next() { var i Bar if err := rows.Scan(&i.ID, &i.Name); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_distinct/pgx/v4/query.sql ================================================ -- name: GetBars :many SELECT DISTINCT ON (a.id) a.* FROM bar a; ================================================ FILE: internal/endtoend/testdata/select_distinct/pgx/v4/schema.sql ================================================ CREATE TABLE bar (id serial not null, name text); ================================================ FILE: internal/endtoend/testdata/select_distinct/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_distinct/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_distinct/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Bar struct { ID int32 Name pgtype.Text } ================================================ FILE: internal/endtoend/testdata/select_distinct/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getBars = `-- name: GetBars :many SELECT DISTINCT ON (a.id) a.id, a.name FROM bar a ` func (q *Queries) GetBars(ctx context.Context) ([]Bar, error) { rows, err := q.db.Query(ctx, getBars) if err != nil { return nil, err } defer rows.Close() var items []Bar for rows.Next() { var i Bar if err := rows.Scan(&i.ID, &i.Name); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_distinct/pgx/v5/query.sql ================================================ -- name: GetBars :many SELECT DISTINCT ON (a.id) a.* FROM bar a; ================================================ FILE: internal/endtoend/testdata/select_distinct/pgx/v5/schema.sql ================================================ CREATE TABLE bar (id serial not null, name text); ================================================ FILE: internal/endtoend/testdata/select_distinct/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_distinct/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_distinct/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_distinct/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getBars = `-- name: GetBars :many SELECT DISTINCT ON (a.id) a.id, a.name FROM bar a ` func (q *Queries) GetBars(ctx context.Context) ([]Bar, error) { rows, err := q.db.QueryContext(ctx, getBars) if err != nil { return nil, err } defer rows.Close() var items []Bar for rows.Next() { var i Bar if err := rows.Scan(&i.ID, &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 } ================================================ FILE: internal/endtoend/testdata/select_distinct/stdlib/query.sql ================================================ -- name: GetBars :many SELECT DISTINCT ON (a.id) a.* FROM bar a; ================================================ FILE: internal/endtoend/testdata/select_distinct/stdlib/schema.sql ================================================ CREATE TABLE bar (id serial not null, name text); ================================================ FILE: internal/endtoend/testdata/select_distinct/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/mysql/query.sql ================================================ -- name: GetBars :many SELECT FROM bar; ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/mysql/schema.sql ================================================ CREATE TABLE bar (name text); ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/mysql/stderr.txt ================================================ # package querytest query.sql:2:12: syntax error near "FROM bar;" ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getBars = `-- name: GetBars :many SELECT FROM bar LIMIT 5 ` type GetBarsRow struct { } func (q *Queries) GetBars(ctx context.Context) ([]GetBarsRow, error) { rows, err := q.db.Query(ctx, getBars) if err != nil { return nil, err } defer rows.Close() var items []GetBarsRow for rows.Next() { var i GetBarsRow if err := rows.Scan(); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/query.sql ================================================ -- name: GetBars :many SELECT FROM bar LIMIT 5; ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE bar (id serial not null, name text); ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Bar struct { ID int32 Name pgtype.Text } ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getBars = `-- name: GetBars :many SELECT FROM bar LIMIT 5 ` type GetBarsRow struct { } func (q *Queries) GetBars(ctx context.Context) ([]GetBarsRow, error) { rows, err := q.db.Query(ctx, getBars) if err != nil { return nil, err } defer rows.Close() var items []GetBarsRow for rows.Next() { var i GetBarsRow if err := rows.Scan(); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/query.sql ================================================ -- name: GetBars :many SELECT FROM bar LIMIT 5; ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE bar (id serial not null, name text); ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { ID int32 Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getBars = `-- name: GetBars :many SELECT FROM bar LIMIT 5 ` type GetBarsRow struct { } func (q *Queries) GetBars(ctx context.Context) ([]GetBarsRow, error) { rows, err := q.db.QueryContext(ctx, getBars) if err != nil { return nil, err } defer rows.Close() var items []GetBarsRow for rows.Next() { var i GetBarsRow if err := rows.Scan(); 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 } ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/query.sql ================================================ -- name: GetBars :many SELECT FROM bar LIMIT 5; ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/schema.sql ================================================ CREATE TABLE bar (id serial not null, name text); ================================================ FILE: internal/endtoend/testdata/select_empty_column_list/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_exists/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_exists/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/select_exists/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const barExists = `-- name: BarExists :one SELECT EXISTS ( SELECT 1 FROM bar where id = $1 ) ` func (q *Queries) BarExists(ctx context.Context, id int32) (bool, error) { row := q.db.QueryRow(ctx, barExists, id) var exists bool err := row.Scan(&exists) return exists, err } ================================================ FILE: internal/endtoend/testdata/select_exists/pgx/v4/query.sql ================================================ -- name: BarExists :one SELECT EXISTS ( SELECT 1 FROM bar where id = $1 ); ================================================ FILE: internal/endtoend/testdata/select_exists/pgx/v4/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/select_exists/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_exists/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_exists/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/select_exists/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const barExists = `-- name: BarExists :one SELECT EXISTS ( SELECT 1 FROM bar where id = $1 ) ` func (q *Queries) BarExists(ctx context.Context, id int32) (bool, error) { row := q.db.QueryRow(ctx, barExists, id) var exists bool err := row.Scan(&exists) return exists, err } ================================================ FILE: internal/endtoend/testdata/select_exists/pgx/v5/query.sql ================================================ -- name: BarExists :one SELECT EXISTS ( SELECT 1 FROM bar where id = $1 ); ================================================ FILE: internal/endtoend/testdata/select_exists/pgx/v5/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/select_exists/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_exists/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_exists/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/select_exists/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const barExists = `-- name: BarExists :one SELECT EXISTS ( SELECT 1 FROM bar where id = ? ) ` func (q *Queries) BarExists(ctx context.Context, id int64) (bool, error) { row := q.db.QueryRowContext(ctx, barExists, id) var exists bool err := row.Scan(&exists) return exists, err } ================================================ FILE: internal/endtoend/testdata/select_exists/sqlite/query.sql ================================================ -- name: BarExists :one SELECT EXISTS ( SELECT 1 FROM bar where id = ? ); ================================================ FILE: internal/endtoend/testdata/select_exists/sqlite/schema.sql ================================================ CREATE TABLE bar (id integer not null primary key autoincrement); ================================================ FILE: internal/endtoend/testdata/select_exists/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_exists/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_exists/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/select_exists/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const barExists = `-- name: BarExists :one SELECT EXISTS ( SELECT 1 FROM bar where id = $1 ) ` func (q *Queries) BarExists(ctx context.Context, id int32) (bool, error) { row := q.db.QueryRowContext(ctx, barExists, id) var exists bool err := row.Scan(&exists) return exists, err } ================================================ FILE: internal/endtoend/testdata/select_exists/stdlib/query.sql ================================================ -- name: BarExists :one SELECT EXISTS ( SELECT 1 FROM bar where id = $1 ); ================================================ FILE: internal/endtoend/testdata/select_exists/stdlib/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/select_exists/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_in_and/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_in_and/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Author struct { ID int64 Name string Age sql.NullInt64 } type Book struct { ID int64 Author string Translator string Year sql.NullInt64 } type Translator struct { ID int64 Name string Age sql.NullInt64 } ================================================ FILE: internal/endtoend/testdata/select_in_and/sqlite/go/query.sql.go ================================================ // 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 books AS b WHERE b.author NOT IN ( SELECT a.name FROM authors a WHERE a.age >= ? ) AND b.translator NOT IN ( SELECT t.name FROM translators t WHERE t.age >= ? ) AND b.year <= ? ` type DeleteAuthorParams struct { Age sql.NullInt64 Age_2 sql.NullInt64 Year sql.NullInt64 } func (q *Queries) DeleteAuthor(ctx context.Context, arg DeleteAuthorParams) error { _, err := q.db.ExecContext(ctx, deleteAuthor, arg.Age, arg.Age_2, arg.Year) return err } ================================================ FILE: internal/endtoend/testdata/select_in_and/sqlite/query.sql ================================================ -- name: DeleteAuthor :exec DELETE FROM books AS b WHERE b.author NOT IN ( SELECT a.name FROM authors a WHERE a.age >= ? ) AND b.translator NOT IN ( SELECT t.name FROM translators t WHERE t.age >= ? ) AND b.year <= ?; ================================================ FILE: internal/endtoend/testdata/select_in_and/sqlite/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id integer PRIMARY KEY, name text NOT NULL, age integer ); CREATE TABLE translators ( id integer PRIMARY KEY, name text NOT NULL, age integer ); CREATE TABLE books ( id integer PRIMARY KEY, author text NOT NULL, translator text NOT NULL, year integer ); ================================================ FILE: internal/endtoend/testdata/select_in_and/sqlite/sqlc.json ================================================ {"version": "1", "packages": [{"path": "go", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "name": "querytest"}]} ================================================ FILE: internal/endtoend/testdata/select_limit/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_limit/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { A sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_limit/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const fooLimit = `-- name: FooLimit :many SELECT a FROM foo LIMIT ? ` func (q *Queries) FooLimit(ctx context.Context, limit int32) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, fooLimit, limit) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var a sql.NullString if err := rows.Scan(&a); err != nil { return nil, err } items = append(items, a) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const fooLimitOffset = `-- name: FooLimitOffset :many SELECT a FROM foo LIMIT ? OFFSET ? ` type FooLimitOffsetParams struct { Limit int32 Offset int32 } func (q *Queries) FooLimitOffset(ctx context.Context, arg FooLimitOffsetParams) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, fooLimitOffset, arg.Limit, arg.Offset) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var a sql.NullString if err := rows.Scan(&a); err != nil { return nil, err } items = append(items, a) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_limit/mysql/query.sql ================================================ /* name: FooLimit :many */ SELECT a FROM foo LIMIT ?; /* name: FooLimitOffset :many */ SELECT a FROM foo LIMIT ? OFFSET ?; ================================================ FILE: internal/endtoend/testdata/select_limit/mysql/schema.sql ================================================ CREATE TABLE foo (a text); ================================================ FILE: internal/endtoend/testdata/select_limit/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/pgx/v4/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { A sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const fooLimit = `-- name: FooLimit :many SELECT a FROM foo LIMIT $1 ` func (q *Queries) FooLimit(ctx context.Context, limit int32) ([]sql.NullString, error) { rows, err := q.db.Query(ctx, fooLimit, limit) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var a sql.NullString if err := rows.Scan(&a); err != nil { return nil, err } items = append(items, a) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const fooLimitOffset = `-- name: FooLimitOffset :many SELECT a FROM foo LIMIT $1 OFFSET $2 ` type FooLimitOffsetParams struct { Limit int32 Offset int32 } func (q *Queries) FooLimitOffset(ctx context.Context, arg FooLimitOffsetParams) ([]sql.NullString, error) { rows, err := q.db.Query(ctx, fooLimitOffset, arg.Limit, arg.Offset) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var a sql.NullString if err := rows.Scan(&a); err != nil { return nil, err } items = append(items, a) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/pgx/v4/query.sql ================================================ -- name: FooLimit :many SELECT a FROM foo LIMIT $1; -- name: FooLimitOffset :many SELECT a FROM foo LIMIT $1 OFFSET $2; ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (a text); ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/pgx/v5/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { A pgtype.Text } ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 fooLimit = `-- name: FooLimit :many SELECT a FROM foo LIMIT $1 ` func (q *Queries) FooLimit(ctx context.Context, limit int32) ([]pgtype.Text, error) { rows, err := q.db.Query(ctx, fooLimit, limit) if err != nil { return nil, err } defer rows.Close() var items []pgtype.Text for rows.Next() { var a pgtype.Text if err := rows.Scan(&a); err != nil { return nil, err } items = append(items, a) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const fooLimitOffset = `-- name: FooLimitOffset :many SELECT a FROM foo LIMIT $1 OFFSET $2 ` type FooLimitOffsetParams struct { Limit int32 Offset int32 } func (q *Queries) FooLimitOffset(ctx context.Context, arg FooLimitOffsetParams) ([]pgtype.Text, error) { rows, err := q.db.Query(ctx, fooLimitOffset, arg.Limit, arg.Offset) if err != nil { return nil, err } defer rows.Close() var items []pgtype.Text for rows.Next() { var a pgtype.Text if err := rows.Scan(&a); err != nil { return nil, err } items = append(items, a) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/pgx/v5/query.sql ================================================ -- name: FooLimit :many SELECT a FROM foo LIMIT $1; -- name: FooLimitOffset :many SELECT a FROM foo LIMIT $1 OFFSET $2; ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (a text); ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/stdlib/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { A sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const fooLimit = `-- name: FooLimit :many SELECT a FROM foo LIMIT $1 ` func (q *Queries) FooLimit(ctx context.Context, limit int32) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, fooLimit, limit) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var a sql.NullString if err := rows.Scan(&a); err != nil { return nil, err } items = append(items, a) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const fooLimitOffset = `-- name: FooLimitOffset :many SELECT a FROM foo LIMIT $1 OFFSET $2 ` type FooLimitOffsetParams struct { Limit int32 Offset int32 } func (q *Queries) FooLimitOffset(ctx context.Context, arg FooLimitOffsetParams) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, fooLimitOffset, arg.Limit, arg.Offset) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var a sql.NullString if err := rows.Scan(&a); err != nil { return nil, err } items = append(items, a) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/stdlib/query.sql ================================================ -- name: FooLimit :many SELECT a FROM foo LIMIT $1; -- name: FooLimitOffset :many SELECT a FROM foo LIMIT $1 OFFSET $2; ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (a text); ================================================ FILE: internal/endtoend/testdata/select_limit/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_limit/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_limit/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { A sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_limit/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const fooLimit = `-- name: FooLimit :many SELECT a FROM foo LIMIT ? ` func (q *Queries) FooLimit(ctx context.Context, limit int64) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, fooLimit, limit) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var a sql.NullString if err := rows.Scan(&a); err != nil { return nil, err } items = append(items, a) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const fooLimitOffset = `-- name: FooLimitOffset :many SELECT a FROM foo LIMIT ? OFFSET ? ` type FooLimitOffsetParams struct { Limit int64 Offset int64 } func (q *Queries) FooLimitOffset(ctx context.Context, arg FooLimitOffsetParams) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, fooLimitOffset, arg.Limit, arg.Offset) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var a sql.NullString if err := rows.Scan(&a); err != nil { return nil, err } items = append(items, a) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_limit/sqlite/query.sql ================================================ /* name: FooLimit :many */ SELECT a FROM foo LIMIT ?; /* name: FooLimitOffset :many */ SELECT a FROM foo LIMIT ? OFFSET ?; ================================================ FILE: internal/endtoend/testdata/select_limit/sqlite/schema.sql ================================================ CREATE TABLE foo (a text); ================================================ FILE: internal/endtoend/testdata/select_limit/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_nested_count/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_nested_count/mysql/go/models.go ================================================ // 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 Book struct { ID int64 AuthorID int64 Title string } ================================================ FILE: internal/endtoend/testdata/select_nested_count/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getAuthorsWithBooksCount = `-- name: GetAuthorsWithBooksCount :many SELECT id, name, bio, ( SELECT COUNT(id) FROM books WHERE books.author_id = id ) AS books_count FROM authors ` type GetAuthorsWithBooksCountRow struct { ID int64 Name string Bio sql.NullString BooksCount int64 } func (q *Queries) GetAuthorsWithBooksCount(ctx context.Context) ([]GetAuthorsWithBooksCountRow, error) { rows, err := q.db.QueryContext(ctx, getAuthorsWithBooksCount) if err != nil { return nil, err } defer rows.Close() var items []GetAuthorsWithBooksCountRow for rows.Next() { var i GetAuthorsWithBooksCountRow if err := rows.Scan( &i.ID, &i.Name, &i.Bio, &i.BooksCount, ); 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 } ================================================ FILE: internal/endtoend/testdata/select_nested_count/mysql/query.sql ================================================ -- name: GetAuthorsWithBooksCount :many SELECT *, ( SELECT COUNT(id) FROM books WHERE books.author_id = id ) AS books_count FROM authors; ================================================ FILE: internal/endtoend/testdata/select_nested_count/mysql/schema.sql ================================================ CREATE TABLE authors ( id bigint PRIMARY KEY, name text NOT NULL, bio text ); CREATE TABLE books ( id bigint PRIMARY KEY, author_id bigint NOT NULL REFERENCES authors(id), title text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/select_nested_count/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "engine": "mysql" } ] } ================================================ FILE: internal/endtoend/testdata/select_nested_count/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_nested_count/postgresql/go/models.go ================================================ // 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 Book struct { ID int64 AuthorID int64 Title string } ================================================ FILE: internal/endtoend/testdata/select_nested_count/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getAuthorsWithBooksCount = `-- name: GetAuthorsWithBooksCount :many SELECT id, name, bio, ( SELECT COUNT(id) FROM books WHERE books.author_id = id ) AS books_count FROM authors ` type GetAuthorsWithBooksCountRow struct { ID int64 Name string Bio sql.NullString BooksCount int64 } func (q *Queries) GetAuthorsWithBooksCount(ctx context.Context) ([]GetAuthorsWithBooksCountRow, error) { rows, err := q.db.QueryContext(ctx, getAuthorsWithBooksCount) if err != nil { return nil, err } defer rows.Close() var items []GetAuthorsWithBooksCountRow for rows.Next() { var i GetAuthorsWithBooksCountRow if err := rows.Scan( &i.ID, &i.Name, &i.Bio, &i.BooksCount, ); 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 } ================================================ FILE: internal/endtoend/testdata/select_nested_count/postgresql/query.sql ================================================ -- name: GetAuthorsWithBooksCount :many SELECT *, ( SELECT COUNT(id) FROM books WHERE books.author_id = id ) AS books_count FROM authors; ================================================ FILE: internal/endtoend/testdata/select_nested_count/postgresql/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); CREATE TABLE books ( id BIGSERIAL PRIMARY KEY, author_id BIGSERIAL NOT NULL REFERENCES authors(id), title text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/select_nested_count/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_nested_count/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_nested_count/sqlite/go/models.go ================================================ // 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 Book struct { ID int64 AuthorID int64 Title string } ================================================ FILE: internal/endtoend/testdata/select_nested_count/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getAuthorsWithBooksCount = `-- name: GetAuthorsWithBooksCount :many SELECT id, name, bio, ( SELECT COUNT(id) FROM books WHERE books.author_id = id ) AS books_count FROM authors ` type GetAuthorsWithBooksCountRow struct { ID int64 Name string Bio sql.NullString BooksCount int64 } func (q *Queries) GetAuthorsWithBooksCount(ctx context.Context) ([]GetAuthorsWithBooksCountRow, error) { rows, err := q.db.QueryContext(ctx, getAuthorsWithBooksCount) if err != nil { return nil, err } defer rows.Close() var items []GetAuthorsWithBooksCountRow for rows.Next() { var i GetAuthorsWithBooksCountRow if err := rows.Scan( &i.ID, &i.Name, &i.Bio, &i.BooksCount, ); 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 } ================================================ FILE: internal/endtoend/testdata/select_nested_count/sqlite/query.sql ================================================ -- name: GetAuthorsWithBooksCount :many SELECT *, ( SELECT COUNT(id) FROM books WHERE books.author_id = id ) AS books_count FROM authors; ================================================ FILE: internal/endtoend/testdata/select_nested_count/sqlite/schema.sql ================================================ CREATE TABLE authors ( id bigint PRIMARY KEY, name text NOT NULL, bio text ); CREATE TABLE books ( id bigint PRIMARY KEY, author_id bigint NOT NULL REFERENCES authors(id), title text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/select_nested_count/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "engine": "sqlite" } ] } ================================================ FILE: internal/endtoend/testdata/select_not_exists/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_not_exists/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/select_not_exists/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const barNotExists = `-- name: BarNotExists :one SELECT NOT EXISTS ( SELECT 1 FROM bar where id = $1 ) ` func (q *Queries) BarNotExists(ctx context.Context, id int32) (bool, error) { row := q.db.QueryRow(ctx, barNotExists, id) var not_exists bool err := row.Scan(¬_exists) return not_exists, err } ================================================ FILE: internal/endtoend/testdata/select_not_exists/pgx/v4/query.sql ================================================ -- name: BarNotExists :one SELECT NOT EXISTS ( SELECT 1 FROM bar where id = $1 ); ================================================ FILE: internal/endtoend/testdata/select_not_exists/pgx/v4/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/select_not_exists/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_not_exists/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_not_exists/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/select_not_exists/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const barNotExists = `-- name: BarNotExists :one SELECT NOT EXISTS ( SELECT 1 FROM bar where id = $1 ) ` func (q *Queries) BarNotExists(ctx context.Context, id int32) (bool, error) { row := q.db.QueryRow(ctx, barNotExists, id) var not_exists bool err := row.Scan(¬_exists) return not_exists, err } ================================================ FILE: internal/endtoend/testdata/select_not_exists/pgx/v5/query.sql ================================================ -- name: BarNotExists :one SELECT NOT EXISTS ( SELECT 1 FROM bar where id = $1 ); ================================================ FILE: internal/endtoend/testdata/select_not_exists/pgx/v5/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/select_not_exists/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_not_exists/sqlite/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/select_not_exists/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_not_exists/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int64 } ================================================ FILE: internal/endtoend/testdata/select_not_exists/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const barNotExists = `-- name: BarNotExists :one SELECT NOT EXISTS ( SELECT 1 FROM bar WHERE id = ? ) ` func (q *Queries) BarNotExists(ctx context.Context, id int64) (bool, error) { row := q.db.QueryRowContext(ctx, barNotExists, id) var not_exists bool err := row.Scan(¬_exists) return not_exists, err } ================================================ FILE: internal/endtoend/testdata/select_not_exists/sqlite/query.sql ================================================ -- name: BarNotExists :one SELECT NOT EXISTS ( SELECT 1 FROM bar WHERE id = ? ); ================================================ FILE: internal/endtoend/testdata/select_not_exists/sqlite/schema.sql ================================================ CREATE TABLE bar (id integer not null primary key autoincrement); ================================================ FILE: internal/endtoend/testdata/select_not_exists/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_not_exists/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_not_exists/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/select_not_exists/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const barNotExists = `-- name: BarNotExists :one SELECT NOT EXISTS ( SELECT 1 FROM bar where id = $1 ) ` func (q *Queries) BarNotExists(ctx context.Context, id int32) (bool, error) { row := q.db.QueryRowContext(ctx, barNotExists, id) var not_exists bool err := row.Scan(¬_exists) return not_exists, err } ================================================ FILE: internal/endtoend/testdata/select_not_exists/stdlib/query.sql ================================================ -- name: BarNotExists :one SELECT NOT EXISTS ( SELECT 1 FROM bar where id = $1 ); ================================================ FILE: internal/endtoend/testdata/select_not_exists/stdlib/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/select_not_exists/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_sequence/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1634 ================================================ FILE: internal/endtoend/testdata/select_sequence/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/select_sequence/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_sequence/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/select_sequence/postgresql/pgx/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getLastValue = `-- name: GetLastValue :one SELECT last_value FROM my_sequence ` func (q *Queries) GetLastValue(ctx context.Context) (int64, error) { row := q.db.QueryRow(ctx, getLastValue) var last_value int64 err := row.Scan(&last_value) return last_value, err } ================================================ FILE: internal/endtoend/testdata/select_sequence/postgresql/pgx/query.sql ================================================ -- name: GetLastValue :one SELECT last_value FROM my_sequence; ================================================ FILE: internal/endtoend/testdata/select_sequence/postgresql/pgx/schema.sql ================================================ CREATE SEQUENCE public.my_sequence START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ================================================ FILE: internal/endtoend/testdata/select_sequence/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/select_star/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_star/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 FirstName string LastName sql.NullString Age int32 } ================================================ FILE: internal/endtoend/testdata/select_star/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); 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 getIDAll = `-- name: GetIDAll :many SELECT id FROM (SELECT id FROM users) t ` func (q *Queries) GetIDAll(ctx context.Context) ([]int32, error) { rows, err := q.db.QueryContext(ctx, getIDAll) 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 } ================================================ FILE: internal/endtoend/testdata/select_star/mysql/query.sql ================================================ /* name: GetAll :many */ SELECT * FROM users; /* name: GetIDAll :many */ SELECT * FROM (SELECT id FROM users) t; ================================================ FILE: internal/endtoend/testdata/select_star/mysql/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ) ENGINE=InnoDB; ================================================ FILE: internal/endtoend/testdata/select_star/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "mysql" } ] } ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 FirstName string LastName sql.NullString Age int32 } ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getIDAll = `-- name: GetIDAll :many SELECT id FROM (SELECT id FROM users) t ` func (q *Queries) GetIDAll(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(ctx, getIDAll) 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.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/pgx/v4/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; /* name: GetIDAll :many */ SELECT * FROM (SELECT id FROM users) t; ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type User struct { ID int32 FirstName string LastName pgtype.Text Age int32 } ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getIDAll = `-- name: GetIDAll :many SELECT id FROM (SELECT id FROM users) t ` func (q *Queries) GetIDAll(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(ctx, getIDAll) 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.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/pgx/v5/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; /* name: GetIDAll :many */ SELECT * FROM (SELECT id FROM users) t; ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int32 FirstName string LastName sql.NullString Age int32 } ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); 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 getIDAll = `-- name: GetIDAll :many SELECT id FROM (SELECT id FROM users) t ` func (q *Queries) GetIDAll(ctx context.Context) ([]int32, error) { rows, err := q.db.QueryContext(ctx, getIDAll) 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 } ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/stdlib/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; /* name: GetIDAll :many */ SELECT * FROM (SELECT id FROM users) t; ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/stdlib/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/select_star/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_star/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_star/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { ID int64 FirstName string LastName sql.NullString Age int64 } ================================================ FILE: internal/endtoend/testdata/select_star/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAll = `-- name: GetAll :many SELECT id, first_name, last_name, age FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]User, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []User for rows.Next() { var i User if err := rows.Scan( &i.ID, &i.FirstName, &i.LastName, &i.Age, ); 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 getIDAll = `-- name: GetIDAll :many SELECT id FROM (SELECT id FROM users) t ` func (q *Queries) GetIDAll(ctx context.Context) ([]int64, error) { rows, err := q.db.QueryContext(ctx, getIDAll) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var id int64 if err := rows.Scan(&id); err != nil { return nil, err } items = append(items, id) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_star/sqlite/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; /* name: GetIDAll :many */ SELECT * FROM (SELECT id FROM users) t; ================================================ FILE: internal/endtoend/testdata/select_star/sqlite/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL PRIMARY KEY, first_name varchar(255) NOT NULL, last_name varchar(255), age integer NOT NULL ); ================================================ FILE: internal/endtoend/testdata/select_star/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "sqlite" } ] } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { Camelcase sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getAll = `-- name: GetAll :many SELECT camelcase FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var camelcase sql.NullString if err := rows.Scan(&camelcase); err != nil { return nil, err } items = append(items, camelcase) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/mysql/query.sql ================================================ /* name: GetAll :many */ SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/select_star_quoted/mysql/schema.sql ================================================ CREATE TABLE users ( `CamelCase` varchar(255) ) ENGINE=InnoDB; ================================================ FILE: internal/endtoend/testdata/select_star_quoted/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "mysql" } ] } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { CamelCase sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getAll = `-- name: GetAll :many SELECT "CamelCase" FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]sql.NullString, error) { rows, err := q.db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var CamelCase sql.NullString if err := rows.Scan(&CamelCase); err != nil { return nil, err } items = append(items, CamelCase) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE users ( "CamelCase" varchar(255) ); ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type User struct { CamelCase pgtype.Text } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 getAll = `-- name: GetAll :many SELECT "CamelCase" FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]pgtype.Text, error) { rows, err := q.db.Query(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []pgtype.Text for rows.Next() { var CamelCase pgtype.Text if err := rows.Scan(&CamelCase); err != nil { return nil, err } items = append(items, CamelCase) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE users ( "CamelCase" varchar(255) ); ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type User struct { CamelCase sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const getAll = `-- name: GetAll :many SELECT "CamelCase" FROM users ` func (q *Queries) GetAll(ctx context.Context) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, getAll) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var CamelCase sql.NullString if err := rows.Scan(&CamelCase); err != nil { return nil, err } items = append(items, CamelCase) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/query.sql ================================================ -- name: GetAll :many SELECT * FROM users; ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/schema.sql ================================================ CREATE TABLE users ( "CamelCase" varchar(255) ); ================================================ FILE: internal/endtoend/testdata/select_star_quoted/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_subquery/postgresql/issue.md ================================================ https://github.com/sqlc-dev/sqlc/pull/2639 ================================================ FILE: internal/endtoend/testdata/select_subquery/postgresql/stdlib/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { A int32 Alias sql.NullString } type Foo struct { A int32 Name sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_subquery/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const subquery = `-- name: Subquery :many SELECT a, name, (SELECT alias FROM bar WHERE bar.a=foo.a AND alias = $1 ORDER BY bar.a DESC limit 1) as alias FROM FOO WHERE a = $2 ` type SubqueryParams struct { Column1 sql.NullString Column2 sql.NullInt32 } type SubqueryRow struct { A int32 Name sql.NullString Alias sql.NullString } func (q *Queries) Subquery(ctx context.Context, arg SubqueryParams) ([]SubqueryRow, error) { rows, err := q.db.QueryContext(ctx, subquery, arg.Column1, arg.Column2) if err != nil { return nil, err } defer rows.Close() var items []SubqueryRow for rows.Next() { var i SubqueryRow if err := rows.Scan(&i.A, &i.Name, &i.Alias); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_subquery/postgresql/stdlib/query.sql ================================================ -- name: Subquery :many SELECT a, name, (SELECT alias FROM bar WHERE bar.a=foo.a AND alias = $1 ORDER BY bar.a DESC limit 1) as alias FROM FOO WHERE a = $2; ================================================ FILE: internal/endtoend/testdata/select_subquery/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (a int not null, name text); CREATE TABLE bar (a int not null, alias text); ================================================ FILE: internal/endtoend/testdata/select_subquery/postgresql/stdlib/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "database/sql" ================================================ FILE: internal/endtoend/testdata/select_subquery_alias/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1990 ================================================ FILE: internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Wallet struct { ID int64 Address string Type string Balance pgtype.Numeric } ================================================ FILE: internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/go/query.sql.go ================================================ // 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 findWallets = `-- name: FindWallets :many select id, address, balance, total_balance from ( select id, address, balance, sum(balance) over (order by balance desc rows between unbounded preceding and current row) as total_balance, sum(balance) over (order by balance desc rows between unbounded preceding and current row) - balance as last_balance from wallets where type=$1 ) amounts where amounts.last_balance < $2 ` type FindWalletsParams struct { Column1 pgtype.Text Column2 pgtype.Numeric } type FindWalletsRow struct { ID int64 Address string Balance pgtype.Numeric TotalBalance pgtype.Numeric } func (q *Queries) FindWallets(ctx context.Context, arg FindWalletsParams) ([]FindWalletsRow, error) { rows, err := q.db.Query(ctx, findWallets, arg.Column1, arg.Column2) if err != nil { return nil, err } defer rows.Close() var items []FindWalletsRow for rows.Next() { var i FindWalletsRow if err := rows.Scan( &i.ID, &i.Address, &i.Balance, &i.TotalBalance, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/query.sql ================================================ -- name: FindWallets :many select id, address, balance, total_balance from ( select id, address, balance, sum(balance) over (order by balance desc rows between unbounded preceding and current row) as total_balance, sum(balance) over (order by balance desc rows between unbounded preceding and current row) - balance as last_balance from wallets where type=$1 ) amounts where amounts.last_balance < $2; ================================================ FILE: internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/schema.sql ================================================ CREATE TABLE IF NOT EXISTS wallets ( id BIGSERIAL PRIMARY KEY, address VARCHAR(44) NOT NULL, type VARCHAR(44) NOT NULL, balance DECIMAL(32, 18) NULL ); ================================================ FILE: internal/endtoend/testdata/select_subquery_alias/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/mysql/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/mysql/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/mysql/query.sql ================================================ -- name: Subquery :many SELECT * FROM (SELECT * FROM foo); ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/mysql/schema.sql ================================================ CREATE TABLE foo (a int not null, name text); ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/mysql/sqlc.yaml ================================================ version: "2" sql: - engine: "mysql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/query.sql ================================================ -- name: Subquery :many SELECT * FROM (SELECT * FROM foo); ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/schema.sql ================================================ CREATE TABLE foo (a int not null, name text); ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/postgres/stdlib/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "database/sql" ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/sqlite/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/sqlite/query.sql ================================================ -- name: Subquery :many SELECT * FROM (SELECT * FROM foo); ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/sqlite/schema.sql ================================================ CREATE TABLE foo (a int not null, name text); ================================================ FILE: internal/endtoend/testdata/select_subquery_no_alias/sqlite/sqlc.yaml ================================================ version: "2" sql: - engine: "sqlite" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "database/sql" ================================================ FILE: internal/endtoend/testdata/select_system/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1745 ================================================ FILE: internal/endtoend/testdata/select_system/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/select_system/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_system/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Test struct { ID pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/select_system/pgx/go/query.sql.go ================================================ // 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 getSystemColumns = `-- name: GetSystemColumns :one SELECT tableoid, xmin, cmin, xmax, cmax, ctid FROM test ` type GetSystemColumnsRow struct { Tableoid pgtype.Uint32 Xmin pgtype.Uint32 Cmin pgtype.Uint32 Xmax pgtype.Uint32 Cmax pgtype.Uint32 Ctid pgtype.TID } func (q *Queries) GetSystemColumns(ctx context.Context) (GetSystemColumnsRow, error) { row := q.db.QueryRow(ctx, getSystemColumns) var i GetSystemColumnsRow err := row.Scan( &i.Tableoid, &i.Xmin, &i.Cmin, &i.Xmax, &i.Cmax, &i.Ctid, ) return i, err } ================================================ FILE: internal/endtoend/testdata/select_system/pgx/query.sql ================================================ -- name: GetSystemColumns :one SELECT tableoid, xmin, cmin, xmax, cmax, ctid FROM test; ================================================ FILE: internal/endtoend/testdata/select_system/pgx/schema.sql ================================================ CREATE TABLE test ( id INT ); ================================================ FILE: internal/endtoend/testdata/select_system/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/select_text_array/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_text_array/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/select_text_array/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectTextArray = `-- name: SelectTextArray :many SELECT $1::TEXT[] ` func (q *Queries) SelectTextArray(ctx context.Context, dollar_1 []string) ([][]string, error) { rows, err := q.db.Query(ctx, selectTextArray, dollar_1) if err != nil { return nil, err } defer rows.Close() var items [][]string for rows.Next() { var column_1 []string if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_text_array/pgx/v4/query.sql ================================================ -- name: SelectTextArray :many SELECT $1::TEXT[]; ================================================ FILE: internal/endtoend/testdata/select_text_array/pgx/v4/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/select_text_array/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_text_array/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_text_array/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/select_text_array/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectTextArray = `-- name: SelectTextArray :many SELECT $1::TEXT[] ` func (q *Queries) SelectTextArray(ctx context.Context, dollar_1 []string) ([][]string, error) { rows, err := q.db.Query(ctx, selectTextArray, dollar_1) if err != nil { return nil, err } defer rows.Close() var items [][]string for rows.Next() { var column_1 []string if err := rows.Scan(&column_1); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_text_array/pgx/v5/query.sql ================================================ -- name: SelectTextArray :many SELECT $1::TEXT[]; ================================================ FILE: internal/endtoend/testdata/select_text_array/pgx/v5/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/select_text_array/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_text_array/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_text_array/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/select_text_array/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/lib/pq" ) const selectTextArray = `-- name: SelectTextArray :many SELECT $1::TEXT[] ` func (q *Queries) SelectTextArray(ctx context.Context, dollar_1 []string) ([][]string, error) { rows, err := q.db.QueryContext(ctx, selectTextArray, pq.Array(dollar_1)) if err != nil { return nil, err } defer rows.Close() var items [][]string for rows.Next() { var column_1 []string if err := rows.Scan(pq.Array(&column_1)); err != nil { return nil, err } items = append(items, column_1) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_text_array/stdlib/query.sql ================================================ -- name: SelectTextArray :many SELECT $1::TEXT[]; ================================================ FILE: internal/endtoend/testdata/select_text_array/stdlib/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/select_text_array/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_union/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_union/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { A sql.NullString B sql.NullString } type Foo struct { A sql.NullString B sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_union/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectExcept = `-- name: SelectExcept :many SELECT a, b FROM foo EXCEPT SELECT a, b FROM foo ` func (q *Queries) SelectExcept(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, selectExcept) 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 selectIntersect = `-- name: SelectIntersect :many SELECT a, b FROM foo INTERSECT SELECT a, b FROM foo ` func (q *Queries) SelectIntersect(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, selectIntersect) 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 selectUnion = `-- name: SelectUnion :many SELECT a, b FROM foo UNION SELECT a, b FROM foo ` func (q *Queries) SelectUnion(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, selectUnion) 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 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 SELECT a, b FROM bar ` func (q *Queries) SelectUnionOther(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, selectUnionOther) 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 selectUnionWithLimit = `-- name: SelectUnionWithLimit :many SELECT a, b FROM foo UNION SELECT a, b FROM foo LIMIT ? OFFSET ? ` type SelectUnionWithLimitParams struct { Limit int32 Offset int32 } func (q *Queries) SelectUnionWithLimit(ctx context.Context, arg SelectUnionWithLimitParams) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, selectUnionWithLimit, arg.Limit, arg.Offset) 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 } ================================================ FILE: internal/endtoend/testdata/select_union/mysql/query.sql ================================================ -- name: SelectUnion :many SELECT * FROM foo UNION SELECT * FROM foo; -- name: SelectUnionWithLimit :many SELECT * FROM foo UNION SELECT * FROM foo LIMIT ? OFFSET ?; -- name: SelectExcept :many SELECT * FROM foo EXCEPT SELECT * FROM foo; -- name: SelectIntersect :many SELECT * FROM foo INTERSECT SELECT * FROM foo; -- name: SelectUnionOther :many SELECT * FROM foo UNION SELECT * FROM bar; -- name: SelectUnionAliased :many (SELECT * FROM foo) UNION SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/select_union/mysql/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (a text, b text); ================================================ FILE: internal/endtoend/testdata/select_union/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_union/postgres/pgx/v4/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/select_union/postgres/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_union/postgres/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { A sql.NullString B sql.NullString } type Foo struct { A sql.NullString B sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_union/postgres/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectExcept = `-- name: SelectExcept :many SELECT a, b FROM foo EXCEPT SELECT a, b FROM foo ` func (q *Queries) SelectExcept(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, selectExcept) 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 selectIntersect = `-- name: SelectIntersect :many SELECT a, b FROM foo INTERSECT SELECT a, b FROM foo ` func (q *Queries) SelectIntersect(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, selectIntersect) 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 selectUnion = `-- name: SelectUnion :many SELECT a, b FROM foo UNION SELECT a, b FROM foo ` func (q *Queries) SelectUnion(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, selectUnion) 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 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 SELECT a, b FROM bar ` func (q *Queries) SelectUnionOther(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, selectUnionOther) 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 selectUnionWithLimit = `-- name: SelectUnionWithLimit :many SELECT a, b FROM foo UNION SELECT a, b FROM foo LIMIT $1 OFFSET $2 ` type SelectUnionWithLimitParams struct { Limit int32 Offset int32 } func (q *Queries) SelectUnionWithLimit(ctx context.Context, arg SelectUnionWithLimitParams) ([]Foo, error) { rows, err := q.db.Query(ctx, selectUnionWithLimit, arg.Limit, arg.Offset) 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 } ================================================ FILE: internal/endtoend/testdata/select_union/postgres/pgx/v4/query.sql ================================================ -- name: SelectUnion :many SELECT * FROM foo UNION SELECT * FROM foo; -- name: SelectUnionWithLimit :many SELECT * FROM foo UNION SELECT * FROM foo LIMIT $1 OFFSET $2; -- name: SelectExcept :many SELECT * FROM foo EXCEPT SELECT * FROM foo; -- name: SelectIntersect :many SELECT * FROM foo INTERSECT SELECT * FROM foo; -- name: SelectUnionOther :many SELECT * FROM foo UNION SELECT * FROM bar; -- name: SelectUnionAliased :many (SELECT * FROM foo) UNION SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/select_union/postgres/pgx/v4/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (a text, b text); ================================================ FILE: internal/endtoend/testdata/select_union/postgres/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_union/postgres/pgx/v5/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/select_union/postgres/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_union/postgres/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Bar struct { A pgtype.Text B pgtype.Text } type Foo struct { A pgtype.Text B pgtype.Text } ================================================ FILE: internal/endtoend/testdata/select_union/postgres/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectExcept = `-- name: SelectExcept :many SELECT a, b FROM foo EXCEPT SELECT a, b FROM foo ` func (q *Queries) SelectExcept(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, selectExcept) 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 selectIntersect = `-- name: SelectIntersect :many SELECT a, b FROM foo INTERSECT SELECT a, b FROM foo ` func (q *Queries) SelectIntersect(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, selectIntersect) 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 selectUnion = `-- name: SelectUnion :many SELECT a, b FROM foo UNION SELECT a, b FROM foo ` func (q *Queries) SelectUnion(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, selectUnion) 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 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 SELECT a, b FROM bar ` func (q *Queries) SelectUnionOther(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, selectUnionOther) 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 selectUnionWithLimit = `-- name: SelectUnionWithLimit :many SELECT a, b FROM foo UNION SELECT a, b FROM foo LIMIT $1 OFFSET $2 ` type SelectUnionWithLimitParams struct { Limit int32 Offset int32 } func (q *Queries) SelectUnionWithLimit(ctx context.Context, arg SelectUnionWithLimitParams) ([]Foo, error) { rows, err := q.db.Query(ctx, selectUnionWithLimit, arg.Limit, arg.Offset) 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 } ================================================ FILE: internal/endtoend/testdata/select_union/postgres/pgx/v5/query.sql ================================================ -- name: SelectUnion :many SELECT * FROM foo UNION SELECT * FROM foo; -- name: SelectUnionWithLimit :many SELECT * FROM foo UNION SELECT * FROM foo LIMIT $1 OFFSET $2; -- name: SelectExcept :many SELECT * FROM foo EXCEPT SELECT * FROM foo; -- name: SelectIntersect :many SELECT * FROM foo INTERSECT SELECT * FROM foo; -- name: SelectUnionOther :many SELECT * FROM foo UNION SELECT * FROM bar; -- name: SelectUnionAliased :many (SELECT * FROM foo) UNION SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/select_union/postgres/pgx/v5/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (a text, b text); ================================================ FILE: internal/endtoend/testdata/select_union/postgres/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_union/postgres/stdlib/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/select_union/postgres/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_union/postgres/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { A sql.NullString B sql.NullString } type Foo struct { A sql.NullString B sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_union/postgres/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectExcept = `-- name: SelectExcept :many SELECT a, b FROM foo EXCEPT SELECT a, b FROM foo ` func (q *Queries) SelectExcept(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, selectExcept) 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 selectIntersect = `-- name: SelectIntersect :many SELECT a, b FROM foo INTERSECT SELECT a, b FROM foo ` func (q *Queries) SelectIntersect(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, selectIntersect) 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 selectUnion = `-- name: SelectUnion :many SELECT a, b FROM foo UNION SELECT a, b FROM foo ` func (q *Queries) SelectUnion(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, selectUnion) 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 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 SELECT a, b FROM bar ` func (q *Queries) SelectUnionOther(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, selectUnionOther) 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 selectUnionWithLimit = `-- name: SelectUnionWithLimit :many SELECT a, b FROM foo UNION SELECT a, b FROM foo LIMIT $1 OFFSET $2 ` type SelectUnionWithLimitParams struct { Limit int32 Offset int32 } func (q *Queries) SelectUnionWithLimit(ctx context.Context, arg SelectUnionWithLimitParams) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, selectUnionWithLimit, arg.Limit, arg.Offset) 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 } ================================================ FILE: internal/endtoend/testdata/select_union/postgres/stdlib/query.sql ================================================ -- name: SelectUnion :many SELECT * FROM foo UNION SELECT * FROM foo; -- name: SelectUnionWithLimit :many SELECT * FROM foo UNION SELECT * FROM foo LIMIT $1 OFFSET $2; -- name: SelectExcept :many SELECT * FROM foo EXCEPT SELECT * FROM foo; -- name: SelectIntersect :many SELECT * FROM foo INTERSECT SELECT * FROM foo; -- name: SelectUnionOther :many SELECT * FROM foo UNION SELECT * FROM bar; -- name: SelectUnionAliased :many (SELECT * FROM foo) UNION SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/select_union/postgres/stdlib/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (a text, b text); ================================================ FILE: internal/endtoend/testdata/select_union/postgres/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_union/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_union/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { A sql.NullString B sql.NullString } type Foo struct { A sql.NullString B sql.NullString } ================================================ FILE: internal/endtoend/testdata/select_union/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectExcept = `-- name: SelectExcept :many SELECT a, b FROM foo EXCEPT SELECT a, b FROM foo ` func (q *Queries) SelectExcept(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, selectExcept) 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 selectIntersect = `-- name: SelectIntersect :many SELECT a, b FROM foo INTERSECT SELECT a, b FROM foo ` func (q *Queries) SelectIntersect(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, selectIntersect) 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 selectUnion = `-- name: SelectUnion :many SELECT a, b FROM foo UNION SELECT a, b FROM foo ` func (q *Queries) SelectUnion(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, selectUnion) 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 SELECT a, b FROM bar ` func (q *Queries) SelectUnionOther(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, selectUnionOther) 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 selectUnionWithLimit = `-- name: SelectUnionWithLimit :many SELECT a, b FROM foo UNION SELECT a, b FROM foo LIMIT ? OFFSET ? ` type SelectUnionWithLimitParams struct { Limit int64 Offset int64 } func (q *Queries) SelectUnionWithLimit(ctx context.Context, arg SelectUnionWithLimitParams) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, selectUnionWithLimit, arg.Limit, arg.Offset) 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 } ================================================ FILE: internal/endtoend/testdata/select_union/sqlite/query.sql ================================================ -- name: SelectUnion :many SELECT * FROM foo UNION SELECT * FROM foo; -- name: SelectUnionWithLimit :many SELECT * FROM foo UNION SELECT * FROM foo LIMIT ? OFFSET ?; -- name: SelectExcept :many SELECT * FROM foo EXCEPT SELECT * FROM foo; -- name: SelectIntersect :many SELECT * FROM foo INTERSECT SELECT * FROM foo; -- name: SelectUnionOther :many SELECT * FROM foo UNION SELECT * FROM bar; ================================================ FILE: internal/endtoend/testdata/select_union/sqlite/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (a text, b text); ================================================ FILE: internal/endtoend/testdata/select_union/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/select_union_subquery/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/2260 ================================================ FILE: internal/endtoend/testdata/select_union_subquery/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_union_subquery/mysql/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/select_union_subquery/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const testSubqueryUnion = `-- name: TestSubqueryUnion :many SELECT tmp.id, tmp.name, tmp.bio FROM ( SELECT id, name, bio FROM authors UNION SELECT id, name, bio FROM authors ) tmp LIMIT 5 ` func (q *Queries) TestSubqueryUnion(ctx context.Context) ([]Author, error) { rows, err := q.db.QueryContext(ctx, testSubqueryUnion) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_union_subquery/mysql/query.sql ================================================ -- name: TestSubqueryUnion :many SELECT tmp.* FROM ( SELECT * FROM authors UNION SELECT * FROM authors ) tmp LIMIT 5; ================================================ FILE: internal/endtoend/testdata/select_union_subquery/mysql/schema.sql ================================================ CREATE TABLE authors ( id int PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/select_union_subquery/mysql/sqlc.yaml ================================================ version: "2" sql: - engine: "mysql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" ================================================ FILE: internal/endtoend/testdata/select_union_subquery/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/select_union_subquery/postgresql/go/models.go ================================================ // 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 int32 Name string Bio pgtype.Text } ================================================ FILE: internal/endtoend/testdata/select_union_subquery/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const testSubqueryUnion = `-- name: TestSubqueryUnion :many SELECT tmp.id, tmp.name, tmp.bio FROM ( SELECT id, name, bio FROM authors UNION SELECT id, name, bio FROM authors ) tmp LIMIT 5 ` func (q *Queries) TestSubqueryUnion(ctx context.Context) ([]Author, error) { rows, err := q.db.Query(ctx, testSubqueryUnion) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/select_union_subquery/postgresql/query.sql ================================================ -- name: TestSubqueryUnion :many SELECT tmp.* FROM ( SELECT * FROM authors UNION SELECT * FROM authors ) tmp LIMIT 5; ================================================ FILE: internal/endtoend/testdata/select_union_subquery/postgresql/schema.sql ================================================ CREATE TABLE authors ( id int PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/select_union_subquery/postgresql/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/selectstatic/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/selectstatic/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/selectstatic/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const selectStatic = `-- name: SelectStatic :one SELECT 'a', 'b' AS b, 1 AS num, true AS truefield, 1.0 AS floater ` type SelectStaticRow struct { Column1 string B string Num int32 Truefield int32 Floater float64 } func (q *Queries) SelectStatic(ctx context.Context) (SelectStaticRow, error) { row := q.db.QueryRowContext(ctx, selectStatic) var i SelectStaticRow err := row.Scan( &i.Column1, &i.B, &i.Num, &i.Truefield, &i.Floater, ) return i, err } ================================================ FILE: internal/endtoend/testdata/selectstatic/mysql/query.sql ================================================ -- name: SelectStatic :one SELECT 'a', 'b' AS b, 1 AS num, true AS truefield, 1.0 AS floater ================================================ FILE: internal/endtoend/testdata/selectstatic/mysql/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/selectstatic/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "sql_package": "database/sql", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/show_warnings/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/show_warnings/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/show_warnings/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const showWarnings = `-- name: ShowWarnings :many SHOW WARNINGS ` type ShowWarningsRow struct { Level string Code int32 Message string } func (q *Queries) ShowWarnings(ctx context.Context) ([]ShowWarningsRow, error) { rows, err := q.db.QueryContext(ctx, showWarnings) if err != nil { return nil, err } defer rows.Close() var items []ShowWarningsRow for rows.Next() { var i ShowWarningsRow if err := rows.Scan(&i.Level, &i.Code, &i.Message); 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 } ================================================ FILE: internal/endtoend/testdata/show_warnings/mysql/query.sql ================================================ -- name: ShowWarnings :many SHOW WARNINGS; ================================================ FILE: internal/endtoend/testdata/show_warnings/mysql/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/show_warnings/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/mysql/go/models.go ================================================ // 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 User struct { Sub string } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAuthorByID = `-- name: GetAuthorByID :one SELECT id, name, bio FROM authors WHERE id = ? LIMIT 1 ` func (q *Queries) GetAuthorByID(ctx context.Context, id int64) (Author, error) { row := q.db.QueryRowContext(ctx, getAuthorByID, id) var i Author err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err } const getAuthorIDByID = `-- name: GetAuthorIDByID :one SELECT id FROM authors WHERE id = ? LIMIT 1 ` func (q *Queries) GetAuthorIDByID(ctx context.Context, id int64) (int64, error) { row := q.db.QueryRowContext(ctx, getAuthorIDByID, id) err := row.Scan(&id) return id, err } const getUser = `-- name: GetUser :one SELECT sub FROM users WHERE sub = ? LIMIT 1 ` func (q *Queries) GetUser(ctx context.Context, sub string) (string, error) { row := q.db.QueryRowContext(ctx, getUser, sub) err := row.Scan(&sub) return sub, err } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/mysql/query.sql ================================================ -- name: GetAuthorIDByID :one SELECT id FROM authors WHERE id = ? LIMIT 1; -- name: GetAuthorByID :one SELECT id, name, bio FROM authors WHERE id = ? LIMIT 1; -- name: GetUser :one SELECT sub FROM users WHERE sub = ? LIMIT 1; ================================================ FILE: internal/endtoend/testdata/single_param_conflict/mysql/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id BIGINT PRIMARY KEY, name TEXT NOT NULL, bio text ); -- https://github.com/sqlc-dev/sqlc/issues/1290 CREATE TABLE users ( sub VARCHAR(10) PRIMARY KEY ); ================================================ FILE: internal/endtoend/testdata/single_param_conflict/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "github.com/google/uuid" ) type Author struct { ID int64 Name string Bio sql.NullString } type User struct { Sub uuid.UUID } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/google/uuid" ) const getAuthorByID = `-- name: GetAuthorByID :one SELECT id, name, bio FROM authors WHERE id = $1 LIMIT 1 ` func (q *Queries) GetAuthorByID(ctx context.Context, id int64) (Author, error) { row := q.db.QueryRow(ctx, getAuthorByID, id) var i Author err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err } const getAuthorIDByID = `-- name: GetAuthorIDByID :one SELECT id FROM authors WHERE id = $1 LIMIT 1 ` func (q *Queries) GetAuthorIDByID(ctx context.Context, id int64) (int64, error) { row := q.db.QueryRow(ctx, getAuthorIDByID, id) err := row.Scan(&id) return id, err } const getUser = `-- name: GetUser :one SELECT sub FROM users WHERE sub = $1 LIMIT 1 ` func (q *Queries) GetUser(ctx context.Context, sub uuid.UUID) (uuid.UUID, error) { row := q.db.QueryRow(ctx, getUser, sub) err := row.Scan(&sub) return sub, err } const setDefaultName = `-- name: SetDefaultName :one UPDATE authors SET name = 'Default Name' WHERE id = $1 RETURNING id ` // https://github.com/sqlc-dev/sqlc/issues/1235 func (q *Queries) SetDefaultName(ctx context.Context, id int64) (int64, error) { row := q.db.QueryRow(ctx, setDefaultName, id) err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/query.sql ================================================ -- name: GetAuthorIDByID :one SELECT id FROM authors WHERE id = $1 LIMIT 1; -- name: GetAuthorByID :one SELECT id, name, bio FROM authors WHERE id = $1 LIMIT 1; -- name: GetUser :one SELECT sub FROM users WHERE sub = $1 LIMIT 1; -- https://github.com/sqlc-dev/sqlc/issues/1235 -- name: SetDefaultName :one UPDATE authors SET name = 'Default Name' WHERE id = $1 RETURNING id; ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name TEXT NOT NULL, bio text ); -- https://github.com/sqlc-dev/sqlc/issues/1290 CREATE TABLE users ( sub UUID PRIMARY KEY ); ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "sql_package": "pgx/v4", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/models.go ================================================ // 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 User struct { Sub pgtype.UUID } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 getAuthorByID = `-- name: GetAuthorByID :one SELECT id, name, bio FROM authors WHERE id = $1 LIMIT 1 ` func (q *Queries) GetAuthorByID(ctx context.Context, id int64) (Author, error) { row := q.db.QueryRow(ctx, getAuthorByID, id) var i Author err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err } const getAuthorIDByID = `-- name: GetAuthorIDByID :one SELECT id FROM authors WHERE id = $1 LIMIT 1 ` func (q *Queries) GetAuthorIDByID(ctx context.Context, id int64) (int64, error) { row := q.db.QueryRow(ctx, getAuthorIDByID, id) err := row.Scan(&id) return id, err } const getUser = `-- name: GetUser :one SELECT sub FROM users WHERE sub = $1 LIMIT 1 ` func (q *Queries) GetUser(ctx context.Context, sub pgtype.UUID) (pgtype.UUID, error) { row := q.db.QueryRow(ctx, getUser, sub) err := row.Scan(&sub) return sub, err } const setDefaultName = `-- name: SetDefaultName :one UPDATE authors SET name = 'Default Name' WHERE id = $1 RETURNING id ` // https://github.com/sqlc-dev/sqlc/issues/1235 func (q *Queries) SetDefaultName(ctx context.Context, id int64) (int64, error) { row := q.db.QueryRow(ctx, setDefaultName, id) err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/query.sql ================================================ -- name: GetAuthorIDByID :one SELECT id FROM authors WHERE id = $1 LIMIT 1; -- name: GetAuthorByID :one SELECT id, name, bio FROM authors WHERE id = $1 LIMIT 1; -- name: GetUser :one SELECT sub FROM users WHERE sub = $1 LIMIT 1; -- https://github.com/sqlc-dev/sqlc/issues/1235 -- name: SetDefaultName :one UPDATE authors SET name = 'Default Name' WHERE id = $1 RETURNING id; ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name TEXT NOT NULL, bio text ); -- https://github.com/sqlc-dev/sqlc/issues/1290 CREATE TABLE users ( sub UUID PRIMARY KEY ); ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "sql_package": "pgx/v5", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "github.com/google/uuid" ) type Author struct { ID int64 Name string Bio sql.NullString } type User struct { Sub uuid.UUID } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/google/uuid" ) const getAuthorByID = `-- name: GetAuthorByID :one SELECT id, name, bio FROM authors WHERE id = $1 LIMIT 1 ` func (q *Queries) GetAuthorByID(ctx context.Context, id int64) (Author, error) { row := q.db.QueryRowContext(ctx, getAuthorByID, id) var i Author err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err } const getAuthorIDByID = `-- name: GetAuthorIDByID :one SELECT id FROM authors WHERE id = $1 LIMIT 1 ` func (q *Queries) GetAuthorIDByID(ctx context.Context, id int64) (int64, error) { row := q.db.QueryRowContext(ctx, getAuthorIDByID, id) err := row.Scan(&id) return id, err } const getUser = `-- name: GetUser :one SELECT sub FROM users WHERE sub = $1 LIMIT 1 ` func (q *Queries) GetUser(ctx context.Context, sub uuid.UUID) (uuid.UUID, error) { row := q.db.QueryRowContext(ctx, getUser, sub) err := row.Scan(&sub) return sub, err } const setDefaultName = `-- name: SetDefaultName :one UPDATE authors SET name = 'Default Name' WHERE id = $1 RETURNING id ` // https://github.com/sqlc-dev/sqlc/issues/1235 func (q *Queries) SetDefaultName(ctx context.Context, id int64) (int64, error) { row := q.db.QueryRowContext(ctx, setDefaultName, id) err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/query.sql ================================================ -- name: GetAuthorIDByID :one SELECT id FROM authors WHERE id = $1 LIMIT 1; -- name: GetAuthorByID :one SELECT id, name, bio FROM authors WHERE id = $1 LIMIT 1; -- name: GetUser :one SELECT sub FROM users WHERE sub = $1 LIMIT 1; -- https://github.com/sqlc-dev/sqlc/issues/1235 -- name: SetDefaultName :one UPDATE authors SET name = 'Default Name' WHERE id = $1 RETURNING id; ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name TEXT NOT NULL, bio text ); -- https://github.com/sqlc-dev/sqlc/issues/1290 CREATE TABLE users ( sub UUID PRIMARY KEY ); ================================================ FILE: internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/sqlite/go/models.go ================================================ // 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 User struct { Sub string } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAuthorByID = `-- name: GetAuthorByID :one SELECT id, name, bio FROM authors WHERE id = ? LIMIT 1 ` func (q *Queries) GetAuthorByID(ctx context.Context, id int64) (Author, error) { row := q.db.QueryRowContext(ctx, getAuthorByID, id) var i Author err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err } const getAuthorIDByID = `-- name: GetAuthorIDByID :one SELECT id FROM authors WHERE id = ? LIMIT 1 ` func (q *Queries) GetAuthorIDByID(ctx context.Context, id int64) (int64, error) { row := q.db.QueryRowContext(ctx, getAuthorIDByID, id) err := row.Scan(&id) return id, err } const getUser = `-- name: GetUser :one SELECT sub FROM users WHERE sub = ? LIMIT 1 ` func (q *Queries) GetUser(ctx context.Context, sub string) (string, error) { row := q.db.QueryRowContext(ctx, getUser, sub) err := row.Scan(&sub) return sub, err } ================================================ FILE: internal/endtoend/testdata/single_param_conflict/sqlite/query.sql ================================================ -- name: GetAuthorIDByID :one SELECT id FROM authors WHERE id = ? LIMIT 1; -- name: GetAuthorByID :one SELECT id, name, bio FROM authors WHERE id = ? LIMIT 1; -- name: GetUser :one SELECT sub FROM users WHERE sub = ? LIMIT 1; ================================================ FILE: internal/endtoend/testdata/single_param_conflict/sqlite/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE authors ( id BIGINT PRIMARY KEY, name TEXT NOT NULL, bio text ); -- https://github.com/sqlc-dev/sqlc/issues/1290 CREATE TABLE users ( sub TEXT PRIMARY KEY ); ================================================ FILE: internal/endtoend/testdata/single_param_conflict/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const mixedNotation = `-- name: MixedNotation :one SELECT concat_lower_or_upper('Hello', 'World', uppercase => true) ` func (q *Queries) MixedNotation(ctx context.Context) (string, error) { row := q.db.QueryRow(ctx, mixedNotation) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } const namedAnyOrder = `-- name: NamedAnyOrder :one SELECT concat_lower_or_upper(a => 'Hello', b => 'World', uppercase => true) ` func (q *Queries) NamedAnyOrder(ctx context.Context) (string, error) { row := q.db.QueryRow(ctx, namedAnyOrder) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } const namedNotation = `-- name: NamedNotation :one SELECT concat_lower_or_upper(a => 'Hello', b => 'World') ` func (q *Queries) NamedNotation(ctx context.Context) (string, error) { row := q.db.QueryRow(ctx, namedNotation) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } const namedOtherOrder = `-- name: NamedOtherOrder :one SELECT concat_lower_or_upper(a => 'Hello', uppercase => true, b => 'World') ` func (q *Queries) NamedOtherOrder(ctx context.Context) (string, error) { row := q.db.QueryRow(ctx, namedOtherOrder) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } const positionalNoDefaault = `-- name: PositionalNoDefaault :one SELECT concat_lower_or_upper('Hello', 'World') ` func (q *Queries) PositionalNoDefaault(ctx context.Context) (string, error) { row := q.db.QueryRow(ctx, positionalNoDefaault) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } const positionalNotation = `-- name: PositionalNotation :one SELECT concat_lower_or_upper('Hello', 'World', true) ` func (q *Queries) PositionalNotation(ctx context.Context) (string, error) { row := q.db.QueryRow(ctx, positionalNotation) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/query.sql ================================================ -- name: PositionalNotation :one SELECT concat_lower_or_upper('Hello', 'World', true); -- name: PositionalNoDefaault :one SELECT concat_lower_or_upper('Hello', 'World'); -- name: NamedNotation :one SELECT concat_lower_or_upper(a => 'Hello', b => 'World'); -- name: NamedAnyOrder :one SELECT concat_lower_or_upper(a => 'Hello', b => 'World', uppercase => true); -- name: NamedOtherOrder :one SELECT concat_lower_or_upper(a => 'Hello', uppercase => true, b => 'World'); -- name: MixedNotation :one SELECT concat_lower_or_upper('Hello', 'World', uppercase => true); ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/schema.sql ================================================ -- https://www.postgresql.org/docs/current/sql-syntax-calling-funcs.html CREATE FUNCTION concat_lower_or_upper(a text, b text, uppercase boolean DEFAULT false) RETURNS text AS $$ SELECT CASE WHEN $3 THEN UPPER($1 || ' ' || $2) ELSE LOWER($1 || ' ' || $2) END; $$ LANGUAGE SQL IMMUTABLE STRICT; ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const mixedNotation = `-- name: MixedNotation :one SELECT concat_lower_or_upper('Hello', 'World', uppercase => true) ` func (q *Queries) MixedNotation(ctx context.Context) (string, error) { row := q.db.QueryRow(ctx, mixedNotation) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } const namedAnyOrder = `-- name: NamedAnyOrder :one SELECT concat_lower_or_upper(a => 'Hello', b => 'World', uppercase => true) ` func (q *Queries) NamedAnyOrder(ctx context.Context) (string, error) { row := q.db.QueryRow(ctx, namedAnyOrder) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } const namedNotation = `-- name: NamedNotation :one SELECT concat_lower_or_upper(a => 'Hello', b => 'World') ` func (q *Queries) NamedNotation(ctx context.Context) (string, error) { row := q.db.QueryRow(ctx, namedNotation) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } const namedOtherOrder = `-- name: NamedOtherOrder :one SELECT concat_lower_or_upper(a => 'Hello', uppercase => true, b => 'World') ` func (q *Queries) NamedOtherOrder(ctx context.Context) (string, error) { row := q.db.QueryRow(ctx, namedOtherOrder) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } const positionalNoDefaault = `-- name: PositionalNoDefaault :one SELECT concat_lower_or_upper('Hello', 'World') ` func (q *Queries) PositionalNoDefaault(ctx context.Context) (string, error) { row := q.db.QueryRow(ctx, positionalNoDefaault) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } const positionalNotation = `-- name: PositionalNotation :one SELECT concat_lower_or_upper('Hello', 'World', true) ` func (q *Queries) PositionalNotation(ctx context.Context) (string, error) { row := q.db.QueryRow(ctx, positionalNotation) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/query.sql ================================================ -- name: PositionalNotation :one SELECT concat_lower_or_upper('Hello', 'World', true); -- name: PositionalNoDefaault :one SELECT concat_lower_or_upper('Hello', 'World'); -- name: NamedNotation :one SELECT concat_lower_or_upper(a => 'Hello', b => 'World'); -- name: NamedAnyOrder :one SELECT concat_lower_or_upper(a => 'Hello', b => 'World', uppercase => true); -- name: NamedOtherOrder :one SELECT concat_lower_or_upper(a => 'Hello', uppercase => true, b => 'World'); -- name: MixedNotation :one SELECT concat_lower_or_upper('Hello', 'World', uppercase => true); ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/schema.sql ================================================ -- https://www.postgresql.org/docs/current/sql-syntax-calling-funcs.html CREATE FUNCTION concat_lower_or_upper(a text, b text, uppercase boolean DEFAULT false) RETURNS text AS $$ SELECT CASE WHEN $3 THEN UPPER($1 || ' ' || $2) ELSE LOWER($1 || ' ' || $2) END; $$ LANGUAGE SQL IMMUTABLE STRICT; ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const mixedNotation = `-- name: MixedNotation :one SELECT concat_lower_or_upper('Hello', 'World', uppercase => true) ` func (q *Queries) MixedNotation(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, mixedNotation) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } const namedAnyOrder = `-- name: NamedAnyOrder :one SELECT concat_lower_or_upper(a => 'Hello', b => 'World', uppercase => true) ` func (q *Queries) NamedAnyOrder(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, namedAnyOrder) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } const namedNotation = `-- name: NamedNotation :one SELECT concat_lower_or_upper(a => 'Hello', b => 'World') ` func (q *Queries) NamedNotation(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, namedNotation) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } const namedOtherOrder = `-- name: NamedOtherOrder :one SELECT concat_lower_or_upper(a => 'Hello', uppercase => true, b => 'World') ` func (q *Queries) NamedOtherOrder(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, namedOtherOrder) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } const positionalNoDefaault = `-- name: PositionalNoDefaault :one SELECT concat_lower_or_upper('Hello', 'World') ` func (q *Queries) PositionalNoDefaault(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, positionalNoDefaault) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } const positionalNotation = `-- name: PositionalNotation :one SELECT concat_lower_or_upper('Hello', 'World', true) ` func (q *Queries) PositionalNotation(ctx context.Context) (string, error) { row := q.db.QueryRowContext(ctx, positionalNotation) var concat_lower_or_upper string err := row.Scan(&concat_lower_or_upper) return concat_lower_or_upper, err } ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/query.sql ================================================ -- name: PositionalNotation :one SELECT concat_lower_or_upper('Hello', 'World', true); -- name: PositionalNoDefaault :one SELECT concat_lower_or_upper('Hello', 'World'); -- name: NamedNotation :one SELECT concat_lower_or_upper(a => 'Hello', b => 'World'); -- name: NamedAnyOrder :one SELECT concat_lower_or_upper(a => 'Hello', b => 'World', uppercase => true); -- name: NamedOtherOrder :one SELECT concat_lower_or_upper(a => 'Hello', uppercase => true, b => 'World'); -- name: MixedNotation :one SELECT concat_lower_or_upper('Hello', 'World', uppercase => true); ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/schema.sql ================================================ -- https://www.postgresql.org/docs/current/sql-syntax-calling-funcs.html CREATE FUNCTION concat_lower_or_upper(a text, b text, uppercase boolean DEFAULT false) RETURNS text AS $$ SELECT CASE WHEN $3 THEN UPPER($1 || ' ' || $2) ELSE LOWER($1 || ' ' || $2) END; $$ LANGUAGE SQL IMMUTABLE STRICT; ================================================ FILE: internal/endtoend/testdata/sql_syntax_calling_funcs/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const complicated = `-- name: Complicated :many WITH names AS (SELECT name from foo WHERE foo.name = ?) SELECT name FROM names WHERE name IN (SELECT name FROM foo WHERE foo.name = ?) ` type ComplicatedParams struct { Slug string } func (q *Queries) Complicated(ctx context.Context, arg ComplicatedParams) ([]string, error) { rows, err := q.db.QueryContext(ctx, complicated, arg.Slug, arg.Slug) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParamIdent = `-- name: FuncParamIdent :many SELECT name FROM foo WHERE name = ? ` func (q *Queries) FuncParamIdent(ctx context.Context, slug string) ([]string, error) { rows, err := q.db.QueryContext(ctx, funcParamIdent, slug) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParamString = `-- name: FuncParamString :many SELECT name FROM foo WHERE name = ? ` func (q *Queries) FuncParamString(ctx context.Context, slug string) ([]string, error) { rows, err := q.db.QueryContext(ctx, funcParamString, slug) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/mysql/query.sql ================================================ /* name: FuncParamIdent :many */ SELECT name FROM foo WHERE name = sqlc.arg(slug); /* name: FuncParamString :many */ SELECT name FROM foo WHERE name = sqlc.arg('slug'); /* name: Complicated :many */ WITH names AS (SELECT name from foo WHERE foo.name = sqlc.arg('slug')) SELECT name FROM names WHERE name IN (SELECT name FROM foo WHERE foo.name = sqlc.arg('slug')); ================================================ FILE: internal/endtoend/testdata/sqlc_arg/mysql/schema.sql ================================================ CREATE TABLE foo (name text not null); ================================================ FILE: internal/endtoend/testdata/sqlc_arg/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const funcParamIdent = `-- name: FuncParamIdent :many SELECT name FROM foo WHERE name = $1 ` func (q *Queries) FuncParamIdent(ctx context.Context, slug string) ([]string, error) { rows, err := q.db.Query(ctx, funcParamIdent, slug) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParamString = `-- name: FuncParamString :many SELECT name FROM foo WHERE name = $1 ` func (q *Queries) FuncParamString(ctx context.Context, slug string) ([]string, error) { rows, err := q.db.Query(ctx, funcParamString, slug) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/query.sql ================================================ -- name: FuncParamIdent :many SELECT name FROM foo WHERE name = sqlc.arg(slug); -- name: FuncParamString :many SELECT name FROM foo WHERE name = sqlc.arg('slug'); ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (name text not null); ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const funcParamIdent = `-- name: FuncParamIdent :many SELECT name FROM foo WHERE name = $1 ` func (q *Queries) FuncParamIdent(ctx context.Context, slug string) ([]string, error) { rows, err := q.db.Query(ctx, funcParamIdent, slug) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParamString = `-- name: FuncParamString :many SELECT name FROM foo WHERE name = $1 ` func (q *Queries) FuncParamString(ctx context.Context, slug string) ([]string, error) { rows, err := q.db.Query(ctx, funcParamString, slug) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/query.sql ================================================ -- name: FuncParamIdent :many SELECT name FROM foo WHERE name = sqlc.arg(slug); -- name: FuncParamString :many SELECT name FROM foo WHERE name = sqlc.arg('slug'); ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (name text not null); ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const funcParamIdent = `-- name: FuncParamIdent :many SELECT name FROM foo WHERE name = $1 ` func (q *Queries) FuncParamIdent(ctx context.Context, slug string) ([]string, error) { rows, err := q.db.QueryContext(ctx, funcParamIdent, slug) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParamString = `-- name: FuncParamString :many SELECT name FROM foo WHERE name = $1 ` func (q *Queries) FuncParamString(ctx context.Context, slug string) ([]string, error) { rows, err := q.db.QueryContext(ctx, funcParamString, slug) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/query.sql ================================================ -- name: FuncParamIdent :many SELECT name FROM foo WHERE name = sqlc.arg(slug); -- name: FuncParamString :many SELECT name FROM foo WHERE name = sqlc.arg('slug'); ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (name text not null); ================================================ FILE: internal/endtoend/testdata/sqlc_arg/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const funcParamIdent = `-- name: FuncParamIdent :many SELECT name FROM foo WHERE name = ?1 ` func (q *Queries) FuncParamIdent(ctx context.Context, slug string) ([]string, error) { rows, err := q.db.QueryContext(ctx, funcParamIdent, slug) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParamString = `-- name: FuncParamString :many SELECT name FROM foo WHERE name = ?1 ` func (q *Queries) FuncParamString(ctx context.Context, slug string) ([]string, error) { rows, err := q.db.QueryContext(ctx, funcParamString, slug) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/sqlc_arg/sqlite/query.sql ================================================ /* name: FuncParamIdent :many */ SELECT name FROM foo WHERE name = sqlc.arg(slug); /* name: FuncParamString :many */ SELECT name FROM foo WHERE name = sqlc.arg('slug'); ================================================ FILE: internal/endtoend/testdata/sqlc_arg/sqlite/schema.sql ================================================ CREATE TABLE foo (name text not null); ================================================ FILE: internal/endtoend/testdata/sqlc_arg/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_arg_invalid/mysql/query.sql ================================================ -- name: WrongFunc :one select id, first_name from users where id = sqlc.argh(target_id); -- name: TooManyArgs :one select id, first_name from users where id = sqlc.arg('foo', 'bar'); -- name: TooFewArgs :one select id, first_name from users where id = sqlc.arg(); -- name: InvalidArgFunc :one select id, first_name from users where id = sqlc.arg(sqlc.arg(target_id)); -- name: InvalidArgPlaceholder :one select id, first_name from users where id = sqlc.arg(?); ================================================ FILE: internal/endtoend/testdata/sqlc_arg_invalid/mysql/schema.sql ================================================ CREATE TABLE users ( id serial, first_name text not null ); ================================================ FILE: internal/endtoend/testdata/sqlc_arg_invalid/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "mysql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_arg_invalid/mysql/stderr.txt ================================================ # package querytest 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 ================================================ FILE: internal/endtoend/testdata/sqlc_arg_invalid/postgresql/query.sql ================================================ -- name: WrongFunc :one select id, first_name from users where id = sqlc.argh(target_id); -- name: TooManyArgs :one select id, first_name from users where id = sqlc.arg('foo', 'bar'); -- name: TooFewArgs :one select id, first_name from users where id = sqlc.arg(); -- name: InvalidArgFunc :one select id, first_name from users where id = sqlc.arg(sqlc.arg(target_id)); -- name: InvalidArgPlaceholder :one select id, first_name from users where id = sqlc.arg($1); ================================================ FILE: internal/endtoend/testdata/sqlc_arg_invalid/postgresql/schema.sql ================================================ CREATE TABLE users ( id serial, first_name text not null ); ================================================ FILE: internal/endtoend/testdata/sqlc_arg_invalid/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_arg_invalid/postgresql/stderr.txt ================================================ # package querytest 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 ================================================ FILE: internal/endtoend/testdata/sqlc_arg_invalid/sqlite/query.sql ================================================ 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); -- name: TooManyArgs :one select id, first_name from users where id = sqlc.arg('foo', 'bar'); -- name: TooFewArgs :one select id, first_name from users where id = sqlc.arg(); -- name: InvalidArgFunc :one select id, first_name from users where id = sqlc.arg(sqlc.arg(target_id)); -- name: InvalidArgPlaceholder :one select id, first_name from users where id = sqlc.arg(?); ================================================ FILE: internal/endtoend/testdata/sqlc_arg_invalid/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "query.sql", "queries": "query.sql", "engine": "sqlite" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_arg_invalid/sqlite/stderr.txt ================================================ # 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 ================================================ FILE: internal/endtoend/testdata/sqlc_embed/mysql/exec.json ================================================ { "contexts": ["base"], "meta": { "invalid_schema": true } } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type BazUser struct { ID int32 Name string } type Post struct { ID int32 UserID int32 } type User struct { ID int32 Name string Age sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const duplicate = `-- name: Duplicate :one SELECT users.id, users.name, users.age, users.id, users.name, users.age FROM users ` type DuplicateRow struct { User User User_2 User } func (q *Queries) Duplicate(ctx context.Context) (DuplicateRow, error) { row := q.db.QueryRowContext(ctx, duplicate) var i DuplicateRow err := row.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.User_2.ID, &i.User_2.Name, &i.User_2.Age, ) return i, err } const join = `-- name: Join :one SELECT users.id, users.name, users.age, posts.id, posts.user_id FROM posts INNER JOIN users ON posts.user_id = users.id ` type JoinRow struct { User User Post Post } func (q *Queries) Join(ctx context.Context) (JoinRow, error) { row := q.db.QueryRowContext(ctx, join) var i JoinRow err := row.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.Post.ID, &i.Post.UserID, ) return i, err } const only = `-- name: Only :one SELECT users.id, users.name, users.age FROM users ` type OnlyRow struct { User User } func (q *Queries) Only(ctx context.Context) (OnlyRow, error) { row := q.db.QueryRowContext(ctx, only) var i OnlyRow err := row.Scan(&i.User.ID, &i.User.Name, &i.User.Age) return i, err } const withAlias = `-- name: WithAlias :one SELECT u.id, u.name, u.age FROM users u ` type WithAliasRow struct { User User } func (q *Queries) WithAlias(ctx context.Context) (WithAliasRow, error) { row := q.db.QueryRowContext(ctx, withAlias) var i WithAliasRow err := row.Scan(&i.User.ID, &i.User.Name, &i.User.Age) return i, err } const withAsterisk = `-- name: WithAsterisk :one SELECT users.id, users.name, users.age, id, name, age FROM users ` type WithAsteriskRow struct { User User ID int32 Name string Age sql.NullInt32 } func (q *Queries) WithAsterisk(ctx context.Context) (WithAsteriskRow, error) { row := q.db.QueryRowContext(ctx, withAsterisk) var i WithAsteriskRow err := row.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.ID, &i.Name, &i.Age, ) return i, err } const withCrossSchema = `-- name: WithCrossSchema :many SELECT users.id, users.name, users.age, bu.id, bu.name FROM users INNER JOIN baz.users bu ON users.id = bu.id ` type WithCrossSchemaRow struct { User User BazUser BazUser } func (q *Queries) WithCrossSchema(ctx context.Context) ([]WithCrossSchemaRow, error) { rows, err := q.db.QueryContext(ctx, withCrossSchema) if err != nil { return nil, err } defer rows.Close() var items []WithCrossSchemaRow for rows.Next() { var i WithCrossSchemaRow if err := rows.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.BazUser.ID, &i.BazUser.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 } const withSchema = `-- name: WithSchema :one SELECT bu.id, bu.name FROM baz.users bu ` type WithSchemaRow struct { BazUser BazUser } func (q *Queries) WithSchema(ctx context.Context) (WithSchemaRow, error) { row := q.db.QueryRowContext(ctx, withSchema) var i WithSchemaRow err := row.Scan(&i.BazUser.ID, &i.BazUser.Name) return i, err } const withSubquery = `-- name: WithSubquery :many SELECT users.id, users.name, users.age, (SELECT count(*) FROM users) AS total_count FROM users ` type WithSubqueryRow struct { User User TotalCount int64 } func (q *Queries) WithSubquery(ctx context.Context) ([]WithSubqueryRow, error) { rows, err := q.db.QueryContext(ctx, withSubquery) if err != nil { return nil, err } defer rows.Close() var items []WithSubqueryRow for rows.Next() { var i WithSubqueryRow if err := rows.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.TotalCount, ); 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 } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/mysql/query.sql ================================================ -- name: Only :one SELECT sqlc.embed(users) FROM users; -- name: WithAlias :one SELECT sqlc.embed(u) FROM users u; -- name: WithSubquery :many SELECT sqlc.embed(users), (SELECT count(*) FROM users) AS total_count FROM users; -- name: WithAsterisk :one SELECT sqlc.embed(users), * FROM users; -- name: Duplicate :one SELECT sqlc.embed(users), sqlc.embed(users) FROM users; -- name: Join :one SELECT sqlc.embed(users), sqlc.embed(posts) FROM posts INNER JOIN users ON posts.user_id = users.id; -- name: WithSchema :one SELECT sqlc.embed(bu) FROM baz.users bu; -- name: WithCrossSchema :many SELECT sqlc.embed(users), sqlc.embed(bu) FROM users INNER JOIN baz.users bu ON users.id = bu.id; ================================================ FILE: internal/endtoend/testdata/sqlc_embed/mysql/schema.sql ================================================ CREATE SCHEMA IF NOT EXISTS baz; CREATE TABLE users ( id integer NOT NULL PRIMARY KEY, name varchar(255) NOT NULL, age integer NULL ); CREATE TABLE posts ( id integer NOT NULL PRIMARY KEY, user_id integer NOT NULL ); CREATE TABLE baz.users ( id integer NOT NULL PRIMARY KEY, name varchar(255) NOT NULL ); ================================================ FILE: internal/endtoend/testdata/sqlc_embed/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type BazUser struct { ID int32 `db:"id" json:"id"` Name string `db:"name" json:"name"` } type Post struct { ID int32 `db:"id" json:"id"` UserID int32 `db:"user_id" json:"user_id"` } type User struct { ID int32 `db:"id" json:"id"` Name string `db:"name" json:"name"` Age sql.NullInt32 `db:"age" json:"age"` } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/postgresql/pgx/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const duplicate = `-- name: Duplicate :one SELECT users.id, users.name, users.age, users.id, users.name, users.age FROM users ` type DuplicateRow struct { User User `db:"user" json:"user"` User_2 User `db:"user_2" json:"user_2"` } func (q *Queries) Duplicate(ctx context.Context) (DuplicateRow, error) { row := q.db.QueryRow(ctx, duplicate) var i DuplicateRow err := row.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.User_2.ID, &i.User_2.Name, &i.User_2.Age, ) return i, err } const join = `-- name: Join :one SELECT users.id, users.name, users.age, posts.id, posts.user_id FROM posts INNER JOIN users ON posts.user_id = users.id ` type JoinRow struct { User User `db:"user" json:"user"` Post Post `db:"post" json:"post"` } func (q *Queries) Join(ctx context.Context) (JoinRow, error) { row := q.db.QueryRow(ctx, join) var i JoinRow err := row.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.Post.ID, &i.Post.UserID, ) return i, err } const only = `-- name: Only :one SELECT users.id, users.name, users.age FROM users ` type OnlyRow struct { User User `db:"user" json:"user"` } func (q *Queries) Only(ctx context.Context) (OnlyRow, error) { row := q.db.QueryRow(ctx, only) var i OnlyRow err := row.Scan(&i.User.ID, &i.User.Name, &i.User.Age) return i, err } const withAlias = `-- name: WithAlias :one SELECT u.id, u.name, u.age FROM users u ` type WithAliasRow struct { User User `db:"user" json:"user"` } func (q *Queries) WithAlias(ctx context.Context) (WithAliasRow, error) { row := q.db.QueryRow(ctx, withAlias) var i WithAliasRow err := row.Scan(&i.User.ID, &i.User.Name, &i.User.Age) return i, err } const withAsterisk = `-- name: WithAsterisk :one SELECT users.id, users.name, users.age, id, name, age FROM users ` type WithAsteriskRow struct { User User `db:"user" json:"user"` ID int32 `db:"id" json:"id"` Name string `db:"name" json:"name"` Age sql.NullInt32 `db:"age" json:"age"` } func (q *Queries) WithAsterisk(ctx context.Context) (WithAsteriskRow, error) { row := q.db.QueryRow(ctx, withAsterisk) var i WithAsteriskRow err := row.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.ID, &i.Name, &i.Age, ) return i, err } const withCrossSchema = `-- name: WithCrossSchema :many SELECT users.id, users.name, users.age, bu.id, bu.name FROM users INNER JOIN baz.users bu ON users.id = bu.id ` type WithCrossSchemaRow struct { User User `db:"user" json:"user"` BazUser BazUser `db:"baz_user" json:"baz_user"` } func (q *Queries) WithCrossSchema(ctx context.Context) ([]WithCrossSchemaRow, error) { rows, err := q.db.Query(ctx, withCrossSchema) if err != nil { return nil, err } defer rows.Close() var items []WithCrossSchemaRow for rows.Next() { var i WithCrossSchemaRow if err := rows.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.BazUser.ID, &i.BazUser.Name, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const withSchema = `-- name: WithSchema :one SELECT bu.id, bu.name FROM baz.users bu ` type WithSchemaRow struct { BazUser BazUser `db:"baz_user" json:"baz_user"` } func (q *Queries) WithSchema(ctx context.Context) (WithSchemaRow, error) { row := q.db.QueryRow(ctx, withSchema) var i WithSchemaRow err := row.Scan(&i.BazUser.ID, &i.BazUser.Name) return i, err } const withSubquery = `-- name: WithSubquery :many SELECT users.id, users.name, users.age, (SELECT count(*) FROM users) AS total_count FROM users ` type WithSubqueryRow struct { User User `db:"user" json:"user"` TotalCount int64 `db:"total_count" json:"total_count"` } func (q *Queries) WithSubquery(ctx context.Context) ([]WithSubqueryRow, error) { rows, err := q.db.Query(ctx, withSubquery) if err != nil { return nil, err } defer rows.Close() var items []WithSubqueryRow for rows.Next() { var i WithSubqueryRow if err := rows.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.TotalCount, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/postgresql/pgx/query.sql ================================================ -- name: Only :one SELECT sqlc.embed(users) FROM users; -- name: WithAlias :one SELECT sqlc.embed(u) FROM users u; -- name: WithSubquery :many SELECT sqlc.embed(users), (SELECT count(*) FROM users) AS total_count FROM users; -- name: WithAsterisk :one SELECT sqlc.embed(users), * FROM users; -- name: Duplicate :one SELECT sqlc.embed(users), sqlc.embed(users) FROM users; -- name: Join :one SELECT sqlc.embed(users), sqlc.embed(posts) FROM posts INNER JOIN users ON posts.user_id = users.id; -- name: WithSchema :one SELECT sqlc.embed(bu) FROM baz.users bu; -- name: WithCrossSchema :many SELECT sqlc.embed(users), sqlc.embed(bu) FROM users INNER JOIN baz.users bu ON users.id = bu.id; ================================================ FILE: internal/endtoend/testdata/sqlc_embed/postgresql/pgx/schema.sql ================================================ CREATE SCHEMA IF NOT EXISTS baz; CREATE TABLE users ( id integer NOT NULL PRIMARY KEY, name varchar(255) NOT NULL, age integer NULL ); CREATE TABLE posts ( id integer NOT NULL PRIMARY KEY, user_id integer NOT NULL ); CREATE TABLE baz.users ( id integer NOT NULL PRIMARY KEY, name varchar(255) NOT NULL ); ================================================ FILE: internal/endtoend/testdata/sqlc_embed/postgresql/pgx/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_json_tags": true, "emit_db_tags": true } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type BazUser struct { ID int32 Name string } type Post struct { ID int32 UserID int32 Likes []int32 } type User struct { ID int32 Name string Age sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "github.com/lib/pq" ) const duplicate = `-- name: Duplicate :one SELECT users.id, users.name, users.age, users.id, users.name, users.age FROM users ` type DuplicateRow struct { User User User_2 User } func (q *Queries) Duplicate(ctx context.Context) (DuplicateRow, error) { row := q.db.QueryRowContext(ctx, duplicate) var i DuplicateRow err := row.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.User_2.ID, &i.User_2.Name, &i.User_2.Age, ) return i, err } const join = `-- name: Join :one SELECT users.id, users.name, users.age, posts.id, posts.user_id, posts.likes FROM posts INNER JOIN users ON posts.user_id = users.id ` type JoinRow struct { User User Post Post } func (q *Queries) Join(ctx context.Context) (JoinRow, error) { row := q.db.QueryRowContext(ctx, join) var i JoinRow err := row.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.Post.ID, &i.Post.UserID, pq.Array(&i.Post.Likes), ) return i, err } const only = `-- name: Only :one SELECT users.id, users.name, users.age FROM users ` type OnlyRow struct { User User } func (q *Queries) Only(ctx context.Context) (OnlyRow, error) { row := q.db.QueryRowContext(ctx, only) var i OnlyRow err := row.Scan(&i.User.ID, &i.User.Name, &i.User.Age) return i, err } const withAlias = `-- name: WithAlias :one SELECT u.id, u.name, u.age FROM users u ` type WithAliasRow struct { User User } func (q *Queries) WithAlias(ctx context.Context) (WithAliasRow, error) { row := q.db.QueryRowContext(ctx, withAlias) var i WithAliasRow err := row.Scan(&i.User.ID, &i.User.Name, &i.User.Age) return i, err } const withAsterisk = `-- name: WithAsterisk :one SELECT users.id, users.name, users.age, id, name, age FROM users ` type WithAsteriskRow struct { User User ID int32 Name string Age sql.NullInt32 } func (q *Queries) WithAsterisk(ctx context.Context) (WithAsteriskRow, error) { row := q.db.QueryRowContext(ctx, withAsterisk) var i WithAsteriskRow err := row.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.ID, &i.Name, &i.Age, ) return i, err } const withCrossSchema = `-- name: WithCrossSchema :many SELECT users.id, users.name, users.age, bu.id, bu.name FROM users INNER JOIN baz.users bu ON users.id = bu.id ` type WithCrossSchemaRow struct { User User BazUser BazUser } func (q *Queries) WithCrossSchema(ctx context.Context) ([]WithCrossSchemaRow, error) { rows, err := q.db.QueryContext(ctx, withCrossSchema) if err != nil { return nil, err } defer rows.Close() var items []WithCrossSchemaRow for rows.Next() { var i WithCrossSchemaRow if err := rows.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.BazUser.ID, &i.BazUser.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 } const withSchema = `-- name: WithSchema :one SELECT bu.id, bu.name FROM baz.users bu ` type WithSchemaRow struct { BazUser BazUser } func (q *Queries) WithSchema(ctx context.Context) (WithSchemaRow, error) { row := q.db.QueryRowContext(ctx, withSchema) var i WithSchemaRow err := row.Scan(&i.BazUser.ID, &i.BazUser.Name) return i, err } const withSubquery = `-- name: WithSubquery :many SELECT users.id, users.name, users.age, (SELECT count(*) FROM users) AS total_count FROM users ` type WithSubqueryRow struct { User User TotalCount int64 } func (q *Queries) WithSubquery(ctx context.Context) ([]WithSubqueryRow, error) { rows, err := q.db.QueryContext(ctx, withSubquery) if err != nil { return nil, err } defer rows.Close() var items []WithSubqueryRow for rows.Next() { var i WithSubqueryRow if err := rows.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.TotalCount, ); 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 } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/query.sql ================================================ -- name: Only :one SELECT sqlc.embed(users) FROM users; -- name: WithAlias :one SELECT sqlc.embed(u) FROM users u; -- name: WithSubquery :many SELECT sqlc.embed(users), (SELECT count(*) FROM users) AS total_count FROM users; -- name: WithAsterisk :one SELECT sqlc.embed(users), * FROM users; -- name: Duplicate :one SELECT sqlc.embed(users), sqlc.embed(users) FROM users; -- name: Join :one SELECT sqlc.embed(users), sqlc.embed(posts) FROM posts INNER JOIN users ON posts.user_id = users.id; -- name: WithSchema :one SELECT sqlc.embed(bu) FROM baz.users bu; -- name: WithCrossSchema :many SELECT sqlc.embed(users), sqlc.embed(bu) FROM users INNER JOIN baz.users bu ON users.id = bu.id; ================================================ FILE: internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/schema.sql ================================================ CREATE SCHEMA IF NOT EXISTS baz; CREATE TABLE users ( id integer NOT NULL PRIMARY KEY, name varchar(255) NOT NULL, age integer NULL ); CREATE TABLE posts ( id integer NOT NULL PRIMARY KEY, user_id integer NOT NULL, likes integer[] NOT NULL ); CREATE TABLE baz.users ( id integer NOT NULL PRIMARY KEY, name varchar(255) NOT NULL ); ================================================ FILE: internal/endtoend/testdata/sqlc_embed/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type BazUser struct { ID int64 Name string } type Post struct { ID int64 UserID int64 } type User struct { ID int64 Name string Age sql.NullInt64 } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const duplicate = `-- name: Duplicate :one SELECT users.id, users.name, users.age, users.id, users.name, users.age FROM users ` type DuplicateRow struct { User User User_2 User } func (q *Queries) Duplicate(ctx context.Context) (DuplicateRow, error) { row := q.db.QueryRowContext(ctx, duplicate) var i DuplicateRow err := row.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.User_2.ID, &i.User_2.Name, &i.User_2.Age, ) return i, err } const join = `-- name: Join :one SELECT u.id, u.name, u.age, p.id, p.user_id FROM posts AS p INNER JOIN users AS u ON p.user_id = u.id ` type JoinRow struct { User User Post Post } func (q *Queries) Join(ctx context.Context) (JoinRow, error) { row := q.db.QueryRowContext(ctx, join) var i JoinRow err := row.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.Post.ID, &i.Post.UserID, ) return i, err } const only = `-- name: Only :one SELECT users.id, users.name, users.age FROM users ` type OnlyRow struct { User User } func (q *Queries) Only(ctx context.Context) (OnlyRow, error) { row := q.db.QueryRowContext(ctx, only) var i OnlyRow err := row.Scan(&i.User.ID, &i.User.Name, &i.User.Age) return i, err } const withAlias = `-- name: WithAlias :one SELECT u.id, u.name, u.age FROM users AS u ` type WithAliasRow struct { User User } func (q *Queries) WithAlias(ctx context.Context) (WithAliasRow, error) { row := q.db.QueryRowContext(ctx, withAlias) var i WithAliasRow err := row.Scan(&i.User.ID, &i.User.Name, &i.User.Age) return i, err } const withAsterisk = `-- name: WithAsterisk :one SELECT users.id, users.name, users.age, id, name, age FROM users ` type WithAsteriskRow struct { User User ID int64 Name string Age sql.NullInt64 } func (q *Queries) WithAsterisk(ctx context.Context) (WithAsteriskRow, error) { row := q.db.QueryRowContext(ctx, withAsterisk) var i WithAsteriskRow err := row.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.ID, &i.Name, &i.Age, ) return i, err } const withCrossSchema = `-- name: WithCrossSchema :many SELECT u.id, u.name, u.age, bu.id, bu.name FROM users AS u INNER JOIN baz.users bu ON u.id = bu.id ` type WithCrossSchemaRow struct { User User BazUser BazUser } func (q *Queries) WithCrossSchema(ctx context.Context) ([]WithCrossSchemaRow, error) { rows, err := q.db.QueryContext(ctx, withCrossSchema) if err != nil { return nil, err } defer rows.Close() var items []WithCrossSchemaRow for rows.Next() { var i WithCrossSchemaRow if err := rows.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.BazUser.ID, &i.BazUser.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 } const withSchema = `-- name: WithSchema :one SELECT bu.id, bu.name FROM baz.users AS bu ` type WithSchemaRow struct { BazUser BazUser } func (q *Queries) WithSchema(ctx context.Context) (WithSchemaRow, error) { row := q.db.QueryRowContext(ctx, withSchema) var i WithSchemaRow err := row.Scan(&i.BazUser.ID, &i.BazUser.Name) return i, err } const withSubquery = `-- name: WithSubquery :many SELECT users.id, users.name, users.age, (SELECT count(*) FROM users) AS total_count FROM users ` type WithSubqueryRow struct { User User TotalCount int64 } func (q *Queries) WithSubquery(ctx context.Context) ([]WithSubqueryRow, error) { rows, err := q.db.QueryContext(ctx, withSubquery) if err != nil { return nil, err } defer rows.Close() var items []WithSubqueryRow for rows.Next() { var i WithSubqueryRow if err := rows.Scan( &i.User.ID, &i.User.Name, &i.User.Age, &i.TotalCount, ); 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 } ================================================ FILE: internal/endtoend/testdata/sqlc_embed/sqlite/query.sql ================================================ -- name: Only :one SELECT sqlc.embed(users) FROM users; -- name: WithAlias :one SELECT sqlc.embed(u) FROM users AS u; -- name: WithSubquery :many SELECT sqlc.embed(users), (SELECT count(*) FROM users) AS total_count FROM users; -- name: WithAsterisk :one SELECT sqlc.embed(users), * FROM users; -- name: Duplicate :one SELECT sqlc.embed(users), sqlc.embed(users) FROM users; -- name: Join :one SELECT sqlc.embed(u), sqlc.embed(p) FROM posts AS p INNER JOIN users AS u ON p.user_id = u.id; -- name: WithSchema :one SELECT sqlc.embed(bu) FROM baz.users AS bu; -- name: WithCrossSchema :many SELECT sqlc.embed(u), sqlc.embed(bu) FROM users AS u INNER JOIN baz.users bu ON u.id = bu.id; ================================================ FILE: internal/endtoend/testdata/sqlc_embed/sqlite/schema.sql ================================================ ATTACH ':memory:' AS baz; CREATE TABLE users ( id integer PRIMARY KEY, name text NOT NULL, age integer ); CREATE TABLE posts ( id integer PRIMARY KEY, user_id integer NOT NULL ); CREATE TABLE baz.users ( id integer PRIMARY KEY, name text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/sqlc_embed/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar string MaybeBar sql.NullString } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const identOnNonNullable = `-- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = ? ` func (q *Queries) IdentOnNonNullable(ctx context.Context, bar sql.NullString) ([]string, error) { rows, err := q.db.QueryContext(ctx, identOnNonNullable, bar) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string 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 identOnNullable = `-- name: IdentOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = ? ` func (q *Queries) IdentOnNullable(ctx context.Context, maybeBar sql.NullString) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, identOnNullable, maybeBar) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var maybe_bar sql.NullString if err := rows.Scan(&maybe_bar); err != nil { return nil, err } items = append(items, maybe_bar) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const stringOnNonNullable = `-- name: StringOnNonNullable :many SELECT bar FROM foo WHERE bar = ? ` func (q *Queries) StringOnNonNullable(ctx context.Context, bar sql.NullString) ([]string, error) { rows, err := q.db.QueryContext(ctx, stringOnNonNullable, bar) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string 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 stringOnNullable = `-- name: StringOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = ? ` func (q *Queries) StringOnNullable(ctx context.Context, maybeBar sql.NullString) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, stringOnNullable, maybeBar) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var maybe_bar sql.NullString if err := rows.Scan(&maybe_bar); err != nil { return nil, err } items = append(items, maybe_bar) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/mysql/query.sql ================================================ -- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = sqlc.narg(bar); -- name: IdentOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = sqlc.narg(maybe_bar); -- name: StringOnNonNullable :many SELECT bar FROM foo WHERE bar = sqlc.narg('bar'); -- name: StringOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = sqlc.narg('maybe_bar'); ================================================ FILE: internal/endtoend/testdata/sqlc_narg/mysql/schema.sql ================================================ CREATE TABLE foo (bar text not null, maybe_bar text); ================================================ FILE: internal/endtoend/testdata/sqlc_narg/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar string MaybeBar sql.NullString } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const identOnNonNullable = `-- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = $1 ` func (q *Queries) IdentOnNonNullable(ctx context.Context, bar sql.NullString) ([]string, error) { rows, err := q.db.Query(ctx, identOnNonNullable, bar) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const identOnNullable = `-- name: IdentOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = $1 ` func (q *Queries) IdentOnNullable(ctx context.Context, maybeBar sql.NullString) ([]sql.NullString, error) { rows, err := q.db.Query(ctx, identOnNullable, maybeBar) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var maybe_bar sql.NullString if err := rows.Scan(&maybe_bar); err != nil { return nil, err } items = append(items, maybe_bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const stringOnNonNullable = `-- name: StringOnNonNullable :many SELECT bar FROM foo WHERE bar = $1 ` func (q *Queries) StringOnNonNullable(ctx context.Context, bar sql.NullString) ([]string, error) { rows, err := q.db.Query(ctx, stringOnNonNullable, bar) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const stringOnNullable = `-- name: StringOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = $1 ` func (q *Queries) StringOnNullable(ctx context.Context, maybeBar sql.NullString) ([]sql.NullString, error) { rows, err := q.db.Query(ctx, stringOnNullable, maybeBar) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var maybe_bar sql.NullString if err := rows.Scan(&maybe_bar); err != nil { return nil, err } items = append(items, maybe_bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/query.sql ================================================ -- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = sqlc.narg(bar); -- name: IdentOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = sqlc.narg(maybe_bar); -- name: StringOnNonNullable :many SELECT bar FROM foo WHERE bar = sqlc.narg('bar'); -- name: StringOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = sqlc.narg('maybe_bar'); ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (bar text not null, maybe_bar text); ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Bar string MaybeBar pgtype.Text } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 identOnNonNullable = `-- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = $1 ` func (q *Queries) IdentOnNonNullable(ctx context.Context, bar pgtype.Text) ([]string, error) { rows, err := q.db.Query(ctx, identOnNonNullable, bar) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const identOnNullable = `-- name: IdentOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = $1 ` func (q *Queries) IdentOnNullable(ctx context.Context, maybeBar pgtype.Text) ([]pgtype.Text, error) { rows, err := q.db.Query(ctx, identOnNullable, maybeBar) if err != nil { return nil, err } defer rows.Close() var items []pgtype.Text for rows.Next() { var maybe_bar pgtype.Text if err := rows.Scan(&maybe_bar); err != nil { return nil, err } items = append(items, maybe_bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const stringOnNonNullable = `-- name: StringOnNonNullable :many SELECT bar FROM foo WHERE bar = $1 ` func (q *Queries) StringOnNonNullable(ctx context.Context, bar pgtype.Text) ([]string, error) { rows, err := q.db.Query(ctx, stringOnNonNullable, bar) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string if err := rows.Scan(&bar); err != nil { return nil, err } items = append(items, bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const stringOnNullable = `-- name: StringOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = $1 ` func (q *Queries) StringOnNullable(ctx context.Context, maybeBar pgtype.Text) ([]pgtype.Text, error) { rows, err := q.db.Query(ctx, stringOnNullable, maybeBar) if err != nil { return nil, err } defer rows.Close() var items []pgtype.Text for rows.Next() { var maybe_bar pgtype.Text if err := rows.Scan(&maybe_bar); err != nil { return nil, err } items = append(items, maybe_bar) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/query.sql ================================================ -- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = sqlc.narg(bar); -- name: IdentOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = sqlc.narg(maybe_bar); -- name: StringOnNonNullable :many SELECT bar FROM foo WHERE bar = sqlc.narg('bar'); -- name: StringOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = sqlc.narg('maybe_bar'); ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (bar text not null, maybe_bar text); ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar string MaybeBar sql.NullString } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const identOnNonNullable = `-- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = $1 ` func (q *Queries) IdentOnNonNullable(ctx context.Context, bar sql.NullString) ([]string, error) { rows, err := q.db.QueryContext(ctx, identOnNonNullable, bar) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string 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 identOnNullable = `-- name: IdentOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = $1 ` func (q *Queries) IdentOnNullable(ctx context.Context, maybeBar sql.NullString) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, identOnNullable, maybeBar) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var maybe_bar sql.NullString if err := rows.Scan(&maybe_bar); err != nil { return nil, err } items = append(items, maybe_bar) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const stringOnNonNullable = `-- name: StringOnNonNullable :many SELECT bar FROM foo WHERE bar = $1 ` func (q *Queries) StringOnNonNullable(ctx context.Context, bar sql.NullString) ([]string, error) { rows, err := q.db.QueryContext(ctx, stringOnNonNullable, bar) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string 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 stringOnNullable = `-- name: StringOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = $1 ` func (q *Queries) StringOnNullable(ctx context.Context, maybeBar sql.NullString) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, stringOnNullable, maybeBar) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var maybe_bar sql.NullString if err := rows.Scan(&maybe_bar); err != nil { return nil, err } items = append(items, maybe_bar) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go_strict/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest_strict 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go_strict/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest_strict import ( "database/sql" ) type Foo struct { Bar string MaybeBar sql.NullString } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/go_strict/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest_strict import ( "context" "database/sql" ) const identOnNonNullable = `-- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = $1 ` func (q *Queries) IdentOnNonNullable(ctx context.Context, bar sql.NullString) ([]string, error) { rows, err := q.db.QueryContext(ctx, identOnNonNullable, bar) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string 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 identOnNullable = `-- name: IdentOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = $1 ` func (q *Queries) IdentOnNullable(ctx context.Context, maybeBar sql.NullString) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, identOnNullable, maybeBar) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var maybe_bar sql.NullString if err := rows.Scan(&maybe_bar); err != nil { return nil, err } items = append(items, maybe_bar) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const stringOnNonNullable = `-- name: StringOnNonNullable :many SELECT bar FROM foo WHERE bar = $1 ` func (q *Queries) StringOnNonNullable(ctx context.Context, bar sql.NullString) ([]string, error) { rows, err := q.db.QueryContext(ctx, stringOnNonNullable, bar) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string 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 stringOnNullable = `-- name: StringOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = $1 ` func (q *Queries) StringOnNullable(ctx context.Context, maybeBar sql.NullString) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, stringOnNullable, maybeBar) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var maybe_bar sql.NullString if err := rows.Scan(&maybe_bar); err != nil { return nil, err } items = append(items, maybe_bar) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/query.sql ================================================ -- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = sqlc.narg(bar); -- name: IdentOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = sqlc.narg(maybe_bar); -- name: StringOnNonNullable :many SELECT bar FROM foo WHERE bar = sqlc.narg('bar'); -- name: StringOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = sqlc.narg('maybe_bar'); ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (bar text not null, maybe_bar text); ================================================ FILE: internal/endtoend/testdata/sqlc_narg/postgresql/stdlib/sqlc.json ================================================ { "version": "2", "sql": [ { "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { "package": "querytest", "out": "go" } } }, { "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql", "strict_function_checks": true, "gen": { "go": { "package": "querytest_strict", "out": "go_strict" } } } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Bar string MaybeBar sql.NullString } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const identOnNonNullable = `-- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = ?1 ` func (q *Queries) IdentOnNonNullable(ctx context.Context, bar sql.NullString) ([]string, error) { rows, err := q.db.QueryContext(ctx, identOnNonNullable, bar) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string 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 identOnNullable = `-- name: IdentOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = ?1 ` func (q *Queries) IdentOnNullable(ctx context.Context, maybeBar sql.NullString) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, identOnNullable, maybeBar) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var maybe_bar sql.NullString if err := rows.Scan(&maybe_bar); err != nil { return nil, err } items = append(items, maybe_bar) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const stringOnNonNullable = `-- name: StringOnNonNullable :many SELECT bar FROM foo WHERE bar = ?1 ` func (q *Queries) StringOnNonNullable(ctx context.Context, bar sql.NullString) ([]string, error) { rows, err := q.db.QueryContext(ctx, stringOnNonNullable, bar) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var bar string 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 stringOnNullable = `-- name: StringOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = ?1 ` func (q *Queries) StringOnNullable(ctx context.Context, maybeBar sql.NullString) ([]sql.NullString, error) { rows, err := q.db.QueryContext(ctx, stringOnNullable, maybeBar) if err != nil { return nil, err } defer rows.Close() var items []sql.NullString for rows.Next() { var maybe_bar sql.NullString if err := rows.Scan(&maybe_bar); err != nil { return nil, err } items = append(items, maybe_bar) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/sqlc_narg/sqlite/query.sql ================================================ -- name: IdentOnNonNullable :many SELECT bar FROM foo WHERE bar = sqlc.narg(bar); -- name: IdentOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = sqlc.narg(maybe_bar); -- name: StringOnNonNullable :many SELECT bar FROM foo WHERE bar = sqlc.narg('bar'); -- name: StringOnNullable :many SELECT maybe_bar FROM foo WHERE maybe_bar = sqlc.narg('maybe_bar'); ================================================ FILE: internal/endtoend/testdata/sqlc_narg/sqlite/schema.sql ================================================ CREATE TABLE foo (bar text not null, maybe_bar text); ================================================ FILE: internal/endtoend/testdata/sqlc_narg/sqlite/sqlc.json ================================================ { "version": "2", "sql": [ { "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { "package": "querytest", "out": "go" } } } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "github.com/sqlc-dev/sqlc-testdata/mysql" ) type Foo struct { ID int32 Name string Bar sql.NullString Mystr mysql.ID } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "strings" "github.com/sqlc-dev/sqlc-testdata/mysql" ) const funcNullable = `-- name: FuncNullable :many SELECT bar FROM foo WHERE id IN (/*SLICE:favourites*/?) ` func (q *Queries) FuncNullable(ctx context.Context, favourites []int32) ([]sql.NullString, error) { query := funcNullable var queryParams []interface{} if len(favourites) > 0 { for _, v := range favourites { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:favourites*/?", strings.Repeat(",?", len(favourites))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:favourites*/?", "NULL", 1) } rows, err := q.db.QueryContext(ctx, query, queryParams...) 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 funcNullableNot = `-- name: FuncNullableNot :many SELECT bar FROM foo WHERE id NOT IN (/*SLICE:favourites*/?) ` func (q *Queries) FuncNullableNot(ctx context.Context, favourites []int32) ([]sql.NullString, error) { query := funcNullableNot var queryParams []interface{} if len(favourites) > 0 { for _, v := range favourites { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:favourites*/?", strings.Repeat(",?", len(favourites))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:favourites*/?", "NULL", 1) } rows, err := q.db.QueryContext(ctx, query, queryParams...) 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 funcParamIdent = `-- name: FuncParamIdent :many SELECT name FROM foo WHERE name = ? AND id IN (/*SLICE:favourites*/?) ` type FuncParamIdentParams struct { Slug string Favourites []int32 } func (q *Queries) FuncParamIdent(ctx context.Context, arg FuncParamIdentParams) ([]string, error) { query := funcParamIdent var queryParams []interface{} queryParams = append(queryParams, arg.Slug) if len(arg.Favourites) > 0 { for _, v := range arg.Favourites { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:favourites*/?", strings.Repeat(",?", len(arg.Favourites))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:favourites*/?", "NULL", 1) } rows, err := q.db.QueryContext(ctx, query, queryParams...) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParamSoloArg = `-- name: FuncParamSoloArg :many SELECT name FROM foo WHERE id IN (/*SLICE:favourites*/?) ` func (q *Queries) FuncParamSoloArg(ctx context.Context, favourites []int32) ([]string, error) { query := funcParamSoloArg var queryParams []interface{} if len(favourites) > 0 { for _, v := range favourites { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:favourites*/?", strings.Repeat(",?", len(favourites))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:favourites*/?", "NULL", 1) } rows, err := q.db.QueryContext(ctx, query, queryParams...) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParamString = `-- name: FuncParamString :many SELECT name FROM foo WHERE name = ? AND id IN (/*SLICE:favourites*/?) ` type FuncParamStringParams struct { Slug string Favourites []int32 } func (q *Queries) FuncParamString(ctx context.Context, arg FuncParamStringParams) ([]string, error) { query := funcParamString var queryParams []interface{} queryParams = append(queryParams, arg.Slug) if len(arg.Favourites) > 0 { for _, v := range arg.Favourites { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:favourites*/?", strings.Repeat(",?", len(arg.Favourites))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:favourites*/?", "NULL", 1) } rows, err := q.db.QueryContext(ctx, query, queryParams...) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const sliceExec = `-- name: SliceExec :exec UPDATE foo SET name = ? WHERE id IN (/*SLICE:favourites*/?) ` type SliceExecParams struct { Slug string Favourites []int32 } func (q *Queries) SliceExec(ctx context.Context, arg SliceExecParams) error { query := sliceExec var queryParams []interface{} queryParams = append(queryParams, arg.Slug) if len(arg.Favourites) > 0 { for _, v := range arg.Favourites { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:favourites*/?", strings.Repeat(",?", len(arg.Favourites))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:favourites*/?", "NULL", 1) } _, err := q.db.ExecContext(ctx, query, queryParams...) return err } const typedMyStr = `-- name: TypedMyStr :many SELECT bar FROM foo WHERE mystr IN (/*SLICE:mystr*/?) ` func (q *Queries) TypedMyStr(ctx context.Context, mystr []mysql.ID) ([]sql.NullString, error) { query := typedMyStr var queryParams []interface{} if len(mystr) > 0 { for _, v := range mystr { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:mystr*/?", strings.Repeat(",?", len(mystr))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:mystr*/?", "NULL", 1) } rows, err := q.db.QueryContext(ctx, query, queryParams...) 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 } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/mysql/query.sql ================================================ /* name: FuncParamIdent :many */ 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') AND id IN (sqlc.slice('favourites')); /* name: FuncParamSoloArg :many */ SELECT name FROM foo WHERE id IN (sqlc.slice('favourites')); /* name: SliceExec :exec */ UPDATE foo SET name = sqlc.arg(slug) WHERE id IN (sqlc.slice(favourites)); /* name: FuncNullable :many */ SELECT bar FROM foo WHERE id IN (sqlc.slice('favourites')); /* name: FuncNullableNot :many */ SELECT bar FROM foo WHERE id NOT IN (sqlc.slice('favourites')); /* name: TypedMyStr :many */ SELECT bar FROM foo WHERE mystr IN (sqlc.slice(mystr)); ================================================ FILE: internal/endtoend/testdata/sqlc_slice/mysql/schema.sql ================================================ CREATE TABLE foo (id int not null, name text not null, bar text null, mystr text not null); ================================================ FILE: internal/endtoend/testdata/sqlc_slice/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ], "overrides": [ { "column": "foo.mystr", "go_type": "github.com/sqlc-dev/sqlc-testdata/mysql.ID" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID int32 Name string } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const funcParamIdent = `-- name: FuncParamIdent :many SELECT name FROM foo WHERE name = $1 AND id IN ($2) ` 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 } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParamString = `-- name: FuncParamString :many SELECT name FROM foo WHERE name = $1 AND id IN ($2) ` 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 } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/postgresql/pgx/query.sql ================================================ -- name: FuncParamIdent :many 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') AND id IN (sqlc.slice('favourites')); ================================================ FILE: internal/endtoend/testdata/sqlc_slice/postgresql/pgx/schema.sql ================================================ CREATE TABLE foo (id int not null, name text not null); ================================================ FILE: internal/endtoend/testdata/sqlc_slice/postgresql/pgx/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID int32 Name string } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "strings" ) const funcParamIdent = `-- name: FuncParamIdent :many SELECT name FROM foo WHERE name = $1 AND id IN ($2) ` type FuncParamIdentParams struct { Slug string Favourites []int32 } func (q *Queries) FuncParamIdent(ctx context.Context, arg FuncParamIdentParams) ([]string, error) { query := funcParamIdent var queryParams []interface{} queryParams = append(queryParams, arg.Slug) if len(arg.Favourites) > 0 { for _, v := range arg.Favourites { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:favourites*/?", strings.Repeat(",?", len(arg.Favourites))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:favourites*/?", "NULL", 1) } rows, err := q.db.QueryContext(ctx, query, queryParams...) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParamString = `-- name: FuncParamString :many SELECT name FROM foo WHERE name = $1 AND id IN ($2) ` type FuncParamStringParams struct { Slug string Favourites []int32 } func (q *Queries) FuncParamString(ctx context.Context, arg FuncParamStringParams) ([]string, error) { query := funcParamString var queryParams []interface{} queryParams = append(queryParams, arg.Slug) if len(arg.Favourites) > 0 { for _, v := range arg.Favourites { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:favourites*/?", strings.Repeat(",?", len(arg.Favourites))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:favourites*/?", "NULL", 1) } rows, err := q.db.QueryContext(ctx, query, queryParams...) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/query.sql ================================================ /* name: FuncParamIdent :many */ 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') AND id IN (sqlc.slice('favourites')); ================================================ FILE: internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (id int not null, name text not null); ================================================ FILE: internal/endtoend/testdata/sqlc_slice/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { ID int64 Name string Bar sql.NullString } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "strings" ) const funcNullable = `-- name: FuncNullable :many SELECT bar FROM foo WHERE id IN (/*SLICE:favourites*/?) ` func (q *Queries) FuncNullable(ctx context.Context, favourites []int64) ([]sql.NullString, error) { query := funcNullable var queryParams []interface{} if len(favourites) > 0 { for _, v := range favourites { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:favourites*/?", strings.Repeat(",?", len(favourites))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:favourites*/?", "NULL", 1) } rows, err := q.db.QueryContext(ctx, query, queryParams...) 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 funcNullableNot = `-- name: FuncNullableNot :many SELECT bar FROM foo WHERE id NOT IN (/*SLICE:favourites*/?) ` func (q *Queries) FuncNullableNot(ctx context.Context, favourites []int64) ([]sql.NullString, error) { query := funcNullableNot var queryParams []interface{} if len(favourites) > 0 { for _, v := range favourites { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:favourites*/?", strings.Repeat(",?", len(favourites))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:favourites*/?", "NULL", 1) } rows, err := q.db.QueryContext(ctx, query, queryParams...) 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 funcParamIdent = `-- name: FuncParamIdent :many SELECT name FROM foo WHERE name = ?1 AND id IN (/*SLICE:favourites*/?) ` type FuncParamIdentParams struct { Slug string Favourites []int64 } func (q *Queries) FuncParamIdent(ctx context.Context, arg FuncParamIdentParams) ([]string, error) { query := funcParamIdent var queryParams []interface{} queryParams = append(queryParams, arg.Slug) if len(arg.Favourites) > 0 { for _, v := range arg.Favourites { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:favourites*/?", strings.Repeat(",?", len(arg.Favourites))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:favourites*/?", "NULL", 1) } rows, err := q.db.QueryContext(ctx, query, queryParams...) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParamSoloArg = `-- name: FuncParamSoloArg :many SELECT name FROM foo WHERE id IN (/*SLICE:favourites*/?) ` func (q *Queries) FuncParamSoloArg(ctx context.Context, favourites []int64) ([]string, error) { query := funcParamSoloArg var queryParams []interface{} if len(favourites) > 0 { for _, v := range favourites { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:favourites*/?", strings.Repeat(",?", len(favourites))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:favourites*/?", "NULL", 1) } rows, err := q.db.QueryContext(ctx, query, queryParams...) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const funcParamString = `-- name: FuncParamString :many SELECT name FROM foo WHERE name = ?1 AND id IN (/*SLICE:favourites*/?) ` type FuncParamStringParams struct { Slug string Favourites []int64 } func (q *Queries) FuncParamString(ctx context.Context, arg FuncParamStringParams) ([]string, error) { query := funcParamString var queryParams []interface{} queryParams = append(queryParams, arg.Slug) if len(arg.Favourites) > 0 { for _, v := range arg.Favourites { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:favourites*/?", strings.Repeat(",?", len(arg.Favourites))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:favourites*/?", "NULL", 1) } rows, err := q.db.QueryContext(ctx, query, queryParams...) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const sliceExec = `-- name: SliceExec :exec UPDATE foo SET name = ?1 WHERE id IN (/*SLICE:favourites*/?) ` type SliceExecParams struct { Slug string Favourites []int64 } func (q *Queries) SliceExec(ctx context.Context, arg SliceExecParams) error { query := sliceExec var queryParams []interface{} queryParams = append(queryParams, arg.Slug) if len(arg.Favourites) > 0 { for _, v := range arg.Favourites { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:favourites*/?", strings.Repeat(",?", len(arg.Favourites))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:favourites*/?", "NULL", 1) } _, err := q.db.ExecContext(ctx, query, queryParams...) return err } ================================================ FILE: internal/endtoend/testdata/sqlc_slice/sqlite/query.sql ================================================ /* name: FuncParamIdent :many */ 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') AND id IN (sqlc.slice('favourites')); /* name: FuncParamSoloArg :many */ SELECT name FROM foo WHERE id IN (sqlc.slice('favourites')); /* name: SliceExec :exec */ UPDATE foo SET name = sqlc.arg(slug) WHERE id IN (sqlc.slice(favourites)); /* name: FuncNullable :many */ SELECT bar FROM foo WHERE id IN (sqlc.slice('favourites')); /* name: FuncNullableNot :many */ SELECT bar FROM foo WHERE id NOT IN (sqlc.slice('favourites')); ================================================ FILE: internal/endtoend/testdata/sqlc_slice/sqlite/schema.sql ================================================ CREATE TABLE foo (id int not null, name text not null, bar text); ================================================ FILE: internal/endtoend/testdata/sqlc_slice/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" "database/sql" "fmt" ) 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} } func Prepare(ctx context.Context, db DBTX) (*Queries, error) { q := Queries{db: db} var err error if q.funcParamIdentStmt, err = db.PrepareContext(ctx, funcParamIdent); err != nil { return nil, fmt.Errorf("error preparing query FuncParamIdent: %w", err) } return &q, nil } func (q *Queries) Close() error { var err error if q.funcParamIdentStmt != nil { if cerr := q.funcParamIdentStmt.Close(); cerr != nil { err = fmt.Errorf("error closing funcParamIdentStmt: %w", cerr) } } return err } func (q *Queries) exec(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) (sql.Result, error) { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).ExecContext(ctx, args...) case stmt != nil: return stmt.ExecContext(ctx, args...) default: return q.db.ExecContext(ctx, query, args...) } } func (q *Queries) query(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) (*sql.Rows, error) { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).QueryContext(ctx, args...) case stmt != nil: return stmt.QueryContext(ctx, args...) default: return q.db.QueryContext(ctx, query, args...) } } func (q *Queries) queryRow(ctx context.Context, stmt *sql.Stmt, query string, args ...interface{}) *sql.Row { switch { case stmt != nil && q.tx != nil: return q.tx.StmtContext(ctx, stmt).QueryRowContext(ctx, args...) case stmt != nil: return stmt.QueryRowContext(ctx, args...) default: return q.db.QueryRowContext(ctx, query, args...) } } type Queries struct { db DBTX tx *sql.Tx funcParamIdentStmt *sql.Stmt } func (q *Queries) WithTx(tx *sql.Tx) *Queries { return &Queries{ db: tx, tx: tx, funcParamIdentStmt: q.funcParamIdentStmt, } } ================================================ FILE: internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { ID int64 Name string Bar sql.NullString } ================================================ FILE: internal/endtoend/testdata/sqlc_slice_prepared/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "strings" ) const funcParamIdent = `-- name: FuncParamIdent :many SELECT name FROM foo WHERE name = ?1 AND id IN (/*SLICE:favourites*/?) ` type FuncParamIdentParams struct { Slug string Favourites []int64 } func (q *Queries) FuncParamIdent(ctx context.Context, arg FuncParamIdentParams) ([]string, error) { query := funcParamIdent var queryParams []interface{} queryParams = append(queryParams, arg.Slug) if len(arg.Favourites) > 0 { for _, v := range arg.Favourites { queryParams = append(queryParams, v) } query = strings.Replace(query, "/*SLICE:favourites*/?", strings.Repeat(",?", len(arg.Favourites))[1:], 1) } else { query = strings.Replace(query, "/*SLICE:favourites*/?", "NULL", 1) } rows, err := q.query(ctx, nil, query, queryParams...) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/sqlc_slice_prepared/sqlite/query.sql ================================================ /* name: FuncParamIdent :many */ SELECT name FROM foo WHERE name = sqlc.arg(slug) AND id IN (sqlc.slice(favourites)); ================================================ FILE: internal/endtoend/testdata/sqlc_slice_prepared/sqlite/schema.sql ================================================ CREATE TABLE foo (id int not null, name text not null, bar text); ================================================ FILE: internal/endtoend/testdata/sqlc_slice_prepared/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_prepared_queries": true } ] } ================================================ FILE: internal/endtoend/testdata/sqlite_skip_todo/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlite_skip_todo/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" ) type Foo struct { Bar sql.NullString } ================================================ FILE: internal/endtoend/testdata/sqlite_skip_todo/db/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/sqlite_skip_todo/query.sql ================================================ -- 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 = ?; ================================================ FILE: internal/endtoend/testdata/sqlite_skip_todo/schema.sql ================================================ CREATE TABLE foo ( bar text ); ================================================ FILE: internal/endtoend/testdata/sqlite_skip_todo/sqlc.json ================================================ { "version": "2", "sql": [ { "engine": "sqlite", "queries": "query.sql", "schema": "schema.sql", "gen": { "go": { "package": "db", "out": "db" } } } ] } ================================================ FILE: internal/endtoend/testdata/sqlite_table_options/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sqlite_table_options/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Authors1 struct { ID int64 Name string Bio sql.NullString } type Authors2 struct { ID int64 Name string Bio sql.NullString } type Authors3 struct { ID int64 Name string Bio sql.NullString } type Authors4 struct { ID int64 Name string Bio sql.NullString } ================================================ FILE: internal/endtoend/testdata/sqlite_table_options/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAuthor = `-- name: GetAuthor :one SELECT id, name, bio FROM authors1 WHERE id = ?1 LIMIT 1 ` func (q *Queries) GetAuthor(ctx context.Context, id int64) (Authors1, error) { row := q.db.QueryRowContext(ctx, getAuthor, id) var i Authors1 err := row.Scan(&i.ID, &i.Name, &i.Bio) return i, err } ================================================ FILE: internal/endtoend/testdata/sqlite_table_options/sqlite/query.sql ================================================ -- name: GetAuthor :one SELECT * FROM authors1 WHERE id = ?1 LIMIT 1; ================================================ FILE: internal/endtoend/testdata/sqlite_table_options/sqlite/schema.sql ================================================ CREATE TABLE authors1 ( id INTEGER PRIMARY KEY, name text NOT NULL, bio text ) STRICT, WITHOUT ROWID; CREATE TABLE authors2 ( id INTEGER PRIMARY KEY, name text NOT NULL, bio text ) WITHOUT ROWID, STRICT; CREATE TABLE authors3 ( id INTEGER PRIMARY KEY, name text NOT NULL, bio text ) WITHOUT ROWID; CREATE TABLE authors4 ( id INTEGER PRIMARY KEY, name text NOT NULL, bio text ) STRICT; ================================================ FILE: internal/endtoend/testdata/sqlite_table_options/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "name": "querytest" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion/mysql/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const starExpansion = `-- name: StarExpansion :many SELECT a, b, a, b, foo.a, foo.b FROM foo ` type StarExpansionRow struct { A sql.NullString B sql.NullString A_2 sql.NullString B_2 sql.NullString A_3 sql.NullString B_3 sql.NullString } func (q *Queries) StarExpansion(ctx context.Context) ([]StarExpansionRow, error) { rows, err := q.db.QueryContext(ctx, starExpansion) if err != nil { return nil, err } defer rows.Close() var items []StarExpansionRow for rows.Next() { var i StarExpansionRow if err := rows.Scan( &i.A, &i.B, &i.A_2, &i.B_2, &i.A_3, &i.B_3, ); 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 starQuotedExpansion = `-- name: StarQuotedExpansion :many SELECT t.a, t.b FROM foo ` + "`" + `t` + "`" + ` ` func (q *Queries) StarQuotedExpansion(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, starQuotedExpansion) 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion/mysql/query.sql ================================================ /* name: StarExpansion :many */ SELECT *, *, foo.* FROM foo; /* name: StarQuotedExpansion :many */ SELECT `t`.* FROM foo `t`; ================================================ FILE: internal/endtoend/testdata/star_expansion/mysql/schema.sql ================================================ CREATE TABLE foo (a text, b text); ================================================ FILE: internal/endtoend/testdata/star_expansion/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const starExpansion = `-- name: StarExpansion :many SELECT a, b, a, b, foo.a, foo.b FROM foo ` type StarExpansionRow struct { A sql.NullString B sql.NullString A_2 sql.NullString B_2 sql.NullString A_3 sql.NullString B_3 sql.NullString } func (q *Queries) StarExpansion(ctx context.Context) ([]StarExpansionRow, error) { rows, err := q.db.Query(ctx, starExpansion) if err != nil { return nil, err } defer rows.Close() var items []StarExpansionRow for rows.Next() { var i StarExpansionRow if err := rows.Scan( &i.A, &i.B, &i.A_2, &i.B_2, &i.A_3, &i.B_3, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const starQuotedExpansion = `-- name: StarQuotedExpansion :many SELECT t.a, t.b FROM foo "t" ` func (q *Queries) StarQuotedExpansion(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, starQuotedExpansion) 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/query.sql ================================================ -- name: StarExpansion :many SELECT *, *, foo.* FROM foo; -- name: StarQuotedExpansion :many SELECT "t".* FROM foo "t"; ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (a text, b text); ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { A pgtype.Text B pgtype.Text } ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 starExpansion = `-- name: StarExpansion :many SELECT a, b, a, b, foo.a, foo.b FROM foo ` type StarExpansionRow struct { A pgtype.Text B pgtype.Text A_2 pgtype.Text B_2 pgtype.Text A_3 pgtype.Text B_3 pgtype.Text } func (q *Queries) StarExpansion(ctx context.Context) ([]StarExpansionRow, error) { rows, err := q.db.Query(ctx, starExpansion) if err != nil { return nil, err } defer rows.Close() var items []StarExpansionRow for rows.Next() { var i StarExpansionRow if err := rows.Scan( &i.A, &i.B, &i.A_2, &i.B_2, &i.A_3, &i.B_3, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const starQuotedExpansion = `-- name: StarQuotedExpansion :many SELECT t.a, t.b FROM foo "t" ` func (q *Queries) StarQuotedExpansion(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, starQuotedExpansion) 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/query.sql ================================================ -- name: StarExpansion :many SELECT *, *, foo.* FROM foo; -- name: StarQuotedExpansion :many SELECT "t".* FROM foo "t"; ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (a text, b text); ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/stdlib/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const starExpansion = `-- name: StarExpansion :many SELECT a, b, a, b, foo.a, foo.b FROM foo ` type StarExpansionRow struct { A sql.NullString B sql.NullString A_2 sql.NullString B_2 sql.NullString A_3 sql.NullString B_3 sql.NullString } func (q *Queries) StarExpansion(ctx context.Context) ([]StarExpansionRow, error) { rows, err := q.db.QueryContext(ctx, starExpansion) if err != nil { return nil, err } defer rows.Close() var items []StarExpansionRow for rows.Next() { var i StarExpansionRow if err := rows.Scan( &i.A, &i.B, &i.A_2, &i.B_2, &i.A_3, &i.B_3, ); 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 starQuotedExpansion = `-- name: StarQuotedExpansion :many SELECT t.a, t.b FROM foo "t" ` func (q *Queries) StarQuotedExpansion(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, starQuotedExpansion) 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/stdlib/query.sql ================================================ -- name: StarExpansion :many SELECT *, *, foo.* FROM foo; -- name: StarQuotedExpansion :many SELECT "t".* FROM foo "t"; ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (a text, b text); ================================================ FILE: internal/endtoend/testdata/star_expansion/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion/sqlite/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const starExpansion = `-- name: StarExpansion :many SELECT a, b, a, b, foo.a, foo.b FROM foo ` type StarExpansionRow struct { A sql.NullString B sql.NullString A_2 sql.NullString B_2 sql.NullString A_3 sql.NullString B_3 sql.NullString } func (q *Queries) StarExpansion(ctx context.Context) ([]StarExpansionRow, error) { rows, err := q.db.QueryContext(ctx, starExpansion) if err != nil { return nil, err } defer rows.Close() var items []StarExpansionRow for rows.Next() { var i StarExpansionRow if err := rows.Scan( &i.A, &i.B, &i.A_2, &i.B_2, &i.A_3, &i.B_3, ); 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 starQuotedExpansion = `-- name: StarQuotedExpansion :many SELECT t.a, t.b FROM foo "t" ` func (q *Queries) StarQuotedExpansion(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, starQuotedExpansion) 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion/sqlite/query.sql ================================================ -- name: StarExpansion :many SELECT *, *, foo.* FROM foo; -- name: StarQuotedExpansion :many SELECT "t".* FROM foo "t"; ================================================ FILE: internal/endtoend/testdata/star_expansion/sqlite/schema.sql ================================================ CREATE TABLE foo (a text, b text); ================================================ FILE: internal/endtoend/testdata/star_expansion/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { C sql.NullString D sql.NullString } type Foo struct { A sql.NullString B sql.NullString } ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const starExpansionCTE = `-- name: StarExpansionCTE :many WITH cte AS (SELECT a, b FROM foo) SELECT c, d FROM bar ` func (q *Queries) StarExpansionCTE(ctx context.Context) ([]Bar, error) { rows, err := q.db.Query(ctx, starExpansionCTE) if err != nil { return nil, err } defer rows.Close() var items []Bar for rows.Next() { var i Bar if err := rows.Scan(&i.C, &i.D); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const starExpansionTwoCTE = `-- name: StarExpansionTwoCTE :many WITH a AS (SELECT a, b FROM foo), b AS (SELECT 1::int as bar, a, b FROM a) SELECT bar, a, b FROM b ` type StarExpansionTwoCTERow struct { Bar int32 A sql.NullString B sql.NullString } func (q *Queries) StarExpansionTwoCTE(ctx context.Context) ([]StarExpansionTwoCTERow, error) { rows, err := q.db.Query(ctx, starExpansionTwoCTE) if err != nil { return nil, err } defer rows.Close() var items []StarExpansionTwoCTERow for rows.Next() { var i StarExpansionTwoCTERow if err := rows.Scan(&i.Bar, &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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/pgx/v4/query.sql ================================================ -- name: StarExpansionCTE :many WITH cte AS (SELECT * FROM foo) SELECT * FROM bar; -- name: StarExpansionTwoCTE :many WITH a AS (SELECT * FROM foo), b AS (SELECT 1::int as bar, * FROM a) SELECT * FROM b; ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/pgx/v4/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (c text, d text); ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Bar struct { C pgtype.Text D pgtype.Text } type Foo struct { A pgtype.Text B pgtype.Text } ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/pgx/v5/go/query.sql.go ================================================ // 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 starExpansionCTE = `-- name: StarExpansionCTE :many WITH cte AS (SELECT a, b FROM foo) SELECT c, d FROM bar ` func (q *Queries) StarExpansionCTE(ctx context.Context) ([]Bar, error) { rows, err := q.db.Query(ctx, starExpansionCTE) if err != nil { return nil, err } defer rows.Close() var items []Bar for rows.Next() { var i Bar if err := rows.Scan(&i.C, &i.D); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const starExpansionTwoCTE = `-- name: StarExpansionTwoCTE :many WITH a AS (SELECT a, b FROM foo), b AS (SELECT 1::int as bar, a, b FROM a) SELECT bar, a, b FROM b ` type StarExpansionTwoCTERow struct { Bar int32 A pgtype.Text B pgtype.Text } func (q *Queries) StarExpansionTwoCTE(ctx context.Context) ([]StarExpansionTwoCTERow, error) { rows, err := q.db.Query(ctx, starExpansionTwoCTE) if err != nil { return nil, err } defer rows.Close() var items []StarExpansionTwoCTERow for rows.Next() { var i StarExpansionTwoCTERow if err := rows.Scan(&i.Bar, &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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/pgx/v5/query.sql ================================================ -- name: StarExpansionCTE :many WITH cte AS (SELECT * FROM foo) SELECT * FROM bar; -- name: StarExpansionTwoCTE :many WITH a AS (SELECT * FROM foo), b AS (SELECT 1::int as bar, * FROM a) SELECT * FROM b; ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/pgx/v5/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (c text, d text); ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { C sql.NullString D sql.NullString } type Foo struct { A sql.NullString B sql.NullString } ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const starExpansionCTE = `-- name: StarExpansionCTE :many WITH cte AS (SELECT a, b FROM foo) SELECT c, d FROM bar ` func (q *Queries) StarExpansionCTE(ctx context.Context) ([]Bar, error) { rows, err := q.db.QueryContext(ctx, starExpansionCTE) if err != nil { return nil, err } defer rows.Close() var items []Bar for rows.Next() { var i Bar if err := rows.Scan(&i.C, &i.D); 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 starExpansionTwoCTE = `-- name: StarExpansionTwoCTE :many WITH a AS (SELECT a, b FROM foo), b AS (SELECT 1::int as bar, a, b FROM a) SELECT bar, a, b FROM b ` type StarExpansionTwoCTERow struct { Bar int32 A sql.NullString B sql.NullString } func (q *Queries) StarExpansionTwoCTE(ctx context.Context) ([]StarExpansionTwoCTERow, error) { rows, err := q.db.QueryContext(ctx, starExpansionTwoCTE) if err != nil { return nil, err } defer rows.Close() var items []StarExpansionTwoCTERow for rows.Next() { var i StarExpansionTwoCTERow if err := rows.Scan(&i.Bar, &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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/stdlib/query.sql ================================================ -- name: StarExpansionCTE :many WITH cte AS (SELECT * FROM foo) SELECT * FROM bar; -- name: StarExpansionTwoCTE :many WITH a AS (SELECT * FROM foo), b AS (SELECT 1::int as bar, * FROM a) SELECT * FROM b; ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/stdlib/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (c text, d text); ================================================ FILE: internal/endtoend/testdata/star_expansion_cte/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Version struct { ID int64 Name pgtype.Text PreviousVersionID int64 } ================================================ FILE: internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getLatestVersionWithSubquery = `-- name: GetLatestVersionWithSubquery :one SELECT * FROM versions WHERE versions.id IN ( WITH RECURSIVE search_tree(id) AS ( SELECT id, 0 as chain_id, 0 as chain_counter FROM versions ) SELECT DISTINCT ON (search_tree.chain_id) search_tree.id FROM search_tree ORDER BY search_tree.chain_id, chain_counter DESC ) ` func (q *Queries) GetLatestVersionWithSubquery(ctx context.Context) (Version, error) { row := q.db.QueryRow(ctx, getLatestVersionWithSubquery) var i Version err := row.Scan(&i.ID, &i.Name, &i.PreviousVersionID) return i, err } ================================================ FILE: internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/query.sql ================================================ -- name: GetLatestVersionWithSubquery :one SELECT * FROM versions WHERE versions.id IN ( WITH RECURSIVE search_tree(id) AS ( SELECT id, 0 as chain_id, 0 as chain_counter FROM versions ) SELECT DISTINCT ON (search_tree.chain_id) search_tree.id FROM search_tree ORDER BY search_tree.chain_id, chain_counter DESC ); ================================================ FILE: internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/schema.sql ================================================ -- Example queries for sqlc CREATE TABLE versions ( id BIGSERIAL PRIMARY KEY, name TEXT, previous_version_id bigint NOT NULL ); ================================================ FILE: internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/star_expansion_failed/postgresql/pgx/stderr.txt ================================================ # package querytest query.sql:1:1: star expansion failed for query ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { C sql.NullString D sql.NullString } type Foo struct { A sql.NullString B sql.NullString } ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const starExpansionCTE = `-- name: StarExpansionCTE :many WITH cte AS (SELECT a, b FROM foo) SELECT a, b FROM cte ` type StarExpansionCTERow struct { A sql.NullString B sql.NullString } func (q *Queries) StarExpansionCTE(ctx context.Context) ([]StarExpansionCTERow, error) { rows, err := q.db.Query(ctx, starExpansionCTE) if err != nil { return nil, err } defer rows.Close() var items []StarExpansionCTERow for rows.Next() { var i StarExpansionCTERow 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/query.sql ================================================ -- name: StarExpansionCTE :many WITH cte AS (SELECT * FROM foo) SELECT * FROM cte; ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (c text, d text); ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Bar struct { C pgtype.Text D pgtype.Text } type Foo struct { A pgtype.Text B pgtype.Text } ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/go/query.sql.go ================================================ // 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 starExpansionCTE = `-- name: StarExpansionCTE :many WITH cte AS (SELECT a, b FROM foo) SELECT a, b FROM cte ` type StarExpansionCTERow struct { A pgtype.Text B pgtype.Text } func (q *Queries) StarExpansionCTE(ctx context.Context) ([]StarExpansionCTERow, error) { rows, err := q.db.Query(ctx, starExpansionCTE) if err != nil { return nil, err } defer rows.Close() var items []StarExpansionCTERow for rows.Next() { var i StarExpansionCTERow 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/query.sql ================================================ -- name: StarExpansionCTE :many WITH cte AS (SELECT * FROM foo) SELECT * FROM cte; ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (c text, d text); ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { C sql.NullString D sql.NullString } type Foo struct { A sql.NullString B sql.NullString } ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const starExpansionCTE = `-- name: StarExpansionCTE :many WITH cte AS (SELECT a, b FROM foo) SELECT a, b FROM cte ` type StarExpansionCTERow struct { A sql.NullString B sql.NullString } func (q *Queries) StarExpansionCTE(ctx context.Context) ([]StarExpansionCTERow, error) { rows, err := q.db.QueryContext(ctx, starExpansionCTE) if err != nil { return nil, err } defer rows.Close() var items []StarExpansionCTERow for rows.Next() { var i StarExpansionCTERow 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/stdlib/query.sql ================================================ -- name: StarExpansionCTE :many WITH cte AS (SELECT * FROM foo) SELECT * FROM cte; ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/stdlib/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (c text, d text); ================================================ FILE: internal/endtoend/testdata/star_expansion_from_cte/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { C sql.NullString D sql.NullString } type Foo struct { A sql.NullString B sql.NullString } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const starExpansionJoin = `-- name: StarExpansionJoin :many SELECT a, b, c, d FROM foo, bar ` type StarExpansionJoinRow struct { A sql.NullString B sql.NullString C sql.NullString D sql.NullString } func (q *Queries) StarExpansionJoin(ctx context.Context) ([]StarExpansionJoinRow, error) { rows, err := q.db.QueryContext(ctx, starExpansionJoin) if err != nil { return nil, err } defer rows.Close() var items []StarExpansionJoinRow for rows.Next() { var i StarExpansionJoinRow if err := rows.Scan( &i.A, &i.B, &i.C, &i.D, ); 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/mysql/query.sql ================================================ /* name: StarExpansionJoin :many */ SELECT * FROM foo, bar; ================================================ FILE: internal/endtoend/testdata/star_expansion_join/mysql/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (c text, d text); ================================================ FILE: internal/endtoend/testdata/star_expansion_join/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { C sql.NullString D sql.NullString } type Foo struct { A sql.NullString B sql.NullString } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const starExpansionJoin = `-- name: StarExpansionJoin :many SELECT a, b, c, d FROM foo, bar ` type StarExpansionJoinRow struct { A sql.NullString B sql.NullString C sql.NullString D sql.NullString } func (q *Queries) StarExpansionJoin(ctx context.Context) ([]StarExpansionJoinRow, error) { rows, err := q.db.Query(ctx, starExpansionJoin) if err != nil { return nil, err } defer rows.Close() var items []StarExpansionJoinRow for rows.Next() { var i StarExpansionJoinRow if err := rows.Scan( &i.A, &i.B, &i.C, &i.D, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/query.sql ================================================ -- name: StarExpansionJoin :many SELECT * FROM foo, bar; ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (c text, d text); ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Bar struct { C pgtype.Text D pgtype.Text } type Foo struct { A pgtype.Text B pgtype.Text } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 starExpansionJoin = `-- name: StarExpansionJoin :many SELECT a, b, c, d FROM foo, bar ` type StarExpansionJoinRow struct { A pgtype.Text B pgtype.Text C pgtype.Text D pgtype.Text } func (q *Queries) StarExpansionJoin(ctx context.Context) ([]StarExpansionJoinRow, error) { rows, err := q.db.Query(ctx, starExpansionJoin) if err != nil { return nil, err } defer rows.Close() var items []StarExpansionJoinRow for rows.Next() { var i StarExpansionJoinRow if err := rows.Scan( &i.A, &i.B, &i.C, &i.D, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/query.sql ================================================ -- name: StarExpansionJoin :many SELECT * FROM foo, bar; ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (c text, d text); ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Bar struct { C sql.NullString D sql.NullString } type Foo struct { A sql.NullString B sql.NullString } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const starExpansionJoin = `-- name: StarExpansionJoin :many SELECT a, b, c, d FROM foo, bar ` type StarExpansionJoinRow struct { A sql.NullString B sql.NullString C sql.NullString D sql.NullString } func (q *Queries) StarExpansionJoin(ctx context.Context) ([]StarExpansionJoinRow, error) { rows, err := q.db.QueryContext(ctx, starExpansionJoin) if err != nil { return nil, err } defer rows.Close() var items []StarExpansionJoinRow for rows.Next() { var i StarExpansionJoinRow if err := rows.Scan( &i.A, &i.B, &i.C, &i.D, ); 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/query.sql ================================================ -- name: StarExpansionJoin :many SELECT * FROM foo, bar; ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (a text, b text); CREATE TABLE bar (c text, d text); ================================================ FILE: internal/endtoend/testdata/star_expansion_join/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Group sql.NullString Key sql.NullString } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const starExpansionReserved = `-- name: StarExpansionReserved :many SELECT ` + "`" + `group` + "`" + `, ` + "`" + `key` + "`" + ` FROM foo ` func (q *Queries) StarExpansionReserved(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, starExpansionReserved) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Group, &i.Key); 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/mysql/query.sql ================================================ /* name: StarExpansionReserved :many */ SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/mysql/schema.sql ================================================ CREATE TABLE foo (`group` text, `key` text); ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Group sql.NullString Key sql.NullString } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const starExpansionReserved = `-- name: StarExpansionReserved :many SELECT "group", key FROM foo ` func (q *Queries) StarExpansionReserved(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, starExpansionReserved) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Group, &i.Key); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/query.sql ================================================ -- name: StarExpansionReserved :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo ("group" text, key text); ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { Group pgtype.Text Key pgtype.Text } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const starExpansionReserved = `-- name: StarExpansionReserved :many SELECT "group", key FROM foo ` func (q *Queries) StarExpansionReserved(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, starExpansionReserved) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Group, &i.Key); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/query.sql ================================================ -- name: StarExpansionReserved :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo ("group" text, key text); ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { Group sql.NullString Key sql.NullString } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const starExpansionReserved = `-- name: StarExpansionReserved :many SELECT "group", key FROM foo ` func (q *Queries) StarExpansionReserved(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, starExpansionReserved) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Group, &i.Key); 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/query.sql ================================================ -- name: StarExpansionReserved :many SELECT * FROM foo; ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo ("group" text, key text); ================================================ FILE: internal/endtoend/testdata/star_expansion_reserved/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_series/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1995 ================================================ FILE: internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Alertreport struct { Eventdate pgtype.Date } ================================================ FILE: internal/endtoend/testdata/star_expansion_series/postgresql/pgx/go/query.sql.go ================================================ // 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 countAlertReportBy = `-- name: CountAlertReportBy :many select DATE_TRUNC($1,ts)::text as datetime,coalesce(count,0) as count from ( SELECT DATE_TRUNC($1,eventdate) as hr ,count(*) FROM alertreport where eventdate between $2 and $3 GROUP BY 1 ) AS cnt right outer join ( SELECT ts FROM generate_series ( $2, $3, CONCAT('1 ',$1)::interval) AS ts ) as dte on DATE_TRUNC($1, ts ) = cnt.hr order by 1 asc ` type CountAlertReportByParams struct { DateTrunc string Eventdate pgtype.Date Eventdate_2 pgtype.Date } type CountAlertReportByRow struct { Datetime string Count int64 } func (q *Queries) CountAlertReportBy(ctx context.Context, arg CountAlertReportByParams) ([]CountAlertReportByRow, error) { rows, err := q.db.Query(ctx, countAlertReportBy, arg.DateTrunc, arg.Eventdate, arg.Eventdate_2) if err != nil { return nil, err } defer rows.Close() var items []CountAlertReportByRow for rows.Next() { var i CountAlertReportByRow if err := rows.Scan(&i.Datetime, &i.Count); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/star_expansion_series/postgresql/pgx/query.sql ================================================ -- name: CountAlertReportBy :many select DATE_TRUNC($1,ts)::text as datetime,coalesce(count,0) as count from ( SELECT DATE_TRUNC($1,eventdate) as hr ,count(*) FROM alertreport where eventdate between $2 and $3 GROUP BY 1 ) AS cnt right outer join ( SELECT * FROM generate_series ( $2, $3, CONCAT('1 ',$1)::interval) AS ts ) as dte on DATE_TRUNC($1, ts ) = cnt.hr order by 1 asc; ================================================ FILE: internal/endtoend/testdata/star_expansion_series/postgresql/pgx/schema.sql ================================================ CREATE TABLE alertreport ( eventdate date ); ================================================ FILE: internal/endtoend/testdata/star_expansion_series/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/mysql/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const starExpansionSubquery = `-- name: StarExpansionSubquery :many SELECT a, b FROM foo WHERE EXISTS (SELECT a, b FROM foo) ` func (q *Queries) StarExpansionSubquery(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, starExpansionSubquery) 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/mysql/query.sql ================================================ /* name: StarExpansionSubquery :many */ SELECT * FROM foo WHERE EXISTS (SELECT * FROM foo); ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/mysql/schema.sql ================================================ CREATE TABLE foo (a text, b text); ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const starExpansionSubquery = `-- name: StarExpansionSubquery :many SELECT a, b FROM foo WHERE EXISTS (SELECT a, b FROM foo) ` func (q *Queries) StarExpansionSubquery(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, starExpansionSubquery) 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/query.sql ================================================ -- name: StarExpansionSubquery :many SELECT * FROM foo WHERE EXISTS (SELECT * FROM foo); ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (a text, b text); ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { A pgtype.Text B pgtype.Text } ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const starExpansionSubquery = `-- name: StarExpansionSubquery :many SELECT a, b FROM foo WHERE EXISTS (SELECT a, b FROM foo) ` func (q *Queries) StarExpansionSubquery(ctx context.Context) ([]Foo, error) { rows, err := q.db.Query(ctx, starExpansionSubquery) 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/query.sql ================================================ -- name: StarExpansionSubquery :many SELECT * FROM foo WHERE EXISTS (SELECT * FROM foo); ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (a text, b text); ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const starExpansionSubquery = `-- name: StarExpansionSubquery :many SELECT a, b FROM foo WHERE EXISTS (SELECT a, b FROM foo) ` func (q *Queries) StarExpansionSubquery(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, starExpansionSubquery) 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 } ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/query.sql ================================================ -- name: StarExpansionSubquery :many SELECT * FROM foo WHERE EXISTS (SELECT * FROM foo); ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (a text, b text); ================================================ FILE: internal/endtoend/testdata/star_expansion_subquery/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/strict_function_checks/postgresql/query.sql ================================================ -- name: F :exec SELECT doesntexist(); ================================================ FILE: internal/endtoend/testdata/strict_function_checks/postgresql/schema.sql ================================================ ================================================ FILE: internal/endtoend/testdata/strict_function_checks/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "strict_function_checks": true } ] } ================================================ FILE: internal/endtoend/testdata/strict_function_checks/postgresql/stderr/base.txt ================================================ # package querytest query.sql:1:1: function "doesntexist" does not exist ================================================ FILE: internal/endtoend/testdata/strict_function_checks/postgresql/stderr/managed-db.txt ================================================ # package querytest query.sql:2:8: function doesntexist() does not exist ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { A sql.NullInt32 B sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const subqueryCalcColumn = `-- name: SubqueryCalcColumn :many SELECT sum FROM (SELECT a + b AS sum FROM foo) AS f ` func (q *Queries) SubqueryCalcColumn(ctx context.Context) ([]int32, error) { rows, err := q.db.QueryContext(ctx, subqueryCalcColumn) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var sum int32 if err := rows.Scan(&sum); err != nil { return nil, err } items = append(items, sum) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/mysql/query.sql ================================================ -- name: SubqueryCalcColumn :many SELECT sum FROM (SELECT a + b AS sum FROM foo) AS f; ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/mysql/schema.sql ================================================ CREATE TABLE foo (a int, b int); ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { A sql.NullInt32 B sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const subqueryCalcColumn = `-- name: SubqueryCalcColumn :many SELECT sum FROM (SELECT a + b AS sum FROM foo) AS f ` func (q *Queries) SubqueryCalcColumn(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(ctx, subqueryCalcColumn) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var sum int32 if err := rows.Scan(&sum); err != nil { return nil, err } items = append(items, sum) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/query.sql ================================================ -- name: SubqueryCalcColumn :many SELECT sum FROM (SELECT a + b AS sum FROM foo) AS f; ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (a int, b int); ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Foo struct { A pgtype.Int4 B pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const subqueryCalcColumn = `-- name: SubqueryCalcColumn :many SELECT sum FROM (SELECT a + b AS sum FROM foo) AS f ` func (q *Queries) SubqueryCalcColumn(ctx context.Context) ([]int32, error) { rows, err := q.db.Query(ctx, subqueryCalcColumn) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var sum int32 if err := rows.Scan(&sum); err != nil { return nil, err } items = append(items, sum) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/query.sql ================================================ -- name: SubqueryCalcColumn :many SELECT sum FROM (SELECT a + b AS sum FROM foo) AS f; ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (a int, b int); ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { A sql.NullInt32 B sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const subqueryCalcColumn = `-- name: SubqueryCalcColumn :many SELECT sum FROM (SELECT a + b AS sum FROM foo) AS f ` func (q *Queries) SubqueryCalcColumn(ctx context.Context) ([]int32, error) { rows, err := q.db.QueryContext(ctx, subqueryCalcColumn) if err != nil { return nil, err } defer rows.Close() var items []int32 for rows.Next() { var sum int32 if err := rows.Scan(&sum); err != nil { return nil, err } items = append(items, sum) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/query.sql ================================================ -- name: SubqueryCalcColumn :many SELECT sum FROM (SELECT a + b AS sum FROM foo) AS f; ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (a int, b int); ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Foo struct { A sql.NullInt64 B sql.NullInt64 } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const subqueryCalcColumn = `-- name: SubqueryCalcColumn :many SELECT sum FROM (SELECT a + b AS sum FROM foo) AS f ` func (q *Queries) SubqueryCalcColumn(ctx context.Context) ([]int64, error) { rows, err := q.db.QueryContext(ctx, subqueryCalcColumn) if err != nil { return nil, err } defer rows.Close() var items []int64 for rows.Next() { var sum int64 if err := rows.Scan(&sum); err != nil { return nil, err } items = append(items, sum) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/sqlite/query.sql ================================================ -- name: SubqueryCalcColumn :many SELECT sum FROM (SELECT a + b AS sum FROM foo) AS f; ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/sqlite/schema.sql ================================================ CREATE TABLE foo (a int, b int); ================================================ FILE: internal/endtoend/testdata/subquery_calculated_column/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/sum_type/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1106 ================================================ FILE: internal/endtoend/testdata/sum_type/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/sum_type/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/sum_type/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Order struct { ID int64 Quantity pgtype.Numeric OrderCatalog pgtype.Int4 } ================================================ FILE: internal/endtoend/testdata/sum_type/postgresql/pgx/go/query.sql.go ================================================ // 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 sumOrder = `-- name: SumOrder :one SELECT SUM(quantity) FROM orders ` func (q *Queries) SumOrder(ctx context.Context) (pgtype.Numeric, error) { row := q.db.QueryRow(ctx, sumOrder) var sum pgtype.Numeric err := row.Scan(&sum) return sum, err } ================================================ FILE: internal/endtoend/testdata/sum_type/postgresql/pgx/query.sql ================================================ -- name: SumOrder :one SELECT SUM(quantity) FROM orders; ================================================ FILE: internal/endtoend/testdata/sum_type/postgresql/pgx/schema.sql ================================================ CREATE TABLE orders ( id BIGSERIAL PRIMARY KEY, quantity decimal NOT NULL, order_catalog int ); ================================================ FILE: internal/endtoend/testdata/sum_type/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/syntax_errors/mysql/query/from.sql ================================================ /* name: TooManyFroms :one */ select id, first_name from users from where id = ?; ================================================ FILE: internal/endtoend/testdata/syntax_errors/mysql/query/select.sql ================================================ /* name: ExtraSelect :one */ select id from users where select id; ================================================ FILE: internal/endtoend/testdata/syntax_errors/mysql/query/typo.sql ================================================ /* name: MisspelledSelect :one */ selectt id, first_name from users; ================================================ FILE: internal/endtoend/testdata/syntax_errors/mysql/schema.sql ================================================ CREATE TABLE users ( id integer NOT NULL AUTO_INCREMENT PRIMARY KEY, first_name varchar(255) NOT NULL ) ENGINE=InnoDB; ================================================ FILE: internal/endtoend/testdata/syntax_errors/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query", "engine": "mysql" } ] } ================================================ FILE: internal/endtoend/testdata/syntax_errors/mysql/stderr.txt ================================================ # package querytest query/from.sql:2:38: syntax error near "from where id = ?;" query/select.sql:2:34: syntax error near "select id;" query/typo.sql:2:8: syntax error near "selectt id, first_name from users;" ================================================ FILE: internal/endtoend/testdata/syntax_errors/postgresql/query/from.sql ================================================ /* name: TooManyFroms :one */ select id, first_name from users from where id = $1; ================================================ FILE: internal/endtoend/testdata/syntax_errors/postgresql/query/select.sql ================================================ /* name: ExtraSelect :one */ select id from users where select id; ================================================ FILE: internal/endtoend/testdata/syntax_errors/postgresql/query/typo.sql ================================================ /* name: MisspelledSelect :one */ selectt id, first_name from users; ================================================ FILE: internal/endtoend/testdata/syntax_errors/postgresql/schema.sql ================================================ CREATE TABLE users ( id SERIAL PRIMARY KEY, first_name varchar(255) NOT NULL ); ================================================ FILE: internal/endtoend/testdata/syntax_errors/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "name": "querytest", "path": "go", "schema": "schema.sql", "queries": "query", "engine": "postgresql" } ] } ================================================ FILE: internal/endtoend/testdata/syntax_errors/postgresql/stderr.txt ================================================ # package querytest query/from.sql:2:35: syntax error at or near "from" query/select.sql:2:29: syntax error at or near "select" query/typo.sql:2:2: syntax error at or near "selectt" ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgtype" ) type Transaction struct { ID int64 Uri string ProgramID string Data pgtype.JSONB } ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/jackc/pgtype" ) const getTransaction = `-- name: GetTransaction :many SELECT jsonb_extract_path(transactions.data, '$.transaction.signatures[0]'), jsonb_agg(instructions.value) FROM transactions, jsonb_each(jsonb_extract_path(transactions.data, '$.transaction.message.instructions[0]')) AS instructions WHERE transactions.program_id = $1 AND jsonb_extract_path(transactions.data, '$.transaction.signatures[0]') @> to_jsonb($2::text) AND jsonb_extract_path(jsonb_extract_path(transactions.data, '$.transaction.message.accountKeys'), 'key') = to_jsonb(transactions.program_id) GROUP BY transactions.id ` type GetTransactionParams struct { ProgramID string Data string } type GetTransactionRow struct { JsonbExtractPath pgtype.JSONB JsonbAgg pgtype.JSONB } func (q *Queries) GetTransaction(ctx context.Context, arg GetTransactionParams) ([]GetTransactionRow, error) { rows, err := q.db.Query(ctx, getTransaction, arg.ProgramID, arg.Data) if err != nil { return nil, err } defer rows.Close() var items []GetTransactionRow for rows.Next() { var i GetTransactionRow if err := rows.Scan(&i.JsonbExtractPath, &i.JsonbAgg); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/pgx/v4/query.sql ================================================ /* name: GetTransaction :many */ SELECT jsonb_extract_path(transactions.data, '$.transaction.signatures[0]'), jsonb_agg(instructions.value) FROM transactions, jsonb_each(jsonb_extract_path(transactions.data, '$.transaction.message.instructions[0]')) AS instructions WHERE transactions.program_id = sqlc.arg('program_id') AND jsonb_extract_path(transactions.data, '$.transaction.signatures[0]') @> to_jsonb(sqlc.arg('data')::text) AND jsonb_extract_path(jsonb_extract_path(transactions.data, '$.transaction.message.accountKeys'), 'key') = to_jsonb(transactions.program_id) GROUP BY transactions.id; ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE transactions ( id BIGSERIAL PRIMARY KEY, uri TEXT NOT NULL, program_id TEXT NOT NULL, data JSONB NOT NULL ); ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Transaction struct { ID int64 Uri string ProgramID string Data []byte } ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getTransaction = `-- name: GetTransaction :many SELECT jsonb_extract_path(transactions.data, '$.transaction.signatures[0]'), jsonb_agg(instructions.value) FROM transactions, jsonb_each(jsonb_extract_path(transactions.data, '$.transaction.message.instructions[0]')) AS instructions WHERE transactions.program_id = $1 AND jsonb_extract_path(transactions.data, '$.transaction.signatures[0]') @> to_jsonb($2::text) AND jsonb_extract_path(jsonb_extract_path(transactions.data, '$.transaction.message.accountKeys'), 'key') = to_jsonb(transactions.program_id) GROUP BY transactions.id ` type GetTransactionParams struct { ProgramID string Data string } type GetTransactionRow struct { JsonbExtractPath []byte JsonbAgg []byte } func (q *Queries) GetTransaction(ctx context.Context, arg GetTransactionParams) ([]GetTransactionRow, error) { rows, err := q.db.Query(ctx, getTransaction, arg.ProgramID, arg.Data) if err != nil { return nil, err } defer rows.Close() var items []GetTransactionRow for rows.Next() { var i GetTransactionRow if err := rows.Scan(&i.JsonbExtractPath, &i.JsonbAgg); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/pgx/v5/query.sql ================================================ /* name: GetTransaction :many */ SELECT jsonb_extract_path(transactions.data, '$.transaction.signatures[0]'), jsonb_agg(instructions.value) FROM transactions, jsonb_each(jsonb_extract_path(transactions.data, '$.transaction.message.instructions[0]')) AS instructions WHERE transactions.program_id = sqlc.arg('program_id') AND jsonb_extract_path(transactions.data, '$.transaction.signatures[0]') @> to_jsonb(sqlc.arg('data')::text) AND jsonb_extract_path(jsonb_extract_path(transactions.data, '$.transaction.message.accountKeys'), 'key') = to_jsonb(transactions.program_id) GROUP BY transactions.id; ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE transactions ( id BIGSERIAL PRIMARY KEY, uri TEXT NOT NULL, program_id TEXT NOT NULL, data JSONB NOT NULL ); ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "encoding/json" ) type Transaction struct { ID int64 Uri string ProgramID string Data json.RawMessage } ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "encoding/json" ) const getTransaction = `-- name: GetTransaction :many SELECT jsonb_extract_path(transactions.data, '$.transaction.signatures[0]'), jsonb_agg(instructions.value) FROM transactions, jsonb_each(jsonb_extract_path(transactions.data, '$.transaction.message.instructions[0]')) AS instructions WHERE transactions.program_id = $1 AND jsonb_extract_path(transactions.data, '$.transaction.signatures[0]') @> to_jsonb($2::text) AND jsonb_extract_path(jsonb_extract_path(transactions.data, '$.transaction.message.accountKeys'), 'key') = to_jsonb(transactions.program_id) GROUP BY transactions.id ` type GetTransactionParams struct { ProgramID string Data string } type GetTransactionRow struct { JsonbExtractPath json.RawMessage JsonbAgg json.RawMessage } func (q *Queries) GetTransaction(ctx context.Context, arg GetTransactionParams) ([]GetTransactionRow, error) { rows, err := q.db.QueryContext(ctx, getTransaction, arg.ProgramID, arg.Data) if err != nil { return nil, err } defer rows.Close() var items []GetTransactionRow for rows.Next() { var i GetTransactionRow if err := rows.Scan(&i.JsonbExtractPath, &i.JsonbAgg); 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 } ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/stdlib/query.sql ================================================ /* name: GetTransaction :many */ SELECT jsonb_extract_path(transactions.data, '$.transaction.signatures[0]'), jsonb_agg(instructions.value) FROM transactions, jsonb_each(jsonb_extract_path(transactions.data, '$.transaction.message.instructions[0]')) AS instructions WHERE transactions.program_id = sqlc.arg('program_id') AND jsonb_extract_path(transactions.data, '$.transaction.signatures[0]') @> to_jsonb(sqlc.arg('data')::text) AND jsonb_extract_path(jsonb_extract_path(transactions.data, '$.transaction.message.accountKeys'), 'key') = to_jsonb(transactions.program_id) GROUP BY transactions.id; ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/stdlib/schema.sql ================================================ CREATE TABLE transactions ( id BIGSERIAL PRIMARY KEY, uri TEXT NOT NULL, program_id TEXT NOT NULL, data JSONB NOT NULL ); ================================================ FILE: internal/endtoend/testdata/table_function/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/table_function/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/table_function/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Transaction struct { Uri string ProgramID string Data string } ================================================ FILE: internal/endtoend/testdata/table_function/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getTransaction = `-- name: GetTransaction :many SELECT json_extract(transactions.data, '$.transaction.signatures[0]'), json_group_array(instructions.value) FROM transactions, json_each(json_extract(transactions.data, '$.transaction.message.instructions')) AS instructions WHERE transactions.program_id = ? AND json_extract(transactions.data, '$.transaction.signatures[0]') > ? AND json_extract(json_extract(transactions.data, '$.transaction.message.accountKeys'), '$[' || json_extract(instructions.value, '$.programIdIndex') || ']') = transactions.program_id GROUP BY transactions.rowid LIMIT ? ` type GetTransactionParams struct { ProgramID string Data string Limit int64 } type GetTransactionRow struct { JsonExtract interface{} JsonGroupArray interface{} } func (q *Queries) GetTransaction(ctx context.Context, arg GetTransactionParams) ([]GetTransactionRow, error) { rows, err := q.db.QueryContext(ctx, getTransaction, arg.ProgramID, arg.Data, arg.Limit) if err != nil { return nil, err } defer rows.Close() var items []GetTransactionRow for rows.Next() { var i GetTransactionRow if err := rows.Scan(&i.JsonExtract, &i.JsonGroupArray); 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 } ================================================ FILE: internal/endtoend/testdata/table_function/sqlite/query.sql ================================================ /* name: GetTransaction :many */ SELECT json_extract(transactions.data, '$.transaction.signatures[0]'), json_group_array(instructions.value) FROM transactions, json_each(json_extract(transactions.data, '$.transaction.message.instructions')) AS instructions WHERE transactions.program_id = ? AND json_extract(transactions.data, '$.transaction.signatures[0]') > ? AND json_extract(json_extract(transactions.data, '$.transaction.message.accountKeys'), '$[' || json_extract(instructions.value, '$.programIdIndex') || ']') = transactions.program_id GROUP BY transactions.rowid LIMIT ?; ================================================ FILE: internal/endtoend/testdata/table_function/sqlite/schema.sql ================================================ CREATE TABLE transactions ( uri text NOT NULL, program_id text NOT NULL, data text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/table_function/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/table_name_case_sensitivity/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/table_name_case_sensitivity/sqlite/go/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/table_name_case_sensitivity/sqlite/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/table_name_case_sensitivity/sqlite/query.sql ================================================ -- 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 = ?; ================================================ FILE: internal/endtoend/testdata/table_name_case_sensitivity/sqlite/schema.sql ================================================ -- 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"; ================================================ FILE: internal/endtoend/testdata/table_name_case_sensitivity/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/truncate/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/truncate/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID uint64 } ================================================ FILE: internal/endtoend/testdata/truncate/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const truncate = `-- name: Truncate :exec TRUNCATE bar ` func (q *Queries) Truncate(ctx context.Context) error { _, err := q.db.ExecContext(ctx, truncate) return err } ================================================ FILE: internal/endtoend/testdata/truncate/mysql/query.sql ================================================ -- name: Truncate :exec TRUNCATE bar; ================================================ FILE: internal/endtoend/testdata/truncate/mysql/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/truncate/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const truncate = `-- name: Truncate :exec TRUNCATE bar ` func (q *Queries) Truncate(ctx context.Context) error { _, err := q.db.Exec(ctx, truncate) return err } ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/pgx/v4/query.sql ================================================ -- name: Truncate :exec TRUNCATE bar; ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const truncate = `-- name: Truncate :exec TRUNCATE bar ` func (q *Queries) Truncate(ctx context.Context) error { _, err := q.db.Exec(ctx, truncate) return err } ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/pgx/v5/query.sql ================================================ -- name: Truncate :exec TRUNCATE bar; ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Bar struct { ID int32 } ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const truncate = `-- name: Truncate :exec TRUNCATE bar ` func (q *Queries) Truncate(ctx context.Context) error { _, err := q.db.ExecContext(ctx, truncate) return err } ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/stdlib/query.sql ================================================ -- name: Truncate :exec TRUNCATE bar; ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/stdlib/schema.sql ================================================ CREATE TABLE bar (id serial not null); ================================================ FILE: internal/endtoend/testdata/truncate/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/types_uuid/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/types_uuid/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "github.com/google/uuid" ) type Foo struct { Description sql.NullString Bar uuid.NullUUID Baz uuid.UUID } ================================================ FILE: internal/endtoend/testdata/types_uuid/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/google/uuid" ) const find = `-- name: Find :one SELECT bar FROM foo WHERE baz = $1 ` func (q *Queries) Find(ctx context.Context, baz uuid.UUID) (uuid.NullUUID, error) { row := q.db.QueryRowContext(ctx, find, baz) var bar uuid.NullUUID err := row.Scan(&bar) return bar, err } const list = `-- name: List :many SELECT description, bar, baz FROM foo ` func (q *Queries) List(ctx context.Context) ([]Foo, error) { rows, err := q.db.QueryContext(ctx, list) if err != nil { return nil, err } defer rows.Close() var items []Foo for rows.Next() { var i Foo if err := rows.Scan(&i.Description, &i.Bar, &i.Baz); 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 } ================================================ FILE: internal/endtoend/testdata/types_uuid/postgresql/stdlib/query.sql ================================================ -- name: List :many SELECT * FROM foo; -- name: Find :one SELECT bar FROM foo WHERE baz = $1; ================================================ FILE: internal/endtoend/testdata/types_uuid/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo ( description text, bar uuid, baz uuid not null ); ================================================ FILE: internal/endtoend/testdata/types_uuid/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/unknown_func/pganalyze/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/unknown_func/pganalyze/query.sql ================================================ -- name: ListFoos :one SELECT id FROM foo WHERE id = frobnicate($1); ================================================ FILE: internal/endtoend/testdata/unknown_func/pganalyze/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/unknown_func/pganalyze/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/unknown_func/pganalyze/stderr.txt ================================================ # package querytest query.sql:2:31: function frobnicate(unknown) does not exist ================================================ FILE: internal/endtoend/testdata/unknown_func/pgx/v4/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/unknown_func/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/unknown_func/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/unknown_func/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listFoos = `-- name: ListFoos :one SELECT id FROM foo WHERE id = frobnicate($1) ` func (q *Queries) ListFoos(ctx context.Context, frobnicate interface{}) (string, error) { row := q.db.QueryRow(ctx, listFoos, frobnicate) var id string err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/unknown_func/pgx/v4/query.sql ================================================ -- name: ListFoos :one SELECT id FROM foo WHERE id = frobnicate($1); ================================================ FILE: internal/endtoend/testdata/unknown_func/pgx/v4/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/unknown_func/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/unknown_func/pgx/v5/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/unknown_func/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/unknown_func/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/unknown_func/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listFoos = `-- name: ListFoos :one SELECT id FROM foo WHERE id = frobnicate($1) ` func (q *Queries) ListFoos(ctx context.Context, frobnicate interface{}) (string, error) { row := q.db.QueryRow(ctx, listFoos, frobnicate) var id string err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/unknown_func/pgx/v5/query.sql ================================================ -- name: ListFoos :one SELECT id FROM foo WHERE id = frobnicate($1); ================================================ FILE: internal/endtoend/testdata/unknown_func/pgx/v5/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/unknown_func/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/unknown_func/stdlib/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/unknown_func/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/unknown_func/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID string } ================================================ FILE: internal/endtoend/testdata/unknown_func/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const listFoos = `-- name: ListFoos :one SELECT id FROM foo WHERE id = frobnicate($1) ` func (q *Queries) ListFoos(ctx context.Context, frobnicate interface{}) (string, error) { row := q.db.QueryRowContext(ctx, listFoos, frobnicate) var id string err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/unknown_func/stdlib/query.sql ================================================ -- name: ListFoos :one SELECT id FROM foo WHERE id = frobnicate($1); ================================================ FILE: internal/endtoend/testdata/unknown_func/stdlib/schema.sql ================================================ CREATE TABLE foo (id text not null); ================================================ FILE: internal/endtoend/testdata/unknown_func/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "time" "github.com/google/uuid" ) type Memory struct { ID uuid.UUID VampireID uuid.UUID CreatedAt time.Time UpdatedAt sql.NullTime } type Vampire struct { ID uuid.UUID } ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" "github.com/google/uuid" ) type Querier interface { CreateMemories(ctx context.Context, vampireID []uuid.UUID) ([]Memory, error) GetVampireIDs(ctx context.Context, vampireID []uuid.UUID) ([]uuid.UUID, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/google/uuid" ) const createMemories = `-- name: CreateMemories :many INSERT INTO memories (vampire_id) SELECT unnest($1::uuid[]) AS vampire_id RETURNING id, vampire_id, created_at, updated_at ` func (q *Queries) CreateMemories(ctx context.Context, vampireID []uuid.UUID) ([]Memory, error) { rows, err := q.db.Query(ctx, createMemories, vampireID) if err != nil { return nil, err } defer rows.Close() var items []Memory for rows.Next() { var i Memory if err := rows.Scan( &i.ID, &i.VampireID, &i.CreatedAt, &i.UpdatedAt, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getVampireIDs = `-- name: GetVampireIDs :many SELECT vampires.id::uuid FROM unnest($1::uuid[]) AS vampires (id) ` func (q *Queries) GetVampireIDs(ctx context.Context, vampireID []uuid.UUID) ([]uuid.UUID, error) { rows, err := q.db.Query(ctx, getVampireIDs, vampireID) if err != nil { return nil, err } defer rows.Close() var items []uuid.UUID for rows.Next() { var vampires_id uuid.UUID if err := rows.Scan(&vampires_id); err != nil { return nil, err } items = append(items, vampires_id) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/pgx/v4/query.sql ================================================ -- name: CreateMemories :many INSERT INTO memories (vampire_id) SELECT unnest(@vampire_id::uuid[]) AS vampire_id RETURNING *; -- name: GetVampireIDs :many SELECT vampires.id::uuid FROM unnest(@vampire_id::uuid[]) AS vampires (id); ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE vampires ( id uuid PRIMARY KEY DEFAULT gen_random_uuid () ); CREATE TABLE memories ( id uuid PRIMARY KEY DEFAULT gen_random_uuid (), vampire_id uuid REFERENCES vampires (id) NOT NULL, created_at timestamp NOT NULL DEFAULT NOW(), updated_at timestamp ); ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Memory struct { ID pgtype.UUID VampireID pgtype.UUID CreatedAt pgtype.Timestamp UpdatedAt pgtype.Timestamp } type Vampire struct { ID pgtype.UUID } ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" "github.com/jackc/pgx/v5/pgtype" ) type Querier interface { CreateMemories(ctx context.Context, vampireID []pgtype.UUID) ([]Memory, error) GetVampireIDs(ctx context.Context, vampireID []pgtype.UUID) ([]pgtype.UUID, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/pgx/v5/go/query.sql.go ================================================ // 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 createMemories = `-- name: CreateMemories :many INSERT INTO memories (vampire_id) SELECT unnest($1::uuid[]) AS vampire_id RETURNING id, vampire_id, created_at, updated_at ` func (q *Queries) CreateMemories(ctx context.Context, vampireID []pgtype.UUID) ([]Memory, error) { rows, err := q.db.Query(ctx, createMemories, vampireID) if err != nil { return nil, err } defer rows.Close() var items []Memory for rows.Next() { var i Memory if err := rows.Scan( &i.ID, &i.VampireID, &i.CreatedAt, &i.UpdatedAt, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const getVampireIDs = `-- name: GetVampireIDs :many SELECT vampires.id::uuid FROM unnest($1::uuid[]) AS vampires (id) ` func (q *Queries) GetVampireIDs(ctx context.Context, vampireID []pgtype.UUID) ([]pgtype.UUID, error) { rows, err := q.db.Query(ctx, getVampireIDs, vampireID) if err != nil { return nil, err } defer rows.Close() var items []pgtype.UUID for rows.Next() { var vampires_id pgtype.UUID if err := rows.Scan(&vampires_id); err != nil { return nil, err } items = append(items, vampires_id) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/pgx/v5/query.sql ================================================ -- name: CreateMemories :many INSERT INTO memories (vampire_id) SELECT unnest(@vampire_id::uuid[]) AS vampire_id RETURNING *; -- name: GetVampireIDs :many SELECT vampires.id::uuid FROM unnest(@vampire_id::uuid[]) AS vampires (id); ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE vampires ( id uuid PRIMARY KEY DEFAULT gen_random_uuid () ); CREATE TABLE memories ( id uuid PRIMARY KEY DEFAULT gen_random_uuid (), vampire_id uuid REFERENCES vampires (id) NOT NULL, created_at timestamp NOT NULL DEFAULT NOW(), updated_at timestamp ); ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "time" "github.com/google/uuid" ) type Memory struct { ID uuid.UUID VampireID uuid.UUID CreatedAt time.Time UpdatedAt sql.NullTime } type Vampire struct { ID uuid.UUID } ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/stdlib/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" "github.com/google/uuid" ) type Querier interface { CreateMemories(ctx context.Context, vampireID []uuid.UUID) ([]Memory, error) GetVampireIDs(ctx context.Context, vampireID []uuid.UUID) ([]uuid.UUID, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "github.com/google/uuid" "github.com/lib/pq" ) const createMemories = `-- name: CreateMemories :many INSERT INTO memories (vampire_id) SELECT unnest($1::uuid[]) AS vampire_id RETURNING id, vampire_id, created_at, updated_at ` func (q *Queries) CreateMemories(ctx context.Context, vampireID []uuid.UUID) ([]Memory, error) { rows, err := q.db.QueryContext(ctx, createMemories, pq.Array(vampireID)) if err != nil { return nil, err } defer rows.Close() var items []Memory for rows.Next() { var i Memory if err := rows.Scan( &i.ID, &i.VampireID, &i.CreatedAt, &i.UpdatedAt, ); 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 getVampireIDs = `-- name: GetVampireIDs :many SELECT vampires.id::uuid FROM unnest($1::uuid[]) AS vampires (id) ` func (q *Queries) GetVampireIDs(ctx context.Context, vampireID []uuid.UUID) ([]uuid.UUID, error) { rows, err := q.db.QueryContext(ctx, getVampireIDs, pq.Array(vampireID)) if err != nil { return nil, err } defer rows.Close() var items []uuid.UUID for rows.Next() { var vampires_id uuid.UUID if err := rows.Scan(&vampires_id); err != nil { return nil, err } items = append(items, vampires_id) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/stdlib/query.sql ================================================ -- name: CreateMemories :many INSERT INTO memories (vampire_id) SELECT unnest(@vampire_id::uuid[]) AS vampire_id RETURNING *; -- name: GetVampireIDs :many SELECT vampires.id::uuid FROM unnest(@vampire_id::uuid[]) AS vampires (id); ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/stdlib/schema.sql ================================================ CREATE TABLE vampires ( id uuid PRIMARY KEY DEFAULT gen_random_uuid () ); CREATE TABLE memories ( id uuid PRIMARY KEY DEFAULT gen_random_uuid (), vampire_id uuid REFERENCES vampires (id) NOT NULL, created_at timestamp NOT NULL DEFAULT NOW(), updated_at timestamp ); ================================================ FILE: internal/endtoend/testdata/unnest/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/unnest_star/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1185 ================================================ FILE: internal/endtoend/testdata/unnest_star/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/unnest_star/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/unnest_star/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Item struct { ItemID int64 } type Plan struct { PlanID int64 } type PlanItem struct { PlanItemID int64 PlanID int64 ItemID int64 } ================================================ FILE: internal/endtoend/testdata/unnest_star/postgresql/pgx/go/query.sql.go ================================================ // 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 getPlanItems = `-- name: GetPlanItems :many SELECT p.plan_id, p.item_id FROM (SELECT unnest FROM unnest($1::bigint[])) AS i(req_item_id), LATERAL ( SELECT plan_id, item_id FROM plan_items WHERE item_id = i.req_item_id AND ($2 = 0 OR plan_id < $2) ORDER BY plan_id DESC LIMIT $3 ) p ` type GetPlanItemsParams struct { Ids []int64 After pgtype.Int4 LimitCount int64 } type GetPlanItemsRow struct { PlanID int64 ItemID int64 } func (q *Queries) GetPlanItems(ctx context.Context, arg GetPlanItemsParams) ([]GetPlanItemsRow, error) { rows, err := q.db.Query(ctx, getPlanItems, arg.Ids, arg.After, arg.LimitCount) if err != nil { return nil, err } defer rows.Close() var items []GetPlanItemsRow for rows.Next() { var i GetPlanItemsRow if err := rows.Scan(&i.PlanID, &i.ItemID); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/unnest_star/postgresql/pgx/query.sql ================================================ -- name: GetPlanItems :many SELECT p.plan_id, p.item_id FROM (SELECT * FROM unnest(@ids::bigint[])) AS i(req_item_id), LATERAL ( SELECT plan_id, item_id FROM plan_items WHERE item_id = i.req_item_id AND (@after = 0 OR plan_id < @after) ORDER BY plan_id DESC LIMIT @limit_count ) p; ================================================ FILE: internal/endtoend/testdata/unnest_star/postgresql/pgx/schema.sql ================================================ create table plans ( plan_id bigint generated by default as identity primary key ); create table items ( item_id bigint generated by default as identity primary key ); create table plan_items ( plan_item_id bigint generated by default as identity primary key, plan_id bigint not null REFERENCES plans, item_id bigint not null REFERENCES items ); ================================================ FILE: internal/endtoend/testdata/unnest_star/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type ArrayValue struct { ID int64 Values []string } ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { GetValues(ctx context.Context) ([]GetValuesRow, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getValues = `-- name: GetValues :many SELECT id, index::bigint, value::text FROM array_values AS x, unnest(values) WITH ORDINALITY AS y (value, index) ` type GetValuesRow struct { ID int64 Index int64 Value string } func (q *Queries) GetValues(ctx context.Context) ([]GetValuesRow, error) { rows, err := q.db.Query(ctx, getValues) if err != nil { return nil, err } defer rows.Close() var items []GetValuesRow for rows.Next() { var i GetValuesRow if err := rows.Scan(&i.ID, &i.Index, &i.Value); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/query.sql ================================================ -- name: GetValues :many SELECT id, index::bigint, value::text FROM array_values AS x, unnest(values) WITH ORDINALITY AS y (value, index); ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE array_values ( id bigserial PRIMARY KEY, values text[] NOT NULL ); ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type ArrayValue struct { ID int64 Values []string } ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { GetValues(ctx context.Context) ([]GetValuesRow, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getValues = `-- name: GetValues :many SELECT id, index::bigint, value::text FROM array_values AS x, unnest(values) WITH ORDINALITY AS y (value, index) ` type GetValuesRow struct { ID int64 Index int64 Value string } func (q *Queries) GetValues(ctx context.Context) ([]GetValuesRow, error) { rows, err := q.db.Query(ctx, getValues) if err != nil { return nil, err } defer rows.Close() var items []GetValuesRow for rows.Next() { var i GetValuesRow if err := rows.Scan(&i.ID, &i.Index, &i.Value); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/query.sql ================================================ -- name: GetValues :many SELECT id, index::bigint, value::text FROM array_values AS x, unnest(values) WITH ORDINALITY AS y (value, index); ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE array_values ( id bigserial PRIMARY KEY, values text[] NOT NULL ); ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type ArrayValue struct { ID int64 Values []string } ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/querier.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "context" ) type Querier interface { GetValues(ctx context.Context) ([]GetValuesRow, error) } var _ Querier = (*Queries)(nil) ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getValues = `-- name: GetValues :many SELECT id, index::bigint, value::text FROM array_values AS x, unnest(values) WITH ORDINALITY AS y (value, index) ` type GetValuesRow struct { ID int64 Index int64 Value string } func (q *Queries) GetValues(ctx context.Context) ([]GetValuesRow, error) { rows, err := q.db.QueryContext(ctx, getValues) if err != nil { return nil, err } defer rows.Close() var items []GetValuesRow for rows.Next() { var i GetValuesRow if err := rows.Scan(&i.ID, &i.Index, &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 } ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/query.sql ================================================ -- name: GetValues :many SELECT id, index::bigint, value::text FROM array_values AS x, unnest(values) WITH ORDINALITY AS y (value, index); ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/schema.sql ================================================ CREATE TABLE array_values ( id bigserial PRIMARY KEY, values text[] NOT NULL ); ================================================ FILE: internal/endtoend/testdata/unnest_with_ordinality/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql", "emit_interface": true } ] } ================================================ FILE: internal/endtoend/testdata/unsigned_params/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/unsigned_params/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { ID uint32 } ================================================ FILE: internal/endtoend/testdata/unsigned_params/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const createFoo = `-- name: CreateFoo :exec INSERT INTO foo (id) VALUES (?) ` func (q *Queries) CreateFoo(ctx context.Context, id uint32) error { _, err := q.db.ExecContext(ctx, createFoo, id) return err } ================================================ FILE: internal/endtoend/testdata/unsigned_params/mysql/query.sql ================================================ -- name: CreateFoo :exec INSERT INTO foo (id) VALUES (?); ================================================ FILE: internal/endtoend/testdata/unsigned_params/mysql/schema.sql ================================================ CREATE TABLE foo (id INT UNSIGNED NOT NULL); ================================================ FILE: internal/endtoend/testdata/unsigned_params/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db type Repro struct { ID interface{} Name interface{} Seq interface{} } ================================================ FILE: internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const getRepro = `-- name: GetRepro :one select id, name, seq from repro where id = ? limit 1 ` func (q *Queries) GetRepro(ctx context.Context, id interface{}) (Repro, error) { row := q.db.QueryRowContext(ctx, getRepro, id) var i Repro err := row.Scan(&i.ID, &i.Name, &i.Seq) return i, err } ================================================ FILE: internal/endtoend/testdata/untyped_columns/sqlite/stdlib/query.sql ================================================ -- name: GetRepro :one select * from repro where id = ? limit 1; ================================================ FILE: internal/endtoend/testdata/untyped_columns/sqlite/stdlib/schema.sql ================================================ -- original table name in sqlite schema was sqlite_sequence, rest of def is identical create table repro(id, name, seq); ================================================ FILE: internal/endtoend/testdata/untyped_columns/sqlite/stdlib/sqlc.json ================================================ { "version": "2", "sql": [ { "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "gen": { "go": { "package": "db", "out": "db" } } } ] } ================================================ FILE: internal/endtoend/testdata/update_array_index/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1532 ================================================ FILE: internal/endtoend/testdata/update_array_index/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/update_array_index/postgresql/pgx/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_array_index/postgresql/pgx/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Author struct { ID int64 Names []string } ================================================ FILE: internal/endtoend/testdata/update_array_index/postgresql/pgx/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const updateAuthor = `-- name: UpdateAuthor :one update authors set names[$1] = $2 where id=$3 RETURNING id, names ` type UpdateAuthorParams struct { Names int32 Names_2 string ID int64 } func (q *Queries) UpdateAuthor(ctx context.Context, arg UpdateAuthorParams) (Author, error) { row := q.db.QueryRow(ctx, updateAuthor, arg.Names, arg.Names_2, arg.ID) var i Author err := row.Scan(&i.ID, &i.Names) return i, err } ================================================ FILE: internal/endtoend/testdata/update_array_index/postgresql/pgx/query.sql ================================================ -- name: UpdateAuthor :one update authors set names[$1] = $2 where id=$3 RETURNING *; ================================================ FILE: internal/endtoend/testdata/update_array_index/postgresql/pgx/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, names text[] NOT NULL ); ================================================ FILE: internal/endtoend/testdata/update_array_index/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/update_cte/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_cte/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "time" ) type Td3Code struct { ID int32 TsCreated time.Time TsUpdated time.Time CreatedBy string UpdatedBy string Code sql.NullString Hash sql.NullString IsPrivate sql.NullBool } type Td3TestCode struct { ID int32 TsCreated time.Time TsUpdated time.Time CreatedBy string UpdatedBy string TestID int32 CodeHash string } ================================================ FILE: internal/endtoend/testdata/update_cte/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "time" ) const updateCode = `-- name: UpdateCode :one WITH cc AS ( UPDATE td3.codes SET created_by = $1, updated_by = $1, code = $2, hash = $3, is_private = false RETURNING hash ) UPDATE td3.test_codes SET created_by = $1, updated_by = $1, test_id = $4, code_hash = cc.hash FROM cc RETURNING hash, id, ts_created, ts_updated, created_by, updated_by, test_id, code_hash ` type UpdateCodeParams struct { CreatedBy string Code sql.NullString Hash sql.NullString TestID int32 } type UpdateCodeRow struct { Hash sql.NullString ID int32 TsCreated time.Time TsUpdated time.Time CreatedBy string UpdatedBy string TestID int32 CodeHash string } func (q *Queries) UpdateCode(ctx context.Context, arg UpdateCodeParams) (UpdateCodeRow, error) { row := q.db.QueryRow(ctx, updateCode, arg.CreatedBy, arg.Code, arg.Hash, arg.TestID, ) var i UpdateCodeRow err := row.Scan( &i.Hash, &i.ID, &i.TsCreated, &i.TsUpdated, &i.CreatedBy, &i.UpdatedBy, &i.TestID, &i.CodeHash, ) return i, err } ================================================ FILE: internal/endtoend/testdata/update_cte/pgx/v4/query.sql ================================================ -- name: UpdateCode :one WITH cc AS ( UPDATE td3.codes SET created_by = $1, updated_by = $1, code = $2, hash = $3, is_private = false RETURNING hash ) UPDATE td3.test_codes SET created_by = $1, updated_by = $1, test_id = $4, code_hash = cc.hash FROM cc RETURNING *; ================================================ FILE: internal/endtoend/testdata/update_cte/pgx/v4/schema.sql ================================================ -- FILE: schema.sql DROP SCHEMA IF EXISTS td3 CASCADE; CREATE SCHEMA td3; CREATE TABLE td3.codes ( id SERIAL PRIMARY KEY, ts_created timestamptz DEFAULT now() NOT NULL, ts_updated timestamptz DEFAULT now() NOT NULL, created_by text NOT NULL, updated_by text NOT NULL, code text, hash text, is_private boolean ); CREATE TABLE td3.test_codes ( id SERIAL PRIMARY KEY, ts_created timestamptz DEFAULT now() NOT NULL, ts_updated timestamptz DEFAULT now() NOT NULL, created_by text NOT NULL, updated_by text NOT NULL, test_id integer NOT NULL, code_hash text NOT NULL ); -- FILE: query.sql ================================================ FILE: internal/endtoend/testdata/update_cte/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_cte/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_cte/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "github.com/jackc/pgx/v5/pgtype" ) type Td3Code struct { ID int32 TsCreated pgtype.Timestamptz TsUpdated pgtype.Timestamptz CreatedBy string UpdatedBy string Code pgtype.Text Hash pgtype.Text IsPrivate pgtype.Bool } type Td3TestCode struct { ID int32 TsCreated pgtype.Timestamptz TsUpdated pgtype.Timestamptz CreatedBy string UpdatedBy string TestID int32 CodeHash string } ================================================ FILE: internal/endtoend/testdata/update_cte/pgx/v5/go/query.sql.go ================================================ // 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 updateCode = `-- name: UpdateCode :one WITH cc AS ( UPDATE td3.codes SET created_by = $1, updated_by = $1, code = $2, hash = $3, is_private = false RETURNING hash ) UPDATE td3.test_codes SET created_by = $1, updated_by = $1, test_id = $4, code_hash = cc.hash FROM cc RETURNING hash, id, ts_created, ts_updated, created_by, updated_by, test_id, code_hash ` type UpdateCodeParams struct { CreatedBy string Code pgtype.Text Hash pgtype.Text TestID int32 } type UpdateCodeRow struct { Hash pgtype.Text ID int32 TsCreated pgtype.Timestamptz TsUpdated pgtype.Timestamptz CreatedBy string UpdatedBy string TestID int32 CodeHash string } func (q *Queries) UpdateCode(ctx context.Context, arg UpdateCodeParams) (UpdateCodeRow, error) { row := q.db.QueryRow(ctx, updateCode, arg.CreatedBy, arg.Code, arg.Hash, arg.TestID, ) var i UpdateCodeRow err := row.Scan( &i.Hash, &i.ID, &i.TsCreated, &i.TsUpdated, &i.CreatedBy, &i.UpdatedBy, &i.TestID, &i.CodeHash, ) return i, err } ================================================ FILE: internal/endtoend/testdata/update_cte/pgx/v5/query.sql ================================================ -- name: UpdateCode :one WITH cc AS ( UPDATE td3.codes SET created_by = $1, updated_by = $1, code = $2, hash = $3, is_private = false RETURNING hash ) UPDATE td3.test_codes SET created_by = $1, updated_by = $1, test_id = $4, code_hash = cc.hash FROM cc RETURNING *; ================================================ FILE: internal/endtoend/testdata/update_cte/pgx/v5/schema.sql ================================================ -- FILE: schema.sql DROP SCHEMA IF EXISTS td3 CASCADE; CREATE SCHEMA td3; CREATE TABLE td3.codes ( id SERIAL PRIMARY KEY, ts_created timestamptz DEFAULT now() NOT NULL, ts_updated timestamptz DEFAULT now() NOT NULL, created_by text NOT NULL, updated_by text NOT NULL, code text, hash text, is_private boolean ); CREATE TABLE td3.test_codes ( id SERIAL PRIMARY KEY, ts_created timestamptz DEFAULT now() NOT NULL, ts_updated timestamptz DEFAULT now() NOT NULL, created_by text NOT NULL, updated_by text NOT NULL, test_id integer NOT NULL, code_hash text NOT NULL ); -- FILE: query.sql ================================================ FILE: internal/endtoend/testdata/update_cte/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_cte/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_cte/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "time" ) type Td3Code struct { ID int32 TsCreated time.Time TsUpdated time.Time CreatedBy string UpdatedBy string Code sql.NullString Hash sql.NullString IsPrivate sql.NullBool } type Td3TestCode struct { ID int32 TsCreated time.Time TsUpdated time.Time CreatedBy string UpdatedBy string TestID int32 CodeHash string } ================================================ FILE: internal/endtoend/testdata/update_cte/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "time" ) const updateCode = `-- name: UpdateCode :one WITH cc AS ( UPDATE td3.codes SET created_by = $1, updated_by = $1, code = $2, hash = $3, is_private = false RETURNING hash ) UPDATE td3.test_codes SET created_by = $1, updated_by = $1, test_id = $4, code_hash = cc.hash FROM cc RETURNING hash, id, ts_created, ts_updated, created_by, updated_by, test_id, code_hash ` type UpdateCodeParams struct { CreatedBy string Code sql.NullString Hash sql.NullString TestID int32 } type UpdateCodeRow struct { Hash sql.NullString ID int32 TsCreated time.Time TsUpdated time.Time CreatedBy string UpdatedBy string TestID int32 CodeHash string } func (q *Queries) UpdateCode(ctx context.Context, arg UpdateCodeParams) (UpdateCodeRow, error) { row := q.db.QueryRowContext(ctx, updateCode, arg.CreatedBy, arg.Code, arg.Hash, arg.TestID, ) var i UpdateCodeRow err := row.Scan( &i.Hash, &i.ID, &i.TsCreated, &i.TsUpdated, &i.CreatedBy, &i.UpdatedBy, &i.TestID, &i.CodeHash, ) return i, err } ================================================ FILE: internal/endtoend/testdata/update_cte/stdlib/query.sql ================================================ -- name: UpdateCode :one WITH cc AS ( UPDATE td3.codes SET created_by = $1, updated_by = $1, code = $2, hash = $3, is_private = false RETURNING hash ) UPDATE td3.test_codes SET created_by = $1, updated_by = $1, test_id = $4, code_hash = cc.hash FROM cc RETURNING *; ================================================ FILE: internal/endtoend/testdata/update_cte/stdlib/schema.sql ================================================ -- FILE: schema.sql DROP SCHEMA IF EXISTS td3 CASCADE; CREATE SCHEMA td3; CREATE TABLE td3.codes ( id SERIAL PRIMARY KEY, ts_created timestamptz DEFAULT now() NOT NULL, ts_updated timestamptz DEFAULT now() NOT NULL, created_by text NOT NULL, updated_by text NOT NULL, code text, hash text, is_private boolean ); CREATE TABLE td3.test_codes ( id SERIAL PRIMARY KEY, ts_created timestamptz DEFAULT now() NOT NULL, ts_updated timestamptz DEFAULT now() NOT NULL, created_by text NOT NULL, updated_by text NOT NULL, test_id integer NOT NULL, code_hash text NOT NULL ); -- FILE: query.sql ================================================ FILE: internal/endtoend/testdata/update_cte/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_inner_join/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_inner_join/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db import ( "database/sql" ) type X struct { A sql.NullString B sql.NullString } type Y struct { A sql.NullString B sql.NullString } ================================================ FILE: internal/endtoend/testdata/update_inner_join/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const updateXWithY = `-- name: UpdateXWithY :exec UPDATE x INNER JOIN y ON y.a = x.a SET x.b = y.b ` func (q *Queries) UpdateXWithY(ctx context.Context) error { _, err := q.db.ExecContext(ctx, updateXWithY) return err } ================================================ FILE: internal/endtoend/testdata/update_inner_join/query.sql ================================================ -- name: UpdateXWithY :exec UPDATE x INNER JOIN y ON y.a = x.a SET x.b = y.b; ================================================ FILE: internal/endtoend/testdata/update_inner_join/schema.sql ================================================ CREATE TABLE x ( a text, b text ); CREATE TABLE y ( a text, b text ); ================================================ FILE: internal/endtoend/testdata/update_inner_join/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "db", "engine": "mysql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_join/mysql/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_join/mysql/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db type JoinTable struct { ID uint64 PrimaryTableID uint64 OtherTableID uint64 IsActive bool } type PrimaryTable struct { ID uint64 UserID uint64 } ================================================ FILE: internal/endtoend/testdata/update_join/mysql/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const updateJoin = `-- name: UpdateJoin :exec UPDATE join_table as jt JOIN primary_table as pt ON jt.primary_table_id = pt.id SET jt.is_active = ? WHERE jt.id = ? AND pt.user_id = ? ` type UpdateJoinParams struct { IsActive bool ID uint64 UserID uint64 } func (q *Queries) UpdateJoin(ctx context.Context, arg UpdateJoinParams) error { _, err := q.db.ExecContext(ctx, updateJoin, arg.IsActive, arg.ID, arg.UserID) return err } const updateLeftJoin = `-- name: UpdateLeftJoin :exec UPDATE join_table as jt LEFT JOIN primary_table as pt ON jt.primary_table_id = pt.id SET jt.is_active = ? WHERE jt.id = ? AND pt.user_id = ? ` type UpdateLeftJoinParams struct { IsActive bool ID uint64 UserID uint64 } func (q *Queries) UpdateLeftJoin(ctx context.Context, arg UpdateLeftJoinParams) error { _, err := q.db.ExecContext(ctx, updateLeftJoin, arg.IsActive, arg.ID, arg.UserID) return err } const updateRightJoin = `-- name: UpdateRightJoin :exec UPDATE join_table as jt RIGHT JOIN primary_table as pt ON jt.primary_table_id = pt.id SET jt.is_active = ? WHERE jt.id = ? AND pt.user_id = ? ` type UpdateRightJoinParams struct { IsActive bool ID uint64 UserID uint64 } func (q *Queries) UpdateRightJoin(ctx context.Context, arg UpdateRightJoinParams) error { _, err := q.db.ExecContext(ctx, updateRightJoin, arg.IsActive, arg.ID, arg.UserID) return err } ================================================ FILE: internal/endtoend/testdata/update_join/mysql/query.sql ================================================ -- name: UpdateJoin :exec UPDATE join_table as jt JOIN primary_table as pt ON jt.primary_table_id = pt.id SET jt.is_active = ? WHERE jt.id = ? AND pt.user_id = ?; -- name: UpdateLeftJoin :exec UPDATE join_table as jt LEFT JOIN primary_table as pt ON jt.primary_table_id = pt.id SET jt.is_active = ? WHERE jt.id = ? AND pt.user_id = ?; -- name: UpdateRightJoin :exec UPDATE join_table as jt RIGHT JOIN primary_table as pt ON jt.primary_table_id = pt.id SET jt.is_active = ? WHERE jt.id = ? AND pt.user_id = ?; ================================================ FILE: internal/endtoend/testdata/update_join/mysql/schema.sql ================================================ CREATE TABLE primary_table ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, user_id bigint(20) unsigned NOT NULL, PRIMARY KEY (id) ); CREATE TABLE join_table ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, primary_table_id bigint(20) unsigned NOT NULL, other_table_id bigint(20) unsigned NOT NULL, is_active tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (id) ); ================================================ FILE: internal/endtoend/testdata/update_join/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "db", "engine": "mysql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_join/postgresql/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_join/postgresql/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package db type JoinTable struct { ID int32 PrimaryTableID int32 OtherTableID int32 IsActive bool } type PrimaryTable struct { ID int32 UserID int32 } ================================================ FILE: internal/endtoend/testdata/update_join/postgresql/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package db import ( "context" ) const updateJoin = `-- name: UpdateJoin :exec UPDATE join_table SET is_active = $1 FROM primary_table WHERE join_table.id = $2 AND primary_table.user_id = $3 AND join_table.primary_table_id = primary_table.id ` type UpdateJoinParams struct { IsActive bool ID int32 UserID int32 } func (q *Queries) UpdateJoin(ctx context.Context, arg UpdateJoinParams) error { _, err := q.db.ExecContext(ctx, updateJoin, arg.IsActive, arg.ID, arg.UserID) return err } ================================================ FILE: internal/endtoend/testdata/update_join/postgresql/query.sql ================================================ -- name: UpdateJoin :exec UPDATE join_table SET is_active = $1 FROM primary_table WHERE join_table.id = $2 AND primary_table.user_id = $3 AND join_table.primary_table_id = primary_table.id; ================================================ FILE: internal/endtoend/testdata/update_join/postgresql/schema.sql ================================================ CREATE TABLE primary_table ( id INT PRIMARY KEY, user_id INT NOT NULL ); CREATE TABLE join_table ( id INT PRIMARY KEY, primary_table_id INT NOT NULL, other_table_id INT NOT NULL, is_active BOOLEAN NOT NULL ); ================================================ FILE: internal/endtoend/testdata/update_join/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "db", "engine": "postgresql", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_set/myql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_set/myql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string Slug string } ================================================ FILE: internal/endtoend/testdata/update_set/myql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const updateSet = `-- name: UpdateSet :exec UPDATE foo SET name = ? WHERE slug = ? ` type UpdateSetParams struct { Name string Slug string } func (q *Queries) UpdateSet(ctx context.Context, arg UpdateSetParams) error { _, err := q.db.ExecContext(ctx, updateSet, arg.Name, arg.Slug) return err } ================================================ FILE: internal/endtoend/testdata/update_set/myql/query.sql ================================================ /* name: UpdateSet :exec */ UPDATE foo SET name = ? WHERE slug = ?; ================================================ FILE: internal/endtoend/testdata/update_set/myql/schema.sql ================================================ CREATE TABLE foo (name text not null, slug text not null); ================================================ FILE: internal/endtoend/testdata/update_set/myql/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "mysql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string Slug string } ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const updateSet = `-- name: UpdateSet :exec UPDATE foo SET name = $2 WHERE slug = $1 ` type UpdateSetParams struct { Slug string Name string } func (q *Queries) UpdateSet(ctx context.Context, arg UpdateSetParams) error { _, err := q.db.Exec(ctx, updateSet, arg.Slug, arg.Name) return err } ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/pgx/v4/query.sql ================================================ -- name: UpdateSet :exec UPDATE foo SET name = $2 WHERE slug = $1; ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (name text not null, slug text not null); ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string Slug string } ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const updateSet = `-- name: UpdateSet :exec UPDATE foo SET name = $2 WHERE slug = $1 ` type UpdateSetParams struct { Slug string Name string } func (q *Queries) UpdateSet(ctx context.Context, arg UpdateSetParams) error { _, err := q.db.Exec(ctx, updateSet, arg.Slug, arg.Name) return err } ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/pgx/v5/query.sql ================================================ -- name: UpdateSet :exec UPDATE foo SET name = $2 WHERE slug = $1; ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (name text not null, slug text not null); ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string Slug string } ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const updateSet = `-- name: UpdateSet :exec UPDATE foo SET name = $2 WHERE slug = $1 ` type UpdateSetParams struct { Slug string Name string } func (q *Queries) UpdateSet(ctx context.Context, arg UpdateSetParams) error { _, err := q.db.ExecContext(ctx, updateSet, arg.Slug, arg.Name) return err } ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/stdlib/query.sql ================================================ -- name: UpdateSet :exec UPDATE foo SET name = $2 WHERE slug = $1; ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (name text not null, slug text not null); ================================================ FILE: internal/endtoend/testdata/update_set/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "postgresql", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_set/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_set/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string Slug string } ================================================ FILE: internal/endtoend/testdata/update_set/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const updateSet = `-- name: UpdateSet :exec UPDATE foo SET name = ? WHERE slug = ? ` type UpdateSetParams struct { Name string Slug string } func (q *Queries) UpdateSet(ctx context.Context, arg UpdateSetParams) error { _, err := q.db.ExecContext(ctx, updateSet, arg.Name, arg.Slug) return err } ================================================ FILE: internal/endtoend/testdata/update_set/sqlite/query.sql ================================================ /* name: UpdateSet :exec */ UPDATE foo SET name = ? WHERE slug = ?; ================================================ FILE: internal/endtoend/testdata/update_set/sqlite/schema.sql ================================================ CREATE TABLE foo (name text not null, slug text not null); ================================================ FILE: internal/endtoend/testdata/update_set/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string Slug string } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const updateSetMultiple = `-- name: UpdateSetMultiple :exec UPDATE foo SET name = ?, slug = ? ` type UpdateSetMultipleParams struct { Name string Slug string } func (q *Queries) UpdateSetMultiple(ctx context.Context, arg UpdateSetMultipleParams) error { _, err := q.db.ExecContext(ctx, updateSetMultiple, arg.Name, arg.Slug) return err } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/mysql/query.sql ================================================ -- name: UpdateSetMultiple :exec UPDATE foo SET name = ?, slug = ?; ================================================ FILE: internal/endtoend/testdata/update_set_multiple/mysql/schema.sql ================================================ CREATE TABLE foo (name text not null, slug text not null); ================================================ FILE: internal/endtoend/testdata/update_set_multiple/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string Slug string } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const updateSetMultiple = `-- name: UpdateSetMultiple :exec UPDATE foo SET (name, slug) = ($2, $1) ` type UpdateSetMultipleParams struct { Slug string Name string } func (q *Queries) UpdateSetMultiple(ctx context.Context, arg UpdateSetMultipleParams) error { _, err := q.db.Exec(ctx, updateSetMultiple, arg.Slug, arg.Name) return err } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/query.sql ================================================ -- name: UpdateSetMultiple :exec UPDATE foo SET (name, slug) = ($2, $1); ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/schema.sql ================================================ CREATE TABLE foo (name text not null, slug text not null); ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v4/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v4", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string Slug string } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const updateSetMultiple = `-- name: UpdateSetMultiple :exec UPDATE foo SET (name, slug) = ($2, $1) ` type UpdateSetMultipleParams struct { Slug string Name string } func (q *Queries) UpdateSetMultiple(ctx context.Context, arg UpdateSetMultipleParams) error { _, err := q.db.Exec(ctx, updateSetMultiple, arg.Slug, arg.Name) return err } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/query.sql ================================================ -- name: UpdateSetMultiple :exec UPDATE foo SET (name, slug) = ($2, $1); ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/schema.sql ================================================ CREATE TABLE foo (name text not null, slug text not null); ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/pgx/v5/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "sql_package": "pgx/v5", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string Slug string } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const updateSetMultiple = `-- name: UpdateSetMultiple :exec UPDATE foo SET (name, slug) = ($2, $1) ` type UpdateSetMultipleParams struct { Slug string Name string } func (q *Queries) UpdateSetMultiple(ctx context.Context, arg UpdateSetMultipleParams) error { _, err := q.db.ExecContext(ctx, updateSetMultiple, arg.Slug, arg.Name) return err } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/query.sql ================================================ -- name: UpdateSetMultiple :exec UPDATE foo SET (name, slug) = ($2, $1); ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/schema.sql ================================================ CREATE TABLE foo (name text not null, slug text not null); ================================================ FILE: internal/endtoend/testdata/update_set_multiple/postgresql/stdlib/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Foo struct { Name string Slug string } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const updateSetMultiple = `-- name: UpdateSetMultiple :exec UPDATE foo SET name = ?, slug = ? ` type UpdateSetMultipleParams struct { Name string Slug string } func (q *Queries) UpdateSetMultiple(ctx context.Context, arg UpdateSetMultipleParams) error { _, err := q.db.ExecContext(ctx, updateSetMultiple, arg.Name, arg.Slug) return err } ================================================ FILE: internal/endtoend/testdata/update_set_multiple/sqlite/query.sql ================================================ -- name: UpdateSetMultiple :exec UPDATE foo SET name = ?, slug = ?; ================================================ FILE: internal/endtoend/testdata/update_set_multiple/sqlite/schema.sql ================================================ CREATE TABLE foo (name text not null, slug text not null); ================================================ FILE: internal/endtoend/testdata/update_set_multiple/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/update_set_on_conflict/issue.md ================================================ https://github.com/sqlc-dev/sqlc/issues/1128 ================================================ FILE: internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/query.sql ================================================ -- name: UpsertServer :exec INSERT INTO servers(code, name) VALUES ($1, $2) ON CONFLICT (code) DO UPDATE SET name_typo = 1111; ================================================ FILE: internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/schema.sql ================================================ CREATE TABLE servers ( code varchar PRIMARY KEY, name text NOT NULL ); ================================================ FILE: internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/sqlc.yaml ================================================ version: "2" sql: - engine: "postgresql" schema: "schema.sql" queries: "query.sql" gen: go: package: "querytest" out: "go" sql_package: "pgx/v5" ================================================ FILE: internal/endtoend/testdata/update_set_on_conflict/postgresql/pgx/stderr.txt ================================================ # package querytest query.sql:4:15: column "name_typo" of relation "servers" does not exist ================================================ FILE: internal/endtoend/testdata/update_two_table/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/update_two_table/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "time" ) type Author struct { Name string DeletedAt time.Time CreatedAt time.Time UpdatedAt time.Time } type Book struct { IsAmazing bool DeletedAt time.Time CreatedAt time.Time UpdatedAt time.Time } ================================================ FILE: internal/endtoend/testdata/update_two_table/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteAuthor = `-- name: DeleteAuthor :exec UPDATE authors, books SET authors.deleted_at = now(), books.deleted_at = now() WHERE books.is_amazing = 1 AND authors.name = ? ` func (q *Queries) DeleteAuthor(ctx context.Context, name string) error { _, err := q.db.ExecContext(ctx, deleteAuthor, name) return err } ================================================ FILE: internal/endtoend/testdata/update_two_table/mysql/query.sql ================================================ -- name: DeleteAuthor :exec UPDATE authors, books SET authors.deleted_at = now(), books.deleted_at = now() WHERE books.is_amazing = 1 AND authors.name = sqlc.arg(name); ================================================ FILE: internal/endtoend/testdata/update_two_table/mysql/schema.sql ================================================ -- https://github.com/sqlc-dev/sqlc/issues/1590 CREATE TABLE authors ( name text NOT NULL, deleted_at datetime NOT NULL, created_at datetime NOT NULL, updated_at datetime NOT NULL ); CREATE TABLE books ( is_amazing tinyint(1) NOT NULL, deleted_at datetime NOT NULL, created_at datetime NOT NULL, updated_at datetime NOT NULL ); ================================================ FILE: internal/endtoend/testdata/update_two_table/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/upsert/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/upsert/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Location struct { ID int64 Name string Address string ZipCode int64 Latitude float64 Longitude float64 } ================================================ FILE: internal/endtoend/testdata/upsert/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const upsertLocation = `-- name: UpsertLocation :exec INSERT INTO locations ( name, address, zip_code, latitude, longitude ) VALUES (?, ?, ?, ?, ?) ON CONFLICT(name) DO UPDATE SET name = excluded.name, address = excluded.address, zip_code = excluded.zip_code, latitude = excluded.latitude, longitude = excluded.longitude ` type UpsertLocationParams struct { Name string Address string ZipCode int64 Latitude float64 Longitude float64 } func (q *Queries) UpsertLocation(ctx context.Context, arg UpsertLocationParams) error { _, err := q.db.ExecContext(ctx, upsertLocation, arg.Name, arg.Address, arg.ZipCode, arg.Latitude, arg.Longitude, ) return err } ================================================ FILE: internal/endtoend/testdata/upsert/sqlite/query.sql ================================================ /* name: UpsertLocation :exec */ INSERT INTO locations ( name, address, zip_code, latitude, longitude ) VALUES (?, ?, ?, ?, ?) ON CONFLICT(name) DO UPDATE SET name = excluded.name, address = excluded.address, zip_code = excluded.zip_code, latitude = excluded.latitude, longitude = excluded.longitude; ================================================ FILE: internal/endtoend/testdata/upsert/sqlite/schema.sql ================================================ -- https://github.com/sqlc-dev/sqlc/issues/1728 CREATE TABLE IF NOT EXISTS locations ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, address TEXT NOT NULL, zip_code INT NOT NULL, latitude REAL NOT NULL, longitude REAL NOT NULL, UNIQUE(name) ); ================================================ FILE: internal/endtoend/testdata/upsert/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "engine": "sqlite", "path": "go", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/mysql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/mysql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "time" ) type Author struct { ID int64 Name string Bio sql.NullString } type WeatherMetric struct { Time time.Time TimezoneShift sql.NullInt32 CityName sql.NullString TempC sql.NullFloat64 FeelsLikeC sql.NullFloat64 TempMinC sql.NullFloat64 TempMaxC sql.NullFloat64 PressureHpa sql.NullFloat64 HumidityPercent sql.NullFloat64 WindSpeedMs sql.NullFloat64 WindDeg sql.NullInt32 Rain1hMm sql.NullFloat64 Rain3hMm sql.NullFloat64 Snow1hMm sql.NullFloat64 Snow3hMm sql.NullFloat64 CloudsPercent sql.NullInt32 WeatherTypeID sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/mysql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const listAuthors = `-- name: ListAuthors :many SELECT id, name as full_name, bio FROM authors GROUP BY full_name ` type ListAuthorsRow struct { ID int64 FullName string Bio sql.NullString } func (q *Queries) ListAuthors(ctx context.Context) ([]ListAuthorsRow, error) { rows, err := q.db.QueryContext(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []ListAuthorsRow for rows.Next() { var i ListAuthorsRow if err := rows.Scan(&i.ID, &i.FullName, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listAuthorsIdenticalAlias = `-- name: ListAuthorsIdenticalAlias :many SELECT id, name as name, bio FROM authors GROUP BY name ` func (q *Queries) ListAuthorsIdenticalAlias(ctx context.Context) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthorsIdenticalAlias) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listMetrics = `-- name: ListMetrics :many SELECT time_bucket('15 days', time) AS bucket, city_name, AVG(temp_c) FROM weather_metrics WHERE DATE_SUB(NOW(), INTERVAL 6 MONTH) GROUP BY bucket, city_name ORDER BY bucket DESC ` type ListMetricsRow struct { Bucket interface{} CityName sql.NullString Avg interface{} } func (q *Queries) ListMetrics(ctx context.Context) ([]ListMetricsRow, error) { rows, err := q.db.QueryContext(ctx, listMetrics) if err != nil { return nil, err } defer rows.Close() var items []ListMetricsRow for rows.Next() { var i ListMetricsRow if err := rows.Scan(&i.Bucket, &i.CityName, &i.Avg); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/mysql/query.sql ================================================ -- name: ListAuthors :many SELECT id, name as full_name, bio FROM authors GROUP BY full_name; -- name: ListAuthorsIdenticalAlias :many SELECT id, name as name, bio FROM authors GROUP BY name; -- name: ListMetrics :many SELECT time_bucket('15 days', time) AS bucket, city_name, AVG(temp_c) FROM weather_metrics WHERE DATE_SUB(NOW(), INTERVAL 6 MONTH) GROUP BY bucket, city_name ORDER BY bucket DESC; ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/mysql/schema.sql ================================================ CREATE TABLE authors ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(10) NOT NULL, bio text ); CREATE TABLE IF NOT EXISTS weather_metrics ( time TIMESTAMP NOT NULL, timezone_shift INT NULL, city_name TEXT NULL, temp_c FLOAT NULL, feels_like_c FLOAT NULL, temp_min_c FLOAT NULL, temp_max_c FLOAT NULL, pressure_hpa FLOAT NULL, humidity_percent FLOAT NULL, wind_speed_ms FLOAT NULL, wind_deg INT NULL, rain_1h_mm FLOAT NULL, rain_3h_mm FLOAT NULL, snow_1h_mm FLOAT NULL, snow_3h_mm FLOAT NULL, clouds_percent INT NULL, weather_type_id INT NULL ); ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/mysql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "mysql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/pganalyzer/exec.json ================================================ { "contexts": ["managed-db"] } ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "time" ) type Author struct { ID int64 Name string Bio sql.NullString } type WeatherMetric struct { Time time.Time TimezoneShift sql.NullInt32 CityName sql.NullString TempC sql.NullFloat64 FeelsLikeC sql.NullFloat64 TempMinC sql.NullFloat64 TempMaxC sql.NullFloat64 PressureHpa sql.NullFloat64 HumidityPercent sql.NullFloat64 WindSpeedMs sql.NullFloat64 WindDeg sql.NullInt32 Rain1hMm sql.NullFloat64 Rain3hMm sql.NullFloat64 Snow1hMm sql.NullFloat64 Snow3hMm sql.NullFloat64 CloudsPercent sql.NullInt32 WeatherTypeID sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/pganalyzer/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" "time" ) const listAuthors = `-- name: ListAuthors :many SELECT id, name as name, bio FROM authors ` func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listAuthorsIdenticalAlias = `-- name: ListAuthorsIdenticalAlias :many SELECT id, name as name, bio FROM authors ` func (q *Queries) ListAuthorsIdenticalAlias(ctx context.Context) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthorsIdenticalAlias) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listMetrics = `-- name: ListMetrics :many SELECT date_trunc('day', time) AS bucket, city_name, AVG(temp_c) FROM weather_metrics WHERE time > NOW() - (6 * INTERVAL '1 month') GROUP BY bucket, city_name ORDER BY bucket DESC ` type ListMetricsRow struct { Bucket time.Time CityName sql.NullString Avg float64 } func (q *Queries) ListMetrics(ctx context.Context) ([]ListMetricsRow, error) { rows, err := q.db.QueryContext(ctx, listMetrics) if err != nil { return nil, err } defer rows.Close() var items []ListMetricsRow for rows.Next() { var i ListMetricsRow if err := rows.Scan(&i.Bucket, &i.CityName, &i.Avg); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/pganalyzer/query.sql ================================================ -- name: ListAuthors :many SELECT id, name as name, bio FROM authors; -- name: ListAuthorsIdenticalAlias :many SELECT id, name as name, bio FROM authors; -- name: ListMetrics :many SELECT date_trunc('day', time) AS bucket, city_name, AVG(temp_c) FROM weather_metrics WHERE time > NOW() - (6 * INTERVAL '1 month') GROUP BY bucket, city_name ORDER BY bucket DESC; ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/pganalyzer/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); CREATE TABLE IF NOT EXISTS weather_metrics ( time TIMESTAMP WITHOUT TIME ZONE NOT NULL, timezone_shift INT NULL, city_name TEXT NULL, temp_c DOUBLE PRECISION NULL, feels_like_c DOUBLE PRECISION NULL, temp_min_c DOUBLE PRECISION NULL, temp_max_c DOUBLE PRECISION NULL, pressure_hpa DOUBLE PRECISION NULL, humidity_percent DOUBLE PRECISION NULL, wind_speed_ms DOUBLE PRECISION NULL, wind_deg INT NULL, rain_1h_mm DOUBLE PRECISION NULL, rain_3h_mm DOUBLE PRECISION NULL, snow_1h_mm DOUBLE PRECISION NULL, snow_3h_mm DOUBLE PRECISION NULL, clouds_percent INT NULL, weather_type_id INT NULL ); ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/pganalyzer/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/postgresql/exec.json ================================================ { "contexts": ["base"] } ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/postgresql/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/postgresql/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" "time" ) type Author struct { ID int64 Name string Bio sql.NullString } type WeatherMetric struct { Time time.Time TimezoneShift sql.NullInt32 CityName sql.NullString TempC sql.NullFloat64 FeelsLikeC sql.NullFloat64 TempMinC sql.NullFloat64 TempMaxC sql.NullFloat64 PressureHpa sql.NullFloat64 HumidityPercent sql.NullFloat64 WindSpeedMs sql.NullFloat64 WindDeg sql.NullInt32 Rain1hMm sql.NullFloat64 Rain3hMm sql.NullFloat64 Snow1hMm sql.NullFloat64 Snow3hMm sql.NullFloat64 CloudsPercent sql.NullInt32 WeatherTypeID sql.NullInt32 } ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/postgresql/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" "database/sql" ) const listAuthors = `-- name: ListAuthors :many SELECT id, name as name, bio FROM authors ` func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthors) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listAuthorsIdenticalAlias = `-- name: ListAuthorsIdenticalAlias :many SELECT id, name as name, bio FROM authors ` func (q *Queries) ListAuthorsIdenticalAlias(ctx context.Context) ([]Author, error) { rows, err := q.db.QueryContext(ctx, listAuthorsIdenticalAlias) if err != nil { return nil, err } defer rows.Close() var items []Author for rows.Next() { var i Author if err := rows.Scan(&i.ID, &i.Name, &i.Bio); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listMetrics = `-- name: ListMetrics :many SELECT date_trunc('day', time) AS bucket, city_name, AVG(temp_c) FROM weather_metrics WHERE time > NOW() - (6 * INTERVAL '1 month') GROUP BY bucket, city_name ORDER BY bucket DESC ` type ListMetricsRow struct { Bucket int64 CityName sql.NullString Avg float64 } func (q *Queries) ListMetrics(ctx context.Context) ([]ListMetricsRow, error) { rows, err := q.db.QueryContext(ctx, listMetrics) if err != nil { return nil, err } defer rows.Close() var items []ListMetricsRow for rows.Next() { var i ListMetricsRow if err := rows.Scan(&i.Bucket, &i.CityName, &i.Avg); err != nil { return nil, err } items = append(items, i) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/postgresql/query.sql ================================================ -- name: ListAuthors :many SELECT id, name as name, bio FROM authors; -- name: ListAuthorsIdenticalAlias :many SELECT id, name as name, bio FROM authors; -- name: ListMetrics :many SELECT date_trunc('day', time) AS bucket, city_name, AVG(temp_c) FROM weather_metrics WHERE time > NOW() - (6 * INTERVAL '1 month') GROUP BY bucket, city_name ORDER BY bucket DESC; ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/postgresql/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); CREATE TABLE IF NOT EXISTS weather_metrics ( time TIMESTAMP WITHOUT TIME ZONE NOT NULL, timezone_shift INT NULL, city_name TEXT NULL, temp_c DOUBLE PRECISION NULL, feels_like_c DOUBLE PRECISION NULL, temp_min_c DOUBLE PRECISION NULL, temp_max_c DOUBLE PRECISION NULL, pressure_hpa DOUBLE PRECISION NULL, humidity_percent DOUBLE PRECISION NULL, wind_speed_ms DOUBLE PRECISION NULL, wind_deg INT NULL, rain_1h_mm DOUBLE PRECISION NULL, rain_3h_mm DOUBLE PRECISION NULL, snow_1h_mm DOUBLE PRECISION NULL, snow_3h_mm DOUBLE PRECISION NULL, clouds_percent INT NULL, weather_type_id INT NULL ); ================================================ FILE: internal/endtoend/testdata/valid_group_by_reference/postgresql/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "postgresql", "name": "querytest", "schema": "schema.sql", "queries": "query.sql" } ] } ================================================ FILE: internal/endtoend/testdata/vet_disable/exec.json ================================================ { "command": "vet" } ================================================ FILE: internal/endtoend/testdata/vet_disable/query.sql ================================================ -- name: RunVetAll :exec SELECT true; -- name: SkipVetAll :exec -- @sqlc-vet-disable SELECT true; -- 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; ================================================ FILE: internal/endtoend/testdata/vet_disable/sqlc.yaml ================================================ version: 2 sql: - schema: "query.sql" queries: "query.sql" engine: "postgresql" gen: go: package: "db" 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" ================================================ FILE: internal/endtoend/testdata/vet_disable/stderr.txt ================================================ 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 ================================================ FILE: internal/endtoend/testdata/vet_explain/mysql/db/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package test 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, } } ================================================ FILE: internal/endtoend/testdata/vet_explain/mysql/db/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package test import ( "database/sql/driver" "encoding/json" "fmt" "time" ) type DebugCenum string const ( DebugCenumOne DebugCenum = "one" DebugCenumTwo DebugCenum = "two" DebugCenumThree DebugCenum = "three" ) func (e *DebugCenum) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = DebugCenum(s) case string: *e = DebugCenum(s) default: return fmt.Errorf("unsupported scan type for DebugCenum: %T", src) } return nil } type NullDebugCenum struct { DebugCenum DebugCenum Valid bool // Valid is true if DebugCenum is not NULL } // Scan implements the Scanner interface. func (ns *NullDebugCenum) Scan(value interface{}) error { if value == nil { ns.DebugCenum, ns.Valid = "", false return nil } ns.Valid = true return ns.DebugCenum.Scan(value) } // Value implements the driver Valuer interface. func (ns NullDebugCenum) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.DebugCenum), nil } type DebugCset string const ( DebugCsetOne DebugCset = "one" DebugCsetTwo DebugCset = "two" DebugCsetThree DebugCset = "three" ) func (e *DebugCset) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = DebugCset(s) case string: *e = DebugCset(s) default: return fmt.Errorf("unsupported scan type for DebugCset: %T", src) } return nil } type NullDebugCset struct { DebugCset DebugCset Valid bool // Valid is true if DebugCset is not NULL } // Scan implements the Scanner interface. func (ns *NullDebugCset) Scan(value interface{}) error { if value == nil { ns.DebugCset, ns.Valid = "", false return nil } ns.Valid = true return ns.DebugCset.Scan(value) } // Value implements the driver Valuer interface. func (ns NullDebugCset) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.DebugCset), nil } type Debug struct { ID int64 Csmallint int16 Cint int32 Cinteger int32 Cdecimal string Cnumeric string Cfloat float64 Creal float64 Cdoubleprecision float64 Cdouble float64 Cdec string Cfixed string Ctinyint int8 Cbool bool Cmediumint int32 Cbit interface{} Cdate time.Time Cdatetime time.Time Ctimestamp time.Time Ctime time.Time Cyear int16 Cchar string Cvarchar string Cbinary []byte Cvarbinary []byte Ctinyblob []byte Cblob []byte Cmediumblob []byte Clongblob []byte Ctinytext string Ctext string Cmediumtext string Clongtext string Cenum NullDebugCenum Cset DebugCset Cjson json.RawMessage } ================================================ FILE: internal/endtoend/testdata/vet_explain/mysql/db/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package test import ( "context" "encoding/json" "time" ) const selectByCbinary = `-- name: SelectByCbinary :one SELECT id FROM debug WHERE Cbinary = ? LIMIT 1 ` func (q *Queries) SelectByCbinary(ctx context.Context, cbinary []byte) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCbinary, cbinary) var id int64 err := row.Scan(&id) return id, err } const selectByCbit = `-- name: SelectByCbit :one SELECT id FROM debug WHERE Cbit = ? LIMIT 1 ` func (q *Queries) SelectByCbit(ctx context.Context, cbit interface{}) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCbit, cbit) var id int64 err := row.Scan(&id) return id, err } const selectByCblob = `-- name: SelectByCblob :one SELECT id FROM debug WHERE Cblob = ? LIMIT 1 ` func (q *Queries) SelectByCblob(ctx context.Context, cblob []byte) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCblob, cblob) var id int64 err := row.Scan(&id) return id, err } const selectByCbool = `-- name: SelectByCbool :one SELECT id FROM debug WHERE Cbool = ? LIMIT 1 ` func (q *Queries) SelectByCbool(ctx context.Context, cbool bool) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCbool, cbool) var id int64 err := row.Scan(&id) return id, err } const selectByCchar = `-- name: SelectByCchar :one SELECT id FROM debug WHERE Cchar = ? LIMIT 1 ` func (q *Queries) SelectByCchar(ctx context.Context, cchar string) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCchar, cchar) var id int64 err := row.Scan(&id) return id, err } const selectByCdate = `-- name: SelectByCdate :one SELECT id FROM debug WHERE Cdate = ? LIMIT 1 ` func (q *Queries) SelectByCdate(ctx context.Context, cdate time.Time) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCdate, cdate) var id int64 err := row.Scan(&id) return id, err } const selectByCdatetime = `-- name: SelectByCdatetime :one SELECT id FROM debug WHERE Cdatetime = ? LIMIT 1 ` func (q *Queries) SelectByCdatetime(ctx context.Context, cdatetime time.Time) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCdatetime, cdatetime) var id int64 err := row.Scan(&id) return id, err } const selectByCdec = `-- name: SelectByCdec :one SELECT id FROM debug WHERE Cdec = ? LIMIT 1 ` func (q *Queries) SelectByCdec(ctx context.Context, cdec string) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCdec, cdec) var id int64 err := row.Scan(&id) return id, err } const selectByCdecimal = `-- name: SelectByCdecimal :one SELECT id FROM debug WHERE Cdecimal = ? LIMIT 1 ` func (q *Queries) SelectByCdecimal(ctx context.Context, cdecimal string) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCdecimal, cdecimal) var id int64 err := row.Scan(&id) return id, err } const selectByCdouble = `-- name: SelectByCdouble :one SELECT id FROM debug WHERE Cdouble = ? LIMIT 1 ` func (q *Queries) SelectByCdouble(ctx context.Context, cdouble float64) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCdouble, cdouble) var id int64 err := row.Scan(&id) return id, err } const selectByCdoubleprecision = `-- name: SelectByCdoubleprecision :one SELECT id FROM debug WHERE Cdoubleprecision = ? LIMIT 1 ` func (q *Queries) SelectByCdoubleprecision(ctx context.Context, cdoubleprecision float64) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCdoubleprecision, cdoubleprecision) var id int64 err := row.Scan(&id) return id, err } const selectByCenum = `-- name: SelectByCenum :one SELECT id FROM debug WHERE Cenum = ? LIMIT 1 ` func (q *Queries) SelectByCenum(ctx context.Context, cenum NullDebugCenum) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCenum, cenum) var id int64 err := row.Scan(&id) return id, err } const selectByCfixed = `-- name: SelectByCfixed :one SELECT id FROM debug WHERE Cfixed = ? LIMIT 1 ` func (q *Queries) SelectByCfixed(ctx context.Context, cfixed string) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCfixed, cfixed) var id int64 err := row.Scan(&id) return id, err } const selectByCfloat = `-- name: SelectByCfloat :one SELECT id FROM debug WHERE Cfloat = ? LIMIT 1 ` func (q *Queries) SelectByCfloat(ctx context.Context, cfloat float64) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCfloat, cfloat) var id int64 err := row.Scan(&id) return id, err } const selectByCint = `-- name: SelectByCint :one SELECT id FROM debug WHERE Cint = ? LIMIT 1 ` func (q *Queries) SelectByCint(ctx context.Context, cint int32) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCint, cint) var id int64 err := row.Scan(&id) return id, err } const selectByCinteger = `-- name: SelectByCinteger :one SELECT id FROM debug WHERE Cinteger = ? LIMIT 1 ` func (q *Queries) SelectByCinteger(ctx context.Context, cinteger int32) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCinteger, cinteger) var id int64 err := row.Scan(&id) return id, err } const selectByCjson = `-- name: SelectByCjson :one SELECT id FROM debug WHERE Cjson = ? LIMIT 1 ` func (q *Queries) SelectByCjson(ctx context.Context, cjson json.RawMessage) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCjson, cjson) var id int64 err := row.Scan(&id) return id, err } const selectByClongblob = `-- name: SelectByClongblob :one SELECT id FROM debug WHERE Clongblob = ? LIMIT 1 ` func (q *Queries) SelectByClongblob(ctx context.Context, clongblob []byte) (int64, error) { row := q.db.QueryRowContext(ctx, selectByClongblob, clongblob) var id int64 err := row.Scan(&id) return id, err } const selectByClongtext = `-- name: SelectByClongtext :one SELECT id FROM debug WHERE Clongtext = ? LIMIT 1 ` func (q *Queries) SelectByClongtext(ctx context.Context, clongtext string) (int64, error) { row := q.db.QueryRowContext(ctx, selectByClongtext, clongtext) var id int64 err := row.Scan(&id) return id, err } const selectByCmediumblob = `-- name: SelectByCmediumblob :one SELECT id FROM debug WHERE Cmediumblob = ? LIMIT 1 ` func (q *Queries) SelectByCmediumblob(ctx context.Context, cmediumblob []byte) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCmediumblob, cmediumblob) var id int64 err := row.Scan(&id) return id, err } const selectByCmediumint = `-- name: SelectByCmediumint :one SELECT id FROM debug WHERE Cmediumint = ? LIMIT 1 ` func (q *Queries) SelectByCmediumint(ctx context.Context, cmediumint int32) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCmediumint, cmediumint) var id int64 err := row.Scan(&id) return id, err } const selectByCmediumtext = `-- name: SelectByCmediumtext :one SELECT id FROM debug WHERE Cmediumtext = ? LIMIT 1 ` func (q *Queries) SelectByCmediumtext(ctx context.Context, cmediumtext string) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCmediumtext, cmediumtext) var id int64 err := row.Scan(&id) return id, err } const selectByCnumeric = `-- name: SelectByCnumeric :one SELECT id FROM debug WHERE Cnumeric = ? LIMIT 1 ` func (q *Queries) SelectByCnumeric(ctx context.Context, cnumeric string) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCnumeric, cnumeric) var id int64 err := row.Scan(&id) return id, err } const selectByCreal = `-- name: SelectByCreal :one SELECT id FROM debug WHERE Creal = ? LIMIT 1 ` func (q *Queries) SelectByCreal(ctx context.Context, creal float64) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCreal, creal) var id int64 err := row.Scan(&id) return id, err } const selectByCset = `-- name: SelectByCset :one SELECT id FROM debug WHERE Cset = ? LIMIT 1 ` func (q *Queries) SelectByCset(ctx context.Context, cset DebugCset) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCset, cset) var id int64 err := row.Scan(&id) return id, err } const selectByCsmallint = `-- name: SelectByCsmallint :one SELECT id FROM debug WHERE Csmallint = ? LIMIT 1 ` 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) return id, err } const selectByCtext = `-- name: SelectByCtext :one SELECT id FROM debug WHERE Ctext = ? LIMIT 1 ` func (q *Queries) SelectByCtext(ctx context.Context, ctext string) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCtext, ctext) var id int64 err := row.Scan(&id) return id, err } const selectByCtime = `-- name: SelectByCtime :one SELECT id FROM debug WHERE Ctime = ? LIMIT 1 ` func (q *Queries) SelectByCtime(ctx context.Context, ctime time.Time) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCtime, ctime) var id int64 err := row.Scan(&id) return id, err } const selectByCtimestamp = `-- name: SelectByCtimestamp :one SELECT id FROM debug WHERE Ctimestamp = ? LIMIT 1 ` func (q *Queries) SelectByCtimestamp(ctx context.Context, ctimestamp time.Time) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCtimestamp, ctimestamp) var id int64 err := row.Scan(&id) return id, err } const selectByCtinyblob = `-- name: SelectByCtinyblob :one SELECT id FROM debug WHERE Ctinyblob = ? LIMIT 1 ` func (q *Queries) SelectByCtinyblob(ctx context.Context, ctinyblob []byte) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCtinyblob, ctinyblob) var id int64 err := row.Scan(&id) return id, err } const selectByCtinyint = `-- name: SelectByCtinyint :one SELECT id FROM debug WHERE Ctinyint = ? LIMIT 1 ` 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) return id, err } const selectByCtinytext = `-- name: SelectByCtinytext :one SELECT id FROM debug WHERE Ctinytext = ? LIMIT 1 ` func (q *Queries) SelectByCtinytext(ctx context.Context, ctinytext string) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCtinytext, ctinytext) var id int64 err := row.Scan(&id) return id, err } const selectByCvarbinary = `-- name: SelectByCvarbinary :one SELECT id FROM debug WHERE Cvarbinary = ? LIMIT 1 ` func (q *Queries) SelectByCvarbinary(ctx context.Context, cvarbinary []byte) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCvarbinary, cvarbinary) var id int64 err := row.Scan(&id) return id, err } const selectByCvarchar = `-- name: SelectByCvarchar :one SELECT id FROM debug WHERE Cvarchar = ? LIMIT 1 ` func (q *Queries) SelectByCvarchar(ctx context.Context, cvarchar string) (int64, error) { row := q.db.QueryRowContext(ctx, selectByCvarchar, cvarchar) var id int64 err := row.Scan(&id) return id, err } const selectByCyear = `-- name: SelectByCyear :one SELECT id FROM debug WHERE Cyear = ? LIMIT 1 ` 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) return id, err } const selectById = `-- name: SelectById :one SELECT id FROM debug WHERE id = ? LIMIT 1 ` func (q *Queries) SelectById(ctx context.Context, id int64) (int64, error) { row := q.db.QueryRowContext(ctx, selectById, id) err := row.Scan(&id) return id, err } ================================================ FILE: internal/endtoend/testdata/vet_explain/mysql/query.sql ================================================ -- name: SelectById :one SELECT id FROM debug WHERE id = ? LIMIT 1; -- name: SelectByCsmallint :one SELECT id FROM debug WHERE Csmallint = ? LIMIT 1; -- name: SelectByCint :one SELECT id FROM debug WHERE Cint = ? LIMIT 1; -- name: SelectByCinteger :one SELECT id FROM debug WHERE Cinteger = ? LIMIT 1; -- name: SelectByCdecimal :one SELECT id FROM debug WHERE Cdecimal = ? LIMIT 1; -- name: SelectByCnumeric :one SELECT id FROM debug WHERE Cnumeric = ? LIMIT 1; -- name: SelectByCfloat :one SELECT id FROM debug WHERE Cfloat = ? LIMIT 1; -- name: SelectByCreal :one SELECT id FROM debug WHERE Creal = ? LIMIT 1; -- name: SelectByCdoubleprecision :one SELECT id FROM debug WHERE Cdoubleprecision = ? LIMIT 1; -- name: SelectByCdouble :one SELECT id FROM debug WHERE Cdouble = ? LIMIT 1; -- name: SelectByCdec :one SELECT id FROM debug WHERE Cdec = ? LIMIT 1; -- name: SelectByCfixed :one SELECT id FROM debug WHERE Cfixed = ? LIMIT 1; -- name: SelectByCtinyint :one SELECT id FROM debug WHERE Ctinyint = ? LIMIT 1; -- name: SelectByCbool :one SELECT id FROM debug WHERE Cbool = ? LIMIT 1; -- name: SelectByCmediumint :one SELECT id FROM debug WHERE Cmediumint = ? LIMIT 1; -- name: SelectByCbit :one SELECT id FROM debug WHERE Cbit = ? LIMIT 1; -- name: SelectByCdate :one SELECT id FROM debug WHERE Cdate = ? LIMIT 1; -- name: SelectByCdatetime :one SELECT id FROM debug WHERE Cdatetime = ? LIMIT 1; -- name: SelectByCtimestamp :one SELECT id FROM debug WHERE Ctimestamp = ? LIMIT 1; -- name: SelectByCtime :one SELECT id FROM debug WHERE Ctime = ? LIMIT 1; -- name: SelectByCyear :one SELECT id FROM debug WHERE Cyear = ? LIMIT 1; -- name: SelectByCchar :one SELECT id FROM debug WHERE Cchar = ? LIMIT 1; -- name: SelectByCvarchar :one SELECT id FROM debug WHERE Cvarchar = ? LIMIT 1; -- name: SelectByCbinary :one SELECT id FROM debug WHERE Cbinary = ? LIMIT 1; -- name: SelectByCvarbinary :one SELECT id FROM debug WHERE Cvarbinary = ? LIMIT 1; -- name: SelectByCtinyblob :one SELECT id FROM debug WHERE Ctinyblob = ? LIMIT 1; -- name: SelectByCblob :one SELECT id FROM debug WHERE Cblob = ? LIMIT 1; -- name: SelectByCmediumblob :one SELECT id FROM debug WHERE Cmediumblob = ? LIMIT 1; -- name: SelectByClongblob :one SELECT id FROM debug WHERE Clongblob = ? LIMIT 1; -- name: SelectByCtinytext :one SELECT id FROM debug WHERE Ctinytext = ? LIMIT 1; -- name: SelectByCtext :one SELECT id FROM debug WHERE Ctext = ? LIMIT 1; -- name: SelectByCmediumtext :one SELECT id FROM debug WHERE Cmediumtext = ? LIMIT 1; -- name: SelectByClongtext :one SELECT id FROM debug WHERE Clongtext = ? LIMIT 1; -- name: SelectByCenum :one SELECT id FROM debug WHERE Cenum = ? LIMIT 1; -- name: SelectByCset :one SELECT id FROM debug WHERE Cset = ? LIMIT 1; -- name: SelectByCjson :one SELECT id FROM debug WHERE Cjson = ? LIMIT 1; -- -- -- -- name: DeleteById :exec -- DELETE FROM debug -- WHERE id = ?; -- -- name: DeleteByCsmallint :exec -- DELETE FROM debug -- WHERE Csmallint = ? LIMIT 1; -- -- name: DeleteByCint :exec -- DELETE FROM debug -- WHERE Cint = ? LIMIT 1; -- -- name: DeleteByCinteger :exec -- DELETE FROM debug -- WHERE Cinteger = ? LIMIT 1; -- -- name: DeleteByCdecimal :exec -- DELETE FROM debug -- WHERE Cdecimal = ? LIMIT 1; -- -- name: DeleteByCnumeric :exec -- DELETE FROM debug -- WHERE Cnumeric = ? LIMIT 1; -- -- name: DeleteByCfloat :exec -- DELETE FROM debug -- WHERE Cfloat = ? LIMIT 1; -- -- name: DeleteByCreal :exec -- DELETE FROM debug -- WHERE Creal = ? LIMIT 1; -- -- name: DeleteByCdoubleprecision :exec -- DELETE FROM debug -- WHERE Cdoubleprecision = ? LIMIT 1; -- -- name: DeleteByCdouble :exec -- DELETE FROM debug -- WHERE Cdouble = ? LIMIT 1; -- -- name: DeleteByCdec :exec -- DELETE FROM debug -- WHERE Cdec = ? LIMIT 1; -- -- name: DeleteByCfixed :exec -- DELETE FROM debug -- WHERE Cfixed = ? LIMIT 1; -- -- name: DeleteByCtinyint :exec -- DELETE FROM debug -- WHERE Ctinyint = ? LIMIT 1; -- -- name: DeleteByCbool :exec -- DELETE FROM debug -- WHERE Cbool = ? LIMIT 1; -- -- name: DeleteByCmediumint :exec -- DELETE FROM debug -- WHERE Cmediumint = ? LIMIT 1; -- -- name: DeleteByCbit :exec -- DELETE FROM debug -- WHERE Cbit = ? LIMIT 1; -- -- name: DeleteByCdate :exec -- DELETE FROM debug -- WHERE Cdate = ? LIMIT 1; -- -- name: DeleteByCdatetime :exec -- DELETE FROM debug -- WHERE Cdatetime = ? LIMIT 1; -- -- name: DeleteByCtimestamp :exec -- DELETE FROM debug -- WHERE Ctimestamp = ? LIMIT 1; -- -- name: DeleteByCtime :exec -- DELETE FROM debug -- WHERE Ctime = ? LIMIT 1; -- -- name: DeleteByCyear :exec -- DELETE FROM debug -- WHERE Cyear = ? LIMIT 1; -- -- name: DeleteByCchar :exec -- DELETE FROM debug -- WHERE Cchar = ? LIMIT 1; -- -- name: DeleteByCvarchar :exec -- DELETE FROM debug -- WHERE Cvarchar = ?; -- -- name: DeleteByCbinary :exec -- DELETE FROM debug -- WHERE Cbinary = ? LIMIT 1; -- -- name: DeleteByCvarbinary :exec -- DELETE FROM debug -- WHERE Cvarbinary = ? LIMIT 1; -- -- name: DeleteByCtinyblob :exec -- DELETE FROM debug -- WHERE Ctinyblob = ? LIMIT 1; -- -- name: DeleteByCblob :exec -- DELETE FROM debug -- WHERE Cblob = ? LIMIT 1; -- -- name: DeleteByCmediumblob :exec -- DELETE FROM debug -- WHERE Cmediumblob = ? LIMIT 1; -- -- name: DeleteByClongblob :exec -- DELETE FROM debug -- WHERE Clongblob = ? LIMIT 1; -- -- name: DeleteByCtinytext :exec -- DELETE FROM debug -- WHERE Ctinytext = ? LIMIT 1; -- -- name: DeleteByCtext :exec -- DELETE FROM debug -- WHERE Ctext = ? LIMIT 1; -- -- name: DeleteByCmediumtext :exec -- DELETE FROM debug -- WHERE Cmediumtext = ? LIMIT 1; -- -- name: DeleteByClongtext :exec -- DELETE FROM debug -- WHERE Clongtext = ? LIMIT 1; -- -- name: DeleteByCenum :exec -- DELETE FROM debug -- WHERE Cenum = ? LIMIT 1; -- -- name: DeleteByCset :exec -- DELETE FROM debug -- WHERE Cset = ? LIMIT 1; -- -- name: DeleteByCjson :exec -- DELETE FROM debug -- WHERE Cjson = ? LIMIT 1; ================================================ FILE: internal/endtoend/testdata/vet_explain/mysql/schema.sql ================================================ CREATE TABLE debug ( id BIGINT PRIMARY KEY AUTO_INCREMENT, Csmallint smallint not null, Cint int not null, Cinteger integer not null, Cdecimal decimal(1,1) not null, Cnumeric numeric(2,1) not null, Cfloat float not null, Creal real not null, Cdoubleprecision double precision not null, Cdouble double not null, Cdec dec(3,2) not null, Cfixed fixed(5,5) not null, Ctinyint tinyint not null, Cbool bool not null, Cmediumint mediumint not null, Cbit bit not null, Cdate date not null, Cdatetime datetime not null, Ctimestamp timestamp not null, Ctime time not null, Cyear year not null, Cchar char(1) not null, Cvarchar varchar(1) not null, Cbinary binary(1) not null, Cvarbinary varbinary(1) not null, Ctinyblob tinyblob not null, Cblob blob not null, Cmediumblob mediumblob not null, Clongblob longblob not null, Ctinytext tinytext NOT NULL, Ctext text NOT NULL, Cmediumtext mediumtext NOT NULL, Clongtext longtext NOT NULL, Cenum ENUM('one', 'two', 'three'), Cset SET('one', 'two', 'three') NOT NULL, Cjson JSON NOT NULL ); ================================================ FILE: internal/endtoend/testdata/vet_explain/mysql/sqlc.yaml ================================================ version: 2 sql: - schema: "schema.sql" queries: "query.sql" engine: "mysql" database: uri: root:${MYSQL_ROOT_PASSWORD}@tcp(${MYSQL_HOST}:${MYSQL_PORT})/test?multiStatements=true&parseTime=true gen: go: package: "test" out: "db" rules: - test rules: - name: test rule: "!has(mysql.explain)" ================================================ FILE: internal/endtoend/testdata/vet_failures/exec.json ================================================ { "command": "vet" } ================================================ FILE: internal/endtoend/testdata/vet_failures/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/vet_failures/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/vet_failures/sqlc.yaml ================================================ version: 2 sql: - schema: "schema.sql" queries: "query.sql" engine: "postgresql" gen: go: package: "authors" out: "db" rules: - no-pg - no-delete - only-one-param - no-exec rules: - name: no-pg message: "invalid engine: postgresql" rule: | config.engine == "postgresql" - name: no-delete message: "don't use delete statements" rule: | query.sql.contains("DELETE") - name: only-one-param message: "too many parameters" rule: | query.params.size() > 1 - name: no-exec message: "don't use exec" rule: | query.cmd == "exec" ================================================ FILE: internal/endtoend/testdata/vet_failures/stderr.txt ================================================ query.sql: GetAuthor: no-pg: invalid engine: postgresql query.sql: ListAuthors: no-pg: invalid engine: postgresql query.sql: CreateAuthor: no-pg: invalid engine: postgresql query.sql: CreateAuthor: only-one-param: too many parameters query.sql: DeleteAuthor: no-pg: invalid engine: postgresql query.sql: DeleteAuthor: no-delete: don't use delete statements query.sql: DeleteAuthor: no-exec: don't use exec ================================================ FILE: internal/endtoend/testdata/virtual_table/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/virtual_table/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest import ( "database/sql" ) type Ft struct { B string } type Tbl struct { A int64 B sql.NullString C sql.NullString D sql.NullString E sql.NullInt64 } type TblFt struct { B string C string } ================================================ FILE: internal/endtoend/testdata/virtual_table/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const deleteTblFt = `-- name: DeleteTblFt :exec DELETE FROM tbl_ft WHERE b = ? ` func (q *Queries) DeleteTblFt(ctx context.Context, b string) error { _, err := q.db.ExecContext(ctx, deleteTblFt, b) return err } const insertTblFt = `-- name: InsertTblFt :exec INSERT INTO tbl_ft(b, c) VALUES(?, ?) ` type InsertTblFtParams struct { B string C string } func (q *Queries) InsertTblFt(ctx context.Context, arg InsertTblFtParams) error { _, err := q.db.ExecContext(ctx, insertTblFt, arg.B, arg.C) return err } const selectAllColsFt = `-- name: SelectAllColsFt :many SELECT b FROM ft WHERE b MATCH ? ` func (q *Queries) SelectAllColsFt(ctx context.Context, b string) ([]string, error) { rows, err := q.db.QueryContext(ctx, selectAllColsFt, b) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var b string if err := rows.Scan(&b); err != nil { return nil, err } items = append(items, b) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const selectAllColsTblFt = `-- name: SelectAllColsTblFt :many SELECT b, c FROM tbl_ft WHERE b MATCH ? ` func (q *Queries) SelectAllColsTblFt(ctx context.Context, b string) ([]TblFt, error) { rows, err := q.db.QueryContext(ctx, selectAllColsTblFt, b) if err != nil { return nil, err } defer rows.Close() var items []TblFt for rows.Next() { var i TblFt if err := rows.Scan(&i.B, &i.C); 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 selectBm25Func = `-- name: SelectBm25Func :many SELECT b, c, bm25(tbl_ft, 2.0) FROM tbl_ft WHERE b MATCH ? ORDER BY bm25(tbl_ft) ` type SelectBm25FuncRow struct { B string C string Bm25 float64 } func (q *Queries) SelectBm25Func(ctx context.Context, b string) ([]SelectBm25FuncRow, error) { rows, err := q.db.QueryContext(ctx, selectBm25Func, b) if err != nil { return nil, err } defer rows.Close() var items []SelectBm25FuncRow for rows.Next() { var i SelectBm25FuncRow if err := rows.Scan(&i.B, &i.C, &i.Bm25); 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 selectHightlighFunc = `-- name: SelectHightlighFunc :many SELECT highlight(tbl_ft, 0, '', '') FROM tbl_ft WHERE b MATCH ? ` func (q *Queries) SelectHightlighFunc(ctx context.Context, b string) ([]string, error) { rows, err := q.db.QueryContext(ctx, selectHightlighFunc, b) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var highlight string if err := rows.Scan(&highlight); err != nil { return nil, err } items = append(items, highlight) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const selectOneColFt = `-- name: SelectOneColFt :many SELECT b FROM ft WHERE b = ? ` func (q *Queries) SelectOneColFt(ctx context.Context, b string) ([]string, error) { rows, err := q.db.QueryContext(ctx, selectOneColFt, b) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var b string if err := rows.Scan(&b); err != nil { return nil, err } items = append(items, b) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const selectOneColTblFt = `-- name: SelectOneColTblFt :many SELECT c FROM tbl_ft WHERE b = ? ` func (q *Queries) SelectOneColTblFt(ctx context.Context, b string) ([]string, error) { rows, err := q.db.QueryContext(ctx, selectOneColTblFt, b) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var c string if err := rows.Scan(&c); err != nil { return nil, err } items = append(items, c) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const selectSnippetFunc = `-- name: SelectSnippetFunc :many SELECT snippet(tbl_ft, 0, '', '', 'aa', ?) FROM tbl_ft ` func (q *Queries) SelectSnippetFunc(ctx context.Context, snippet int64) ([]string, error) { rows, err := q.db.QueryContext(ctx, selectSnippetFunc, snippet) if err != nil { return nil, err } defer rows.Close() var items []string for rows.Next() { var snippet string if err := rows.Scan(&snippet); err != nil { return nil, err } items = append(items, snippet) } if err := rows.Close(); err != nil { return nil, err } if err := rows.Err(); err != nil { return nil, err } return items, nil } const updateTblFt = `-- name: UpdateTblFt :exec UPDATE tbl_ft SET c = ? WHERE b = ? ` type UpdateTblFtParams struct { C string B string } func (q *Queries) UpdateTblFt(ctx context.Context, arg UpdateTblFtParams) error { _, err := q.db.ExecContext(ctx, updateTblFt, arg.C, arg.B) return err } ================================================ FILE: internal/endtoend/testdata/virtual_table/sqlite/query.sql ================================================ -- name: SelectAllColsFt :many SELECT b FROM ft WHERE b MATCH ?; -- name: SelectAllColsTblFt :many SELECT b, c FROM tbl_ft WHERE b MATCH ?; -- name: SelectOneColFt :many SELECT b FROM ft WHERE b = ?; -- name: SelectOneColTblFt :many SELECT c FROM tbl_ft WHERE b = ?; -- name: SelectHightlighFunc :many SELECT highlight(tbl_ft, 0, '', '') FROM tbl_ft WHERE b MATCH ?; -- name: SelectSnippetFunc :many SELECT snippet(tbl_ft, 0, '', '', 'aa', ?) FROM tbl_ft; -- name: SelectBm25Func :many SELECT *, bm25(tbl_ft, 2.0) FROM tbl_ft WHERE b MATCH ? ORDER BY bm25(tbl_ft); -- name: UpdateTblFt :exec UPDATE tbl_ft SET c = ? WHERE b = ?; -- name: DeleteTblFt :exec DELETE FROM tbl_ft WHERE b = ?; -- name: InsertTblFt :exec INSERT INTO tbl_ft(b, c) VALUES(?, ?); ================================================ FILE: internal/endtoend/testdata/virtual_table/sqlite/schema.sql ================================================ CREATE TABLE tbl(a INTEGER PRIMARY KEY, b TEXT, c TEXT, d TEXT, e INTEGER); CREATE VIRTUAL TABLE tbl_ft USING fts5(b, c UNINDEXED, content='tbl', content_rowid='a'); CREATE VIRTUAL TABLE ft USING fts5(b); CREATE TRIGGER tbl_ai AFTER INSERT ON tbl BEGIN INSERT INTO tbl_ft(rowid, b, c) VALUES (new.a, new.b, new.c); END; INSERT INTO tbl VALUES(1, 'xx yy cc', 't', 'a', 11); INSERT INTO tbl VALUES(2, 'aa bb', 't', 'a', 22); INSERT INTO ft VALUES('xx cc'); INSERT INTO ft VALUES('cc bb'); ================================================ FILE: internal/endtoend/testdata/virtual_table/sqlite/sqlc.yaml ================================================ version: '2' sql: - schema: schema.sql queries: query.sql engine: sqlite gen: go: package: querytest out: go ================================================ FILE: internal/endtoend/testdata/wasm_plugin_sqlc_gen_greeter/gen/hello.txt ================================================ Hello World ================================================ FILE: internal/endtoend/testdata/wasm_plugin_sqlc_gen_greeter/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/wasm_plugin_sqlc_gen_greeter/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/wasm_plugin_sqlc_gen_greeter/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "codegen": [ { "out": "gen", "plugin": "greeter" } ] } ], "plugins": [ { "name": "greeter", "wasm": { "url": "https://github.com/sqlc-dev/sqlc-gen-greeter/releases/download/v0.1.0/sqlc-gen-greeter.wasm", "sha256": "afc486dac2068d741d7a4110146559d12a013fd0286f42a2fc7dcd802424ad07" } } ] } ================================================ FILE: internal/endtoend/testdata/wasm_plugin_sqlc_gen_test/gen/env.json ================================================ { "env": [ "SQLC_VERSION=v1.30.0", "SQLC_DUMMY_VALUE=true" ] } ================================================ FILE: internal/endtoend/testdata/wasm_plugin_sqlc_gen_test/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/wasm_plugin_sqlc_gen_test/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/wasm_plugin_sqlc_gen_test/sqlc.json ================================================ { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "codegen": [ { "out": "gen", "plugin": "test" } ] } ], "plugins": [ { "name": "test", "env": ["SQLC_DUMMY_VALUE"], "wasm": { "url": "https://github.com/sqlc-dev/sqlc-gen-test/releases/download/v0.1.0/sqlc-gen-test.wasm", "sha256": "138220eae508d4b65a5a8cea555edd155eb2290daf576b7a8b96949acfeb3790" } } ] } ================================================ FILE: internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/sqlc.json ================================================ { "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" } } ] } ================================================ FILE: internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/stderr.txt ================================================ # package test error generating code: invalid file output path: /tmp/unsafe.txt ================================================ FILE: internal/endtoend/testdata/wasm_plugin_sqlc_gen_unsafe_paths/stderr_windows.txt ================================================ # package test error generating code: invalid file output path: D:/tmp/unsafe.txt ================================================ FILE: internal/endtoend/testdata/where_collate/sqlite/go/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/where_collate/sqlite/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package querytest type Account struct { ID string Name string } ================================================ FILE: internal/endtoend/testdata/where_collate/sqlite/go/query.sql.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 // source: query.sql package querytest import ( "context" ) const getAccountByName = `-- name: GetAccountByName :one SELECT id, name FROM accounts WHERE name = ? COLLATE NOCASE LIMIT 1 ` func (q *Queries) GetAccountByName(ctx context.Context, name string) (Account, error) { row := q.db.QueryRowContext(ctx, getAccountByName, name) var i Account err := row.Scan(&i.ID, &i.Name) return i, err } ================================================ FILE: internal/endtoend/testdata/where_collate/sqlite/query.sql ================================================ -- name: GetAccountByName :one SELECT * FROM accounts WHERE name = ? COLLATE NOCASE LIMIT 1; ================================================ FILE: internal/endtoend/testdata/where_collate/sqlite/schema.sql ================================================ CREATE TABLE accounts ( id TEXT NOT NULL PRIMARY KEY, name TEXT NOT NULL UNIQUE, UNIQUE (name COLLATE NOCASE) ); ================================================ FILE: internal/endtoend/testdata/where_collate/sqlite/sqlc.json ================================================ { "version": "1", "packages": [ { "path": "go", "engine": "sqlite", "schema": "schema.sql", "queries": "query.sql", "name": "querytest" } ] } ================================================ FILE: internal/endtoend/testdata/wrap_errors/mysql/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/wrap_errors/mysql/db/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/wrap_errors/mysql/db/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/wrap_errors/mysql/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/wrap_errors/mysql/schema.sql ================================================ CREATE TABLE authors ( id BIGINT PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/wrap_errors/mysql/sqlc.yaml ================================================ version: 2 sql: - schema: "schema.sql" queries: "query.sql" engine: "mysql" gen: go: package: "authors" out: "db" wrap_errors: true ================================================ FILE: internal/endtoend/testdata/wrap_errors/postgresql/pgx/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/wrap_errors/postgresql/pgx/db/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/wrap_errors/postgresql/pgx/db/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/wrap_errors/postgresql/pgx/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/wrap_errors/postgresql/pgx/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/wrap_errors/postgresql/pgx/sqlc.yaml ================================================ version: 2 sql: - schema: "schema.sql" queries: "query.sql" engine: "postgresql" gen: go: package: "authors" sql_package: "pgx/v5" out: "db" wrap_errors: true ================================================ FILE: internal/endtoend/testdata/wrap_errors/postgresql/stdlib/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/wrap_errors/postgresql/stdlib/db/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/wrap_errors/postgresql/stdlib/db/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/wrap_errors/postgresql/stdlib/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/wrap_errors/postgresql/stdlib/schema.sql ================================================ CREATE TABLE authors ( id BIGSERIAL PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/wrap_errors/postgresql/stdlib/sqlc.yaml ================================================ version: 2 sql: - schema: "schema.sql" queries: "query.sql" engine: "postgresql" gen: go: package: "authors" out: "db" wrap_errors: true ================================================ FILE: internal/endtoend/testdata/wrap_errors/sqlite/db/db.go ================================================ // 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, } } ================================================ FILE: internal/endtoend/testdata/wrap_errors/sqlite/db/models.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/wrap_errors/sqlite/db/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/wrap_errors/sqlite/query.sql ================================================ -- 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; ================================================ FILE: internal/endtoend/testdata/wrap_errors/sqlite/schema.sql ================================================ CREATE TABLE authors ( id BIGINT PRIMARY KEY, name text NOT NULL, bio text ); ================================================ FILE: internal/endtoend/testdata/wrap_errors/sqlite/sqlc.yaml ================================================ version: 2 sql: - schema: "schema.sql" queries: "query.sql" engine: "sqlite" gen: go: package: "authors" out: "db" wrap_errors: true ================================================ FILE: internal/endtoend/testdata/yaml_overrides/go/db.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override 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, } } ================================================ FILE: internal/endtoend/testdata/yaml_overrides/go/models.go ================================================ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package override import ( "github.com/lib/pq" "github.com/sqlc-dev/sqlc-testdata/pkg" ) type Foo struct { Other string Total int64 Tags []string ByteSeq []byte Retyped pkg.CustomType Langs pq.StringArray } ================================================ FILE: internal/endtoend/testdata/yaml_overrides/go/query.sql.go ================================================ // 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 } ================================================ FILE: internal/endtoend/testdata/yaml_overrides/sql/query.sql ================================================ -- name: Test :one SELECT 1; ================================================ FILE: internal/endtoend/testdata/yaml_overrides/sql/schema.sql ================================================ CREATE TABLE foo ( other text NOT NULL, total bigint NOT NULL, tags text[] NOT NULL, byte_seq bytea NOT NULL, retyped text NOT NULL, langs text[] ); ================================================ FILE: internal/endtoend/testdata/yaml_overrides/sqlc.yaml ================================================ version: 1 packages: - path: "go" name: "override" schema: "sql/" queries: "sql/" overrides: - go_type: "github.com/sqlc-dev/sqlc-testdata/pkg.CustomType" column: "foo.retyped" - go_type: "github.com/lib/pq.StringArray" column: "foo.langs" ================================================ FILE: internal/endtoend/vet_test.go ================================================ //go:build examples package main import ( "bytes" "context" "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) { schemaFile := filepath.Join(path, "schema.sql") if _, err := os.Stat(schemaFile); !os.IsNotExist(err) { return schemaFile, true } schemaDir := filepath.Join(path, "schema") if _, err := os.Stat(schemaDir); !os.IsNotExist(err) { return schemaDir, true } return "", false } func TestExamplesVet(t *testing.T) { t.Parallel() ctx := context.Background() examples, err := filepath.Abs(filepath.Join("..", "..", "examples")) if err != nil { t.Fatal(err) } files, err := os.ReadDir(examples) if err != nil { t.Fatal(err) } for _, replay := range files { if !replay.IsDir() { continue } tc := replay.Name() t.Run(tc, func(t *testing.T) { t.Parallel() path := filepath.Join(examples, tc) if tc != "kotlin" && tc != "python" { 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 opts := &cmd.Options{ Stderr: &stderr, Env: cmd.Env{}, } err := cmd.Vet(ctx, path, "", opts) if err != nil { t.Fatalf("sqlc vet failed: %s %s", err, stderr.String()) } }) } } ================================================ FILE: internal/engine/clickhouse/catalog.go ================================================ package clickhouse import ( "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) func NewCatalog() *catalog.Catalog { def := "default" // ClickHouse default database return &catalog.Catalog{ DefaultSchema: def, Schemas: []*catalog.Schema{ defaultSchema(def), }, Extensions: map[string]struct{}{}, } } ================================================ FILE: internal/engine/clickhouse/convert.go ================================================ package clickhouse import ( "strconv" "strings" chast "github.com/sqlc-dev/doubleclick/ast" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) type cc struct { paramCount int } func (c *cc) convert(node chast.Node) ast.Node { switch n := node.(type) { case *chast.SelectWithUnionQuery: return c.convertSelectWithUnionQuery(n) case *chast.SelectQuery: return c.convertSelectQuery(n) case *chast.InsertQuery: return c.convertInsertQuery(n) case *chast.CreateQuery: return c.convertCreateQuery(n) case *chast.UpdateQuery: return c.convertUpdateQuery(n) case *chast.DeleteQuery: return c.convertDeleteQuery(n) case *chast.DropQuery: return c.convertDropQuery(n) case *chast.AlterQuery: return c.convertAlterQuery(n) case *chast.TruncateQuery: return c.convertTruncateQuery(n) default: return todo(n) } } func (c *cc) convertSelectWithUnionQuery(n *chast.SelectWithUnionQuery) ast.Node { if len(n.Selects) == 0 { return &ast.TODO{} } // Single select without union if len(n.Selects) == 1 { return c.convert(n.Selects[0]) } // Build a chain of SelectStmt with UNION operations var result *ast.SelectStmt for i, sel := range n.Selects { stmt, ok := c.convert(sel).(*ast.SelectStmt) if !ok { continue } if i == 0 { result = stmt } else { unionMode := ast.Union if i-1 < len(n.UnionModes) { switch strings.ToUpper(n.UnionModes[i-1]) { case "ALL": unionMode = ast.Union case "DISTINCT": unionMode = ast.Union } } result = &ast.SelectStmt{ Op: unionMode, All: n.UnionAll || (i-1 < len(n.UnionModes) && strings.ToUpper(n.UnionModes[i-1]) == "ALL"), Larg: result, Rarg: stmt, } } } return result } func (c *cc) convertSelectQuery(n *chast.SelectQuery) *ast.SelectStmt { stmt := &ast.SelectStmt{} // Convert target list (SELECT columns) if len(n.Columns) > 0 { stmt.TargetList = &ast.List{} for _, col := range n.Columns { target := c.convertToResTarget(col) if target != nil { stmt.TargetList.Items = append(stmt.TargetList.Items, target) } } } // Convert FROM clause if n.From != nil { stmt.FromClause = c.convertTablesInSelectQuery(n.From) } // Convert WHERE clause if n.Where != nil { stmt.WhereClause = c.convertExpr(n.Where) } // Convert GROUP BY clause if len(n.GroupBy) > 0 { stmt.GroupClause = &ast.List{} for _, expr := range n.GroupBy { stmt.GroupClause.Items = append(stmt.GroupClause.Items, c.convertExpr(expr)) } } // Convert HAVING clause if n.Having != nil { stmt.HavingClause = c.convertExpr(n.Having) } // Convert ORDER BY clause if len(n.OrderBy) > 0 { stmt.SortClause = &ast.List{} for _, orderBy := range n.OrderBy { stmt.SortClause.Items = append(stmt.SortClause.Items, c.convertOrderByElement(orderBy)) } } // Convert LIMIT clause if n.Limit != nil { stmt.LimitCount = c.convertExpr(n.Limit) } // Convert OFFSET clause if n.Offset != nil { stmt.LimitOffset = c.convertExpr(n.Offset) } // Convert DISTINCT clause if n.Distinct { stmt.DistinctClause = &ast.List{} } // Convert DISTINCT ON clause if len(n.DistinctOn) > 0 { stmt.DistinctClause = &ast.List{} for _, expr := range n.DistinctOn { stmt.DistinctClause.Items = append(stmt.DistinctClause.Items, c.convertExpr(expr)) } } // Convert WITH clause (CTEs) if len(n.With) > 0 { stmt.WithClause = &ast.WithClause{ Ctes: &ast.List{}, } for _, cte := range n.With { if aliased, ok := cte.(*chast.AliasedExpr); ok { cteNode := &ast.CommonTableExpr{ Ctename: &aliased.Alias, } // CTE expression may be a Subquery containing the actual SELECT if subq, ok := aliased.Expr.(*chast.Subquery); ok { cteNode.Ctequery = c.convert(subq.Query) } else { // Fallback: treat the expression itself as the query cteNode.Ctequery = c.convertExpr(aliased.Expr) } stmt.WithClause.Ctes.Items = append(stmt.WithClause.Ctes.Items, cteNode) } } } return stmt } func (c *cc) convertToResTarget(expr chast.Expression) *ast.ResTarget { res := &ast.ResTarget{ Location: expr.Pos().Offset, } switch e := expr.(type) { case *chast.Asterisk: if e.Table != "" { // table.* res.Val = &ast.ColumnRef{ Fields: &ast.List{ Items: []ast.Node{ NewIdentifier(e.Table), &ast.A_Star{}, }, }, } } else { // Just * res.Val = &ast.ColumnRef{ Fields: &ast.List{ Items: []ast.Node{&ast.A_Star{}}, }, } } case *chast.AliasedExpr: res.Name = &e.Alias res.Val = c.convertExpr(e.Expr) case *chast.Identifier: if e.Alias != "" { res.Name = &e.Alias } res.Val = c.convertIdentifier(e) case *chast.FunctionCall: if e.Alias != "" { res.Name = &e.Alias } res.Val = c.convertFunctionCall(e) default: res.Val = c.convertExpr(expr) } return res } func (c *cc) convertTablesInSelectQuery(n *chast.TablesInSelectQuery) *ast.List { if n == nil || len(n.Tables) == 0 { return nil } result := &ast.List{} for i, elem := range n.Tables { if elem.Table != nil { tableExpr := c.convertTableExpression(elem.Table) if i == 0 { result.Items = append(result.Items, tableExpr) } else if elem.Join != nil { // This element has a join joinExpr := c.convertTableJoin(elem.Join, result.Items[len(result.Items)-1], tableExpr) result.Items[len(result.Items)-1] = joinExpr } else { result.Items = append(result.Items, tableExpr) } } else if elem.Join != nil && len(result.Items) > 0 { // Join without table (should not happen normally) continue } } return result } func (c *cc) convertTableExpression(n *chast.TableExpression) ast.Node { var result ast.Node switch t := n.Table.(type) { case *chast.TableIdentifier: rv := parseTableIdentifierToRangeVar(t) if n.Alias != "" { alias := n.Alias rv.Alias = &ast.Alias{Aliasname: &alias} } result = rv case *chast.Subquery: subselect := &ast.RangeSubselect{ Subquery: c.convert(t.Query), } alias := n.Alias if alias == "" && t.Alias != "" { alias = t.Alias } if alias != "" { subselect.Alias = &ast.Alias{Aliasname: &alias} } result = subselect case *chast.FunctionCall: // Table function like file(), url(), etc. rf := &ast.RangeFunction{ Functions: &ast.List{ Items: []ast.Node{c.convertFunctionCall(t)}, }, } if n.Alias != "" { alias := n.Alias rf.Alias = &ast.Alias{Aliasname: &alias} } result = rf default: result = &ast.TODO{} } return result } func (c *cc) convertTableJoin(n *chast.TableJoin, left, right ast.Node) *ast.JoinExpr { join := &ast.JoinExpr{ Larg: left, Rarg: right, } // Convert join type switch n.Type { case chast.JoinInner: join.Jointype = ast.JoinTypeInner case chast.JoinLeft: join.Jointype = ast.JoinTypeLeft case chast.JoinRight: join.Jointype = ast.JoinTypeRight case chast.JoinFull: join.Jointype = ast.JoinTypeFull case chast.JoinCross: join.Jointype = ast.JoinTypeInner join.IsNatural = false default: join.Jointype = ast.JoinTypeInner } // Convert ON clause if n.On != nil { join.Quals = c.convertExpr(n.On) } // Convert USING clause if len(n.Using) > 0 { join.UsingClause = &ast.List{} for _, u := range n.Using { if id, ok := u.(*chast.Identifier); ok { join.UsingClause.Items = append(join.UsingClause.Items, NewIdentifier(id.Name())) } } } return join } func (c *cc) convertExpr(expr chast.Expression) ast.Node { if expr == nil { return nil } switch e := expr.(type) { case *chast.Identifier: return c.convertIdentifier(e) case *chast.Literal: return c.convertLiteral(e) case *chast.BinaryExpr: return c.convertBinaryExpr(e) case *chast.FunctionCall: return c.convertFunctionCall(e) case *chast.AliasedExpr: return c.convertExpr(e.Expr) case *chast.Parameter: return c.convertParameter(e) case *chast.Asterisk: return c.convertAsterisk(e) case *chast.CaseExpr: return c.convertCaseExpr(e) case *chast.CastExpr: return c.convertCastExpr(e) case *chast.BetweenExpr: return c.convertBetweenExpr(e) case *chast.InExpr: return c.convertInExpr(e) case *chast.IsNullExpr: return c.convertIsNullExpr(e) case *chast.LikeExpr: return c.convertLikeExpr(e) case *chast.Subquery: return c.convertSubquery(e) case *chast.ArrayAccess: return c.convertArrayAccess(e) case *chast.UnaryExpr: return c.convertUnaryExpr(e) case *chast.Lambda: // Lambda expressions are ClickHouse-specific, return as-is for now return &ast.TODO{} default: return &ast.TODO{} } } func (c *cc) convertIdentifier(n *chast.Identifier) *ast.ColumnRef { fields := &ast.List{} for _, part := range n.Parts { fields.Items = append(fields.Items, NewIdentifier(part)) } return &ast.ColumnRef{ Fields: fields, Location: n.Pos().Offset, } } func (c *cc) convertLiteral(n *chast.Literal) *ast.A_Const { switch n.Type { case chast.LiteralString: str := n.Value.(string) return &ast.A_Const{ Val: &ast.String{Str: str}, Location: n.Pos().Offset, } case chast.LiteralInteger: var ival int64 switch v := n.Value.(type) { case int64: ival = v case int: ival = int64(v) case float64: ival = int64(v) case string: ival, _ = strconv.ParseInt(v, 10, 64) } return &ast.A_Const{ Val: &ast.Integer{Ival: ival}, Location: n.Pos().Offset, } case chast.LiteralFloat: var fval float64 switch v := n.Value.(type) { case float64: fval = v case string: fval, _ = strconv.ParseFloat(v, 64) } str := strconv.FormatFloat(fval, 'f', -1, 64) return &ast.A_Const{ Val: &ast.Float{Str: str}, Location: n.Pos().Offset, } case chast.LiteralBoolean: // ClickHouse booleans are typically 0/1 bval := n.Value.(bool) if bval { return &ast.A_Const{ Val: &ast.Integer{Ival: 1}, Location: n.Pos().Offset, } } return &ast.A_Const{ Val: &ast.Integer{Ival: 0}, Location: n.Pos().Offset, } case chast.LiteralNull: return &ast.A_Const{ Val: &ast.Null{}, Location: n.Pos().Offset, } default: return &ast.A_Const{ Location: n.Pos().Offset, } } } func (c *cc) convertBinaryExpr(n *chast.BinaryExpr) ast.Node { op := strings.ToUpper(n.Op) // Handle logical operators if op == "AND" || op == "OR" { var boolop ast.BoolExprType if op == "AND" { boolop = ast.BoolExprTypeAnd } else { boolop = ast.BoolExprTypeOr } return &ast.BoolExpr{ Boolop: boolop, Args: &ast.List{ Items: []ast.Node{ c.convertExpr(n.Left), c.convertExpr(n.Right), }, }, Location: n.Pos().Offset, } } // Handle other operators return &ast.A_Expr{ Name: &ast.List{ Items: []ast.Node{&ast.String{Str: n.Op}}, }, Lexpr: c.convertExpr(n.Left), Rexpr: c.convertExpr(n.Right), Location: n.Pos().Offset, } } func (c *cc) convertFunctionCall(n *chast.FunctionCall) *ast.FuncCall { fc := &ast.FuncCall{ Funcname: &ast.List{ Items: []ast.Node{&ast.String{Str: n.Name}}, }, Location: n.Pos().Offset, AggDistinct: n.Distinct, } // Convert arguments if len(n.Arguments) > 0 { fc.Args = &ast.List{} for _, arg := range n.Arguments { fc.Args.Items = append(fc.Args.Items, c.convertExpr(arg)) } } // Convert window function if n.Over != nil { fc.Over = &ast.WindowDef{} if len(n.Over.PartitionBy) > 0 { fc.Over.PartitionClause = &ast.List{} for _, p := range n.Over.PartitionBy { fc.Over.PartitionClause.Items = append(fc.Over.PartitionClause.Items, c.convertExpr(p)) } } if len(n.Over.OrderBy) > 0 { fc.Over.OrderClause = &ast.List{} for _, o := range n.Over.OrderBy { fc.Over.OrderClause.Items = append(fc.Over.OrderClause.Items, c.convertOrderByElement(o)) } } } return fc } func (c *cc) convertParameter(n *chast.Parameter) ast.Node { c.paramCount++ // Use the parameter name if available name := n.Name if name == "" { name = strconv.Itoa(c.paramCount) } return &ast.ParamRef{ Number: c.paramCount, Location: n.Pos().Offset, } } func (c *cc) convertAsterisk(n *chast.Asterisk) *ast.ColumnRef { fields := &ast.List{} if n.Table != "" { fields.Items = append(fields.Items, NewIdentifier(n.Table)) } fields.Items = append(fields.Items, &ast.A_Star{}) return &ast.ColumnRef{ Fields: fields, Location: n.Pos().Offset, } } func (c *cc) convertCaseExpr(n *chast.CaseExpr) *ast.CaseExpr { ce := &ast.CaseExpr{ Location: n.Pos().Offset, } // Convert test expression (CASE expr WHEN ...) if n.Operand != nil { ce.Arg = c.convertExpr(n.Operand) } // Convert WHEN clauses if len(n.Whens) > 0 { ce.Args = &ast.List{} for _, when := range n.Whens { caseWhen := &ast.CaseWhen{ Expr: c.convertExpr(when.Condition), Result: c.convertExpr(when.Result), } ce.Args.Items = append(ce.Args.Items, caseWhen) } } // Convert ELSE clause if n.Else != nil { ce.Defresult = c.convertExpr(n.Else) } return ce } func (c *cc) convertCastExpr(n *chast.CastExpr) *ast.TypeCast { tc := &ast.TypeCast{ Arg: c.convertExpr(n.Expr), Location: n.Pos().Offset, } if n.Type != nil { tc.TypeName = &ast.TypeName{ Name: n.Type.Name, } } return tc } func (c *cc) convertBetweenExpr(n *chast.BetweenExpr) *ast.BetweenExpr { return &ast.BetweenExpr{ Expr: c.convertExpr(n.Expr), Left: c.convertExpr(n.Low), Right: c.convertExpr(n.High), Not: n.Not, Location: n.Pos().Offset, } } func (c *cc) convertInExpr(n *chast.InExpr) *ast.In { in := &ast.In{ Expr: c.convertExpr(n.Expr), Not: n.Not, Location: n.Pos().Offset, } // Convert the list if len(n.List) > 0 { in.List = make([]ast.Node, 0, len(n.List)) for _, item := range n.List { in.List = append(in.List, c.convertExpr(item)) } } // Handle subquery if n.Query != nil { in.Sel = c.convert(n.Query) } return in } func (c *cc) convertIsNullExpr(n *chast.IsNullExpr) *ast.NullTest { nullTest := &ast.NullTest{ Arg: c.convertExpr(n.Expr), Location: n.Pos().Offset, } if n.Not { nullTest.Nulltesttype = ast.NullTestTypeIsNotNull } else { nullTest.Nulltesttype = ast.NullTestTypeIsNull } return nullTest } func (c *cc) convertLikeExpr(n *chast.LikeExpr) *ast.A_Expr { kind := ast.A_Expr_Kind(0) opName := "~~" if n.CaseInsensitive { opName = "~~*" } if n.Not { opName = "!~~" if n.CaseInsensitive { opName = "!~~*" } } return &ast.A_Expr{ Kind: kind, Name: &ast.List{ Items: []ast.Node{&ast.String{Str: opName}}, }, Lexpr: c.convertExpr(n.Expr), Rexpr: c.convertExpr(n.Pattern), Location: n.Pos().Offset, } } func (c *cc) convertSubquery(n *chast.Subquery) *ast.SubLink { return &ast.SubLink{ SubLinkType: ast.EXISTS_SUBLINK, Subselect: c.convert(n.Query), } } func (c *cc) convertArrayAccess(n *chast.ArrayAccess) *ast.A_Indirection { return &ast.A_Indirection{ Arg: c.convertExpr(n.Array), Indirection: &ast.List{ Items: []ast.Node{ &ast.A_Indices{ Uidx: c.convertExpr(n.Index), }, }, }, } } func (c *cc) convertUnaryExpr(n *chast.UnaryExpr) ast.Node { op := strings.ToUpper(n.Op) if op == "NOT" { return &ast.BoolExpr{ Boolop: ast.BoolExprTypeNot, Args: &ast.List{ Items: []ast.Node{c.convertExpr(n.Operand)}, }, Location: n.Pos().Offset, } } return &ast.A_Expr{ Name: &ast.List{ Items: []ast.Node{&ast.String{Str: n.Op}}, }, Rexpr: c.convertExpr(n.Operand), Location: n.Pos().Offset, } } func (c *cc) convertOrderByElement(n *chast.OrderByElement) *ast.SortBy { sortBy := &ast.SortBy{ Node: c.convertExpr(n.Expression), Location: n.Expression.Pos().Offset, } if n.Descending { sortBy.SortbyDir = ast.SortByDirDesc } else { sortBy.SortbyDir = ast.SortByDirAsc } if n.NullsFirst != nil { if *n.NullsFirst { sortBy.SortbyNulls = ast.SortByNullsFirst } else { sortBy.SortbyNulls = ast.SortByNullsLast } } return sortBy } func (c *cc) convertInsertQuery(n *chast.InsertQuery) *ast.InsertStmt { stmt := &ast.InsertStmt{ Relation: &ast.RangeVar{ Relname: &n.Table, }, } if n.Database != "" { stmt.Relation.Schemaname = &n.Database } // Convert column list if len(n.Columns) > 0 { stmt.Cols = &ast.List{} for _, col := range n.Columns { name := col.Name() stmt.Cols.Items = append(stmt.Cols.Items, &ast.ResTarget{ Name: &name, }) } } // Convert SELECT subquery if present if n.Select != nil { stmt.SelectStmt = c.convert(n.Select) } // Convert VALUES clause if len(n.Values) > 0 { selectStmt := &ast.SelectStmt{ ValuesLists: &ast.List{}, } for _, row := range n.Values { rowList := &ast.List{} for _, val := range row { rowList.Items = append(rowList.Items, c.convertExpr(val)) } selectStmt.ValuesLists.Items = append(selectStmt.ValuesLists.Items, rowList) } stmt.SelectStmt = selectStmt } return stmt } func (c *cc) convertCreateQuery(n *chast.CreateQuery) ast.Node { // Handle CREATE DATABASE if n.CreateDatabase { return &ast.CreateSchemaStmt{ Name: &n.Database, IfNotExists: n.IfNotExists, } } // Handle CREATE TABLE if n.Table != "" { stmt := &ast.CreateTableStmt{ Name: &ast.TableName{ Name: identifier(n.Table), }, IfNotExists: n.IfNotExists, } if n.Database != "" { stmt.Name.Schema = identifier(n.Database) } // Convert columns for _, col := range n.Columns { colDef := c.convertColumnDeclaration(col) stmt.Cols = append(stmt.Cols, colDef) } // Convert AS SELECT if n.AsSelect != nil { // This is a CREATE TABLE ... AS SELECT // The AsSelect field contains the SELECT statement } return stmt } // Handle CREATE VIEW if n.View != "" { return &ast.ViewStmt{ View: &ast.RangeVar{ Relname: &n.View, }, Query: c.convert(n.AsSelect), Replace: n.OrReplace, } } return &ast.TODO{} } func (c *cc) convertColumnDeclaration(n *chast.ColumnDeclaration) *ast.ColumnDef { colDef := &ast.ColumnDef{ Colname: identifier(n.Name), IsNotNull: isNotNull(n), } if n.Type != nil { colDef.TypeName = &ast.TypeName{ Name: n.Type.Name, } // Handle type parameters (e.g., Decimal(10, 2)) if len(n.Type.Parameters) > 0 { colDef.TypeName.Typmods = &ast.List{} for _, param := range n.Type.Parameters { colDef.TypeName.Typmods.Items = append(colDef.TypeName.Typmods.Items, c.convertExpr(param)) } } } // Handle PRIMARY KEY constraint if n.PrimaryKey { colDef.PrimaryKey = true } // Handle DEFAULT if n.Default != nil { // colDef.RawDefault = c.convertExpr(n.Default) } // Handle comment if n.Comment != "" { colDef.Comment = n.Comment } return colDef } func (c *cc) convertUpdateQuery(n *chast.UpdateQuery) *ast.UpdateStmt { rv := &ast.RangeVar{ Relname: &n.Table, } if n.Database != "" { rv.Schemaname = &n.Database } stmt := &ast.UpdateStmt{ Relations: &ast.List{ Items: []ast.Node{rv}, }, } // Convert assignments if len(n.Assignments) > 0 { stmt.TargetList = &ast.List{} for _, assign := range n.Assignments { name := identifier(assign.Column) stmt.TargetList.Items = append(stmt.TargetList.Items, &ast.ResTarget{ Name: &name, Val: c.convertExpr(assign.Value), }) } } // Convert WHERE clause if n.Where != nil { stmt.WhereClause = c.convertExpr(n.Where) } return stmt } func (c *cc) convertDeleteQuery(n *chast.DeleteQuery) *ast.DeleteStmt { rv := &ast.RangeVar{ Relname: &n.Table, } if n.Database != "" { rv.Schemaname = &n.Database } stmt := &ast.DeleteStmt{ Relations: &ast.List{ Items: []ast.Node{rv}, }, } // Convert WHERE clause if n.Where != nil { stmt.WhereClause = c.convertExpr(n.Where) } return stmt } func (c *cc) convertDropQuery(n *chast.DropQuery) ast.Node { // Handle DROP TABLE if n.Table != "" { tableName := &ast.TableName{ Name: identifier(n.Table), } if n.Database != "" { tableName.Schema = identifier(n.Database) } return &ast.DropTableStmt{ IfExists: n.IfExists, Tables: []*ast.TableName{tableName}, } } // Handle DROP TABLE with multiple tables if len(n.Tables) > 0 { tables := make([]*ast.TableName, 0, len(n.Tables)) for _, t := range n.Tables { tables = append(tables, parseTableName(t)) } return &ast.DropTableStmt{ IfExists: n.IfExists, Tables: tables, } } // Handle DROP DATABASE - return TODO for now // Handle DROP VIEW - return TODO for now return &ast.TODO{} } func (c *cc) convertAlterQuery(n *chast.AlterQuery) ast.Node { alt := &ast.AlterTableStmt{ Table: &ast.TableName{ Name: identifier(n.Table), }, Cmds: &ast.List{}, } if n.Database != "" { alt.Table.Schema = identifier(n.Database) } for _, cmd := range n.Commands { switch cmd.Type { case chast.AlterAddColumn: if cmd.Column != nil { name := cmd.Column.Name alt.Cmds.Items = append(alt.Cmds.Items, &ast.AlterTableCmd{ Name: &name, Subtype: ast.AT_AddColumn, Def: c.convertColumnDeclaration(cmd.Column), }) } case chast.AlterDropColumn: name := cmd.ColumnName alt.Cmds.Items = append(alt.Cmds.Items, &ast.AlterTableCmd{ Name: &name, Subtype: ast.AT_DropColumn, MissingOk: cmd.IfExists, }) case chast.AlterModifyColumn: if cmd.Column != nil { name := cmd.Column.Name // Drop and re-add to simulate modify alt.Cmds.Items = append(alt.Cmds.Items, &ast.AlterTableCmd{ Name: &name, Subtype: ast.AT_DropColumn, }) alt.Cmds.Items = append(alt.Cmds.Items, &ast.AlterTableCmd{ Name: &name, Subtype: ast.AT_AddColumn, Def: c.convertColumnDeclaration(cmd.Column), }) } case chast.AlterRenameColumn: oldName := cmd.ColumnName newName := cmd.NewName return &ast.RenameColumnStmt{ Table: alt.Table, Col: &ast.ColumnRef{Name: oldName}, NewName: &newName, } } } return alt } func (c *cc) convertTruncateQuery(n *chast.TruncateQuery) *ast.TruncateStmt { stmt := &ast.TruncateStmt{ Relations: &ast.List{}, } tableName := n.Table schemaName := n.Database rv := &ast.RangeVar{ Relname: &tableName, } if schemaName != "" { rv.Schemaname = &schemaName } stmt.Relations.Items = append(stmt.Relations.Items, rv) return stmt } ================================================ FILE: internal/engine/clickhouse/format.go ================================================ package clickhouse // QuoteIdent returns a quoted identifier if it needs quoting. // ClickHouse uses backticks or double quotes for quoting identifiers. func (p *Parser) QuoteIdent(s string) string { // For now, don't quote - can be extended to quote when necessary return s } // TypeName returns the SQL type name for the given namespace and name. func (p *Parser) TypeName(ns, name string) string { if ns != "" { return ns + "." + name } return name } // Param returns the parameter placeholder for the given number. // ClickHouse uses {name:Type} for named parameters, but for positional // parameters we use ? which is supported by the clickhouse-go driver. func (p *Parser) Param(n int) string { return "?" } // NamedParam returns the named parameter placeholder for the given name. // ClickHouse uses {name:Type} syntax for named parameters. func (p *Parser) NamedParam(name string) string { return "{" + name + ":String}" } // Cast returns a type cast expression. // ClickHouse uses CAST(expr AS type) syntax, same as MySQL. func (p *Parser) Cast(arg, typeName string) string { return "CAST(" + arg + " AS " + typeName + ")" } ================================================ FILE: internal/engine/clickhouse/parse.go ================================================ package clickhouse import ( "bytes" "context" "io" "github.com/sqlc-dev/doubleclick/parser" "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) { blob, err := io.ReadAll(r) if err != nil { return nil, err } ctx := context.Background() stmtNodes, err := parser.Parse(ctx, bytes.NewReader(blob)) if err != nil { return nil, err } var stmts []ast.Statement for _, stmt := range stmtNodes { converter := &cc{} out := converter.convert(stmt) if _, ok := out.(*ast.TODO); ok { continue } // Get position information from the statement pos := stmt.Pos() end := stmt.End() stmtLen := end.Offset - pos.Offset stmts = append(stmts, ast.Statement{ Raw: &ast.RawStmt{ Stmt: out, StmtLocation: pos.Offset, StmtLen: stmtLen, }, }) } return stmts, nil } // https://clickhouse.com/docs/en/sql-reference/syntax#comments func (p *Parser) CommentSyntax() source.CommentSyntax { return source.CommentSyntax{ Dash: true, // -- comment SlashStar: true, // /* comment */ Hash: true, // # comment (ClickHouse supports this) } } ================================================ FILE: internal/engine/clickhouse/reserved.go ================================================ package clickhouse import "strings" // https://clickhouse.com/docs/en/sql-reference/syntax#keywords func (p *Parser) IsReservedKeyword(s string) bool { switch strings.ToLower(s) { case "add": case "after": case "alias": case "all": case "alter": case "and": case "anti": case "any": case "array": case "as": case "asc": case "asof": case "between": case "both": case "by": case "case": case "cast": case "check": case "cluster": case "collate": case "column": case "comment": case "constraint": case "create": case "cross": case "cube": case "database": case "databases": case "default": case "delete": case "desc": case "describe": case "detach": case "distinct": case "distributed": case "drop": case "else": case "end": case "engine": case "exists": case "explain": case "expression": case "extract": case "false": case "fetch": case "final": case "first": case "for": case "format": case "from": case "full": case "function": case "global": case "grant": case "group": case "having": case "if": case "ilike": case "in": case "index": case "inner": case "insert": case "interpolate": case "interval": case "into": case "is": case "join": case "key": case "kill": case "last": case "leading": case "left": case "like": case "limit": case "live": case "local": case "logs": case "materialized": case "modify": case "natural": case "not": case "null": case "nulls": case "offset": case "on": case "optimize": case "or": case "order": case "outer": case "outfile": case "over": case "partition": case "paste": case "populate": case "prewhere": case "primary": case "projection": case "rename": case "replace": case "right": case "rollup": case "sample": case "select": case "semi": case "set": case "settings": case "show": case "storage": case "substring": case "sync": case "system": case "table": case "tables": case "temporary": case "test": case "then": case "ties": case "to": case "top": case "totals": case "trailing": case "trim": case "true": case "truncate": case "ttl": case "type": case "union": case "update": case "use": case "using": case "uuid": case "values": case "view": case "watch": case "when": case "where": case "window": case "with": default: return false } return true } ================================================ FILE: internal/engine/clickhouse/stdlib.go ================================================ package clickhouse import ( "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) func defaultSchema(name string) *catalog.Schema { return &catalog.Schema{Name: name} } ================================================ FILE: internal/engine/clickhouse/utils.go ================================================ package clickhouse import ( "log" "strings" chast "github.com/sqlc-dev/doubleclick/ast" "github.com/sqlc-dev/sqlc/internal/debug" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) func todo(n chast.Node) *ast.TODO { if debug.Active { log.Printf("clickhouse.convert: Unknown node type %T\n", n) } return &ast.TODO{} } func identifier(id string) string { return strings.ToLower(id) } func NewIdentifier(t string) *ast.String { return &ast.String{Str: identifier(t)} } func parseTableName(n *chast.TableIdentifier) *ast.TableName { return &ast.TableName{ Schema: identifier(n.Database), Name: identifier(n.Table), } } func parseTableIdentifierToRangeVar(n *chast.TableIdentifier) *ast.RangeVar { schemaname := identifier(n.Database) relname := identifier(n.Table) return &ast.RangeVar{ Schemaname: &schemaname, Relname: &relname, } } func isNotNull(n *chast.ColumnDeclaration) bool { if n.Type == nil { return false } // Check if type is wrapped in Nullable() // If it's Nullable, it can be null, so return false // If it's not Nullable, it's NOT NULL by default in ClickHouse if n.Type.Name != "" && strings.ToLower(n.Type.Name) == "nullable" { return false } // Also check if Nullable field is explicitly set if n.Nullable != nil && *n.Nullable { return false } return true } ================================================ FILE: internal/engine/dolphin/CLAUDE.md ================================================ # Dolphin Engine (MySQL) - Claude Code Guide The dolphin engine handles MySQL parsing and AST conversion using the TiDB parser. ## Architecture ### Parser Flow ``` SQL String → TiDB Parser → TiDB AST → sqlc AST → Analysis/Codegen ``` ### Key Files - `convert.go` - Converts TiDB AST nodes to sqlc AST nodes - `format.go` - MySQL-specific formatting (identifiers, types, parameters) - `parse.go` - Entry point for parsing MySQL SQL ## TiDB Parser The TiDB parser (`github.com/pingcap/tidb/pkg/parser`) is used for MySQL parsing: ```go import ( pcast "github.com/pingcap/tidb/pkg/parser/ast" "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/pingcap/tidb/pkg/parser/types" ) ``` ### Common TiDB Types - `pcast.SelectStmt`, `pcast.InsertStmt`, etc. - Statement types - `pcast.ColumnNameExpr` - Column reference - `pcast.FuncCallExpr` - Function call - `pcast.BinaryOperationExpr` - Binary expression - `pcast.VariableExpr` - MySQL user variable (@var) - `pcast.Join` - JOIN clause with Left, Right, On, Using ## Conversion Pattern Each TiDB node type has a corresponding converter method: ```go func (c *cc) convertSelectStmt(n *pcast.SelectStmt) *ast.SelectStmt { return &ast.SelectStmt{ FromClause: c.convertTableRefsClause(n.From), WhereClause: c.convert(n.Where), // ... } } ``` The main `convert()` method dispatches to specific converters: ```go func (c *cc) convert(node pcast.Node) ast.Node { switch n := node.(type) { case *pcast.SelectStmt: return c.convertSelectStmt(n) case *pcast.InsertStmt: return c.convertInsertStmt(n) // ... } } ``` ## Key Conversions ### Column References ```go func (c *cc) convertColumnNameExpr(n *pcast.ColumnNameExpr) *ast.ColumnRef { var items []ast.Node if schema := n.Name.Schema.String(); schema != "" { items = append(items, NewIdentifier(schema)) } if table := n.Name.Table.String(); table != "" { items = append(items, NewIdentifier(table)) } items = append(items, NewIdentifier(n.Name.Name.String())) return &ast.ColumnRef{Fields: &ast.List{Items: items}} } ``` ### JOINs ```go func (c *cc) convertJoin(n *pcast.Join) *ast.List { if n.Right != nil && n.Left != nil { return &ast.List{ Items: []ast.Node{&ast.JoinExpr{ Jointype: ast.JoinType(n.Tp), Larg: c.convert(n.Left), Rarg: c.convert(n.Right), Quals: c.convert(n.On), UsingClause: convertUsing(n.Using), }}, } } // No join - just return tables // ... } ``` ### MySQL User Variables MySQL user variables (`@var`) are different from sqlc's `@param` syntax: ```go func (c *cc) convertVariableExpr(n *pcast.VariableExpr) ast.Node { // Use VariableExpr to preserve as-is (NOT A_Expr which would be treated as sqlc param) return &ast.VariableExpr{ Name: n.Name, Location: n.OriginTextPosition(), } } ``` ### Type Casts (CAST AS) ```go func (c *cc) convertFuncCastExpr(n *pcast.FuncCastExpr) ast.Node { typeName := types.TypeStr(n.Tp.GetType()) // Handle UNSIGNED/SIGNED specially if typeName == "bigint" { if mysql.HasUnsignedFlag(n.Tp.GetFlag()) { typeName = "bigint unsigned" } else { typeName = "bigint signed" } } return &ast.TypeCast{ Arg: c.convert(n.Expr), TypeName: &ast.TypeName{Name: typeName}, } } ``` ### Column Definitions ```go func convertColumnDef(def *pcast.ColumnDef) *ast.ColumnDef { typeName := &ast.TypeName{Name: types.TypeToStr(def.Tp.GetType(), def.Tp.GetCharset())} // Only add Typmods for types where length is meaningful tp := def.Tp.GetType() flen := def.Tp.GetFlen() switch tp { case mysql.TypeVarchar, mysql.TypeString, mysql.TypeVarString: if flen >= 0 { typeName.Typmods = &ast.List{ Items: []ast.Node{&ast.Integer{Ival: int64(flen)}}, } } // Don't add for DATETIME, TIMESTAMP - internal flen is not user-specified } // ... } ``` ### Multi-Table DELETE MySQL supports `DELETE t1, t2 FROM t1 JOIN t2 ...`: ```go func (c *cc) convertDeleteStmt(n *pcast.DeleteStmt) *ast.DeleteStmt { if n.IsMultiTable && n.Tables != nil { // Convert targets (t1.*, t2.*) targets := &ast.List{} for _, table := range n.Tables.Tables { // Build ColumnRef for each target } stmt.Targets = targets // Preserve JOINs in FromClause stmt.FromClause = c.convertTableRefsClause(n.TableRefs).Items[0] } else { // Single-table DELETE stmt.Relations = c.convertTableRefsClause(n.TableRefs) } } ``` ## MySQL-Specific Formatting ### format.go ```go func (p *Parser) TypeName(ns, name string) string { switch name { case "bigint unsigned": return "UNSIGNED" case "bigint signed": return "SIGNED" } return name } func (p *Parser) Param(n int) string { return "?" // MySQL uses ? for all parameters } ``` ## Common Issues and Solutions ### Issue: Panic in Walk/Apply **Cause**: New AST node type not handled in `astutils/walk.go` or `astutils/rewrite.go` **Solution**: Add case for the node type in both files ### Issue: sqlc.arg() not converted in ON DUPLICATE KEY UPDATE **Cause**: `InsertStmt` case in `rewrite.go` didn't traverse `OnDuplicateKeyUpdate` **Solution**: Add `a.apply(n, "OnDuplicateKeyUpdate", nil, n.OnDuplicateKeyUpdate)` ### Issue: MySQL @variable being treated as parameter **Cause**: Converting `VariableExpr` to `A_Expr` with `@` operator **Solution**: Use `ast.VariableExpr` instead, which is not detected by `named.IsParamSign()` ### Issue: Type length appearing incorrectly (e.g., datetime(39)) **Cause**: Using internal `flen` for all types **Solution**: Only populate `Typmods` for types where length is user-specified (varchar, char, etc.) ## Testing ### TestFormat Tests that SQL can be: 1. Parsed 2. Formatted back to SQL 3. Re-parsed 4. Re-formatted to match ### TestReplay Tests the full sqlc pipeline: 1. Parse schema and queries 2. Analyze 3. Generate code 4. Compare with expected output ================================================ FILE: internal/engine/dolphin/catalog.go ================================================ package dolphin import ( "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) func NewCatalog() *catalog.Catalog { def := "public" // TODO: What is the default database for MySQL? return &catalog.Catalog{ DefaultSchema: def, Schemas: []*catalog.Schema{ defaultSchema(def), }, Extensions: map[string]struct{}{}, } } ================================================ FILE: internal/engine/dolphin/convert.go ================================================ package dolphin import ( "log" "strconv" "strings" 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" ) type cc struct { paramCount int } func todo(n pcast.Node) *ast.TODO { if debug.Active { log.Printf("dolphin.convert: Unknown node type %T\n", n) } return &ast.TODO{} } func identifier(id string) string { return strings.ToLower(id) } func NewIdentifier(t string) *ast.String { return &ast.String{Str: identifier(t)} } func (c *cc) convertAlterTableStmt(n *pcast.AlterTableStmt) ast.Node { alt := &ast.AlterTableStmt{ Table: parseTableName(n.Table), Cmds: &ast.List{}, } for _, spec := range n.Specs { switch spec.Tp { case pcast.AlterTableAddColumns: for _, def := range spec.NewColumns { name := def.Name.String() alt.Cmds.Items = append(alt.Cmds.Items, &ast.AlterTableCmd{ Name: &name, Subtype: ast.AT_AddColumn, Def: convertColumnDef(def), }) } case pcast.AlterTableDropColumn: name := spec.OldColumnName.String() alt.Cmds.Items = append(alt.Cmds.Items, &ast.AlterTableCmd{ Name: &name, Subtype: ast.AT_DropColumn, MissingOk: spec.IfExists, }) case pcast.AlterTableChangeColumn: oldName := spec.OldColumnName.String() alt.Cmds.Items = append(alt.Cmds.Items, &ast.AlterTableCmd{ Name: &oldName, Subtype: ast.AT_DropColumn, }) for _, def := range spec.NewColumns { name := def.Name.String() alt.Cmds.Items = append(alt.Cmds.Items, &ast.AlterTableCmd{ Name: &name, Subtype: ast.AT_AddColumn, Def: convertColumnDef(def), }) } case pcast.AlterTableModifyColumn: for _, def := range spec.NewColumns { name := def.Name.String() alt.Cmds.Items = append(alt.Cmds.Items, &ast.AlterTableCmd{ Name: &name, Subtype: ast.AT_DropColumn, }) alt.Cmds.Items = append(alt.Cmds.Items, &ast.AlterTableCmd{ Name: &name, Subtype: ast.AT_AddColumn, Def: convertColumnDef(def), }) } case pcast.AlterTableAlterColumn: // spew.Dump("alter column", spec) case pcast.AlterTableAddConstraint: // spew.Dump("add const", spec) case pcast.AlterTableRenameColumn: // TODO: Returning here may be incorrect if there are multiple specs oldName := spec.OldColumnName.String() newName := spec.NewColumnName.String() return &ast.RenameColumnStmt{ Table: parseTableName(n.Table), Col: &ast.ColumnRef{Name: oldName}, NewName: &newName, } case pcast.AlterTableRenameTable: // TODO: Returning here may be incorrect if there are multiple specs return &ast.RenameTableStmt{ Table: parseTableName(n.Table), NewName: &parseTableName(spec.NewTable).Name, } default: if debug.Active { log.Printf("dolphin.convert: Unknown alter table cmd %v\n", spec.Tp) } continue } } return alt } func (c *cc) convertAssignment(n *pcast.Assignment) *ast.ResTarget { name := identifier(n.Column.Name.String()) return &ast.ResTarget{ Name: &name, Val: c.convert(n.Expr), } } // TODO: These codes should be defined in the sql/lang package func opToName(o opcode.Op) string { switch o { // case opcode.And: // case opcode.BitNeg: // case opcode.Case: // case opcode.Div: case opcode.EQ: return "=" case opcode.GE: return ">=" case opcode.GT: return ">" // case opcode.In: case opcode.IntDiv: return "/" // case opcode.IsFalsity: // case opcode.IsNull: // case opcode.IsTruth: case opcode.LE: return "<=" case opcode.LT: return "<" case opcode.LeftShift: return "<<" // case opcode.Like: case opcode.LogicAnd: return "&" case opcode.LogicOr: return "|" // case opcode.LogicXor: case opcode.Minus: return "-" case opcode.Mod: return "%" case opcode.Mul: return "*" case opcode.NE: return "!=" case opcode.Not: return "!" // case opcode.NullEQ: // case opcode.Or: case opcode.Plus: return "+" case opcode.Regexp: return "~" case opcode.RightShift: return ">>" case opcode.Xor: return "#" default: return o.String() } } func (c *cc) convertBinaryOperationExpr(n *pcast.BinaryOperationExpr) ast.Node { if n.Op == opcode.LogicAnd || n.Op == opcode.LogicOr { var boolop ast.BoolExprType if n.Op == opcode.LogicAnd { boolop = ast.BoolExprTypeAnd } else { boolop = ast.BoolExprTypeOr } return &ast.BoolExpr{ Boolop: boolop, Args: &ast.List{ Items: []ast.Node{ c.convert(n.L), c.convert(n.R), }, }, } } else { return &ast.A_Expr{ // TODO: Set kind Name: &ast.List{ Items: []ast.Node{ &ast.String{Str: opToName(n.Op)}, }, }, Lexpr: c.convert(n.L), Rexpr: c.convert(n.R), } } } func (c *cc) convertCreateTableStmt(n *pcast.CreateTableStmt) ast.Node { create := &ast.CreateTableStmt{ Name: parseTableName(n.Table), IfNotExists: n.IfNotExists, } if n.ReferTable != nil { create.ReferTable = parseTableName(n.ReferTable) } for _, def := range n.Cols { create.Cols = append(create.Cols, convertColumnDef(def)) } for _, opt := range n.Options { switch opt.Tp { case pcast.TableOptionComment: create.Comment = opt.StrValue } } return create } func convertColumnDef(def *pcast.ColumnDef) *ast.ColumnDef { var vals *ast.List if len(def.Tp.GetElems()) > 0 { vals = &ast.List{} for i := range def.Tp.GetElems() { vals.Items = append(vals.Items, &ast.String{ Str: def.Tp.GetElems()[i], }) } } comment := "" for _, opt := range def.Options { switch opt.Tp { case pcast.ColumnOptionComment: if value, ok := opt.Expr.(*driver.ValueExpr); ok { comment = value.GetString() } } } // Build TypeName with modifiers for proper formatting typeName := &ast.TypeName{Name: types.TypeToStr(def.Tp.GetType(), def.Tp.GetCharset())} // Add type modifiers (e.g., length for varchar(255), char(32)) // Only for types where length is meaningful and user-specified tp := def.Tp.GetType() flen := def.Tp.GetFlen() needsLength := false switch tp { case mysql.TypeVarchar, mysql.TypeString, mysql.TypeVarString: // VARCHAR(n), CHAR(n) - always need length needsLength = flen >= 0 case mysql.TypeBlob, mysql.TypeTinyBlob, mysql.TypeMediumBlob, mysql.TypeLongBlob: // BLOB types - only if user specified length (VARBINARY(n), BINARY(n)) // Default blob types don't need length needsLength = false } if needsLength { typeName.Typmods = &ast.List{ Items: []ast.Node{ &ast.Integer{Ival: int64(flen)}, }, } } columnDef := ast.ColumnDef{ Colname: def.Name.String(), TypeName: typeName, IsNotNull: isNotNull(def), IsUnsigned: isUnsigned(def), Comment: comment, Vals: vals, } if def.Tp.GetFlen() >= 0 { length := def.Tp.GetFlen() columnDef.Length = &length } return &columnDef } func (c *cc) convertColumnNameExpr(n *pcast.ColumnNameExpr) *ast.ColumnRef { var items []ast.Node if schema := n.Name.Schema.String(); schema != "" { items = append(items, NewIdentifier(schema)) } if table := n.Name.Table.String(); table != "" { items = append(items, NewIdentifier(table)) } items = append(items, NewIdentifier(n.Name.Name.String())) return &ast.ColumnRef{ Fields: &ast.List{ Items: items, }, Location: n.OriginTextPosition(), } } func (c *cc) convertColumnNames(cols []*pcast.ColumnName) *ast.List { list := &ast.List{Items: []ast.Node{}} for i := range cols { name := identifier(cols[i].Name.String()) list.Items = append(list.Items, &ast.ResTarget{ Name: &name, }) } return list } func (c *cc) convertDeleteStmt(n *pcast.DeleteStmt) *ast.DeleteStmt { stmt := &ast.DeleteStmt{ WhereClause: c.convert(n.Where), ReturningList: &ast.List{}, WithClause: c.convertWithClause(n.With), } if n.Limit != nil { stmt.LimitCount = c.convert(n.Limit.Count) } // Handle multi-table DELETE (DELETE t1, t2 FROM t1 JOIN t2 ...) if n.IsMultiTable && n.Tables != nil && len(n.Tables.Tables) > 0 { // Convert delete targets (e.g., jt.*, pt.*) targets := &ast.List{} for _, table := range n.Tables.Tables { // Each table in the delete list is a ColumnRef like "jt.*" or "pt.*" items := []ast.Node{} if table.Schema.String() != "" { items = append(items, NewIdentifier(table.Schema.String())) } items = append(items, NewIdentifier(table.Name.String())) items = append(items, &ast.A_Star{}) targets.Items = append(targets.Items, &ast.ColumnRef{ Fields: &ast.List{Items: items}, }) } stmt.Targets = targets // Convert FROM clause preserving JOINs if n.TableRefs != nil { fromList := c.convertTableRefsClause(n.TableRefs) if len(fromList.Items) == 1 { stmt.FromClause = fromList.Items[0] } else { stmt.FromClause = fromList } } } else { // Single-table DELETE rels := c.convertTableRefsClause(n.TableRefs) if len(rels.Items) != 1 { panic("expected one range var") } relations := &ast.List{} convertToRangeVarList(rels, relations) stmt.Relations = relations } return stmt } func (c *cc) convertDropTableStmt(n *pcast.DropTableStmt) ast.Node { drop := &ast.DropTableStmt{IfExists: n.IfExists} for _, name := range n.Tables { drop.Tables = append(drop.Tables, parseTableName(name)) } return drop } func (c *cc) convertRenameTableStmt(n *pcast.RenameTableStmt) ast.Node { list := &ast.List{Items: []ast.Node{}} for _, table := range n.TableToTables { list.Items = append(list.Items, &ast.RenameTableStmt{ Table: parseTableName(table.OldTable), NewName: &parseTableName(table.NewTable).Name, }) } return list } func (c *cc) convertExistsSubqueryExpr(n *pcast.ExistsSubqueryExpr) *ast.SubLink { sublink := &ast.SubLink{ SubLinkType: ast.EXISTS_SUBLINK, } if n.Sel != nil { sublink.Subselect = c.convert(n.Sel) } return sublink } func (c *cc) convertFieldList(n *pcast.FieldList) *ast.List { fields := make([]ast.Node, len(n.Fields)) for i := range n.Fields { fields[i] = c.convertSelectField(n.Fields[i]) } return &ast.List{Items: fields} } func (c *cc) convertFuncCallExpr(n *pcast.FuncCallExpr) ast.Node { schema := n.Schema.String() name := strings.ToLower(n.FnName.String()) // TODO: Deprecate the usage of Funcname items := []ast.Node{} if schema != "" { items = append(items, NewIdentifier(schema)) } items = append(items, NewIdentifier(name)) // Handle DATE_ADD/DATE_SUB specially to construct INTERVAL expressions // These functions have args: [date, interval_value, TimeUnitExpr] if (name == "date_add" || name == "date_sub") && len(n.Args) == 3 { if timeUnit, ok := n.Args[2].(*pcast.TimeUnitExpr); ok { args := &ast.List{ Items: []ast.Node{ c.convert(n.Args[0]), &ast.IntervalExpr{ Value: c.convert(n.Args[1]), Unit: timeUnit.Unit.String(), }, }, } return &ast.FuncCall{ Args: args, Func: &ast.FuncName{ Schema: schema, Name: name, }, Funcname: &ast.List{ Items: items, }, Location: n.OriginTextPosition(), } } } args := &ast.List{} for _, arg := range n.Args { args.Items = append(args.Items, c.convert(arg)) } if schema == "" && name == "coalesce" { return &ast.CoalesceExpr{ Args: args, } } else { return &ast.FuncCall{ Args: args, Func: &ast.FuncName{ Schema: schema, Name: name, }, Funcname: &ast.List{ Items: items, }, Location: n.OriginTextPosition(), } } } func (c *cc) convertInsertStmt(n *pcast.InsertStmt) *ast.InsertStmt { rels := c.convertTableRefsClause(n.Table) if len(rels.Items) != 1 { panic("expected one range var") } rel := rels.Items[0] rangeVar, ok := rel.(*ast.RangeVar) if !ok { panic("expected range var") } insert := &ast.InsertStmt{ Relation: rangeVar, Cols: c.convertColumnNames(n.Columns), ReturningList: &ast.List{}, } if ss, ok := c.convert(n.Select).(*ast.SelectStmt); ok { ss.ValuesLists = c.convertLists(n.Lists) insert.SelectStmt = ss } else { insert.SelectStmt = &ast.SelectStmt{ FromClause: &ast.List{}, TargetList: &ast.List{}, ValuesLists: c.convertLists(n.Lists), } } if n.OnDuplicate != nil { targetList := &ast.List{} for _, a := range n.OnDuplicate { targetList.Items = append(targetList.Items, c.convertAssignment(a)) } insert.OnDuplicateKeyUpdate = &ast.OnDuplicateKeyUpdate{ TargetList: targetList, Location: n.OriginTextPosition(), } } return insert } func (c *cc) convertLists(lists [][]pcast.ExprNode) *ast.List { list := &ast.List{Items: []ast.Node{}} for _, exprs := range lists { inner := &ast.List{Items: []ast.Node{}} for _, expr := range exprs { inner.Items = append(inner.Items, c.convert(expr)) } list.Items = append(list.Items, inner) } return list } func (c *cc) convertParamMarkerExpr(n *driver.ParamMarkerExpr) *ast.ParamRef { // Parameter numbers start at one c.paramCount += 1 return &ast.ParamRef{ Number: c.paramCount, Location: n.Offset, } } func (c *cc) convertSelectField(n *pcast.SelectField) *ast.ResTarget { var val ast.Node if n.WildCard != nil { val = c.convertWildCardField(n.WildCard) } else { val = c.convert(n.Expr) } var name *string if n.AsName.O != "" { asname := identifier(n.AsName.O) name = &asname } return &ast.ResTarget{ // TODO: Populate Indirection field Name: name, Val: val, Location: n.Offset, } } func (c *cc) convertSelectStmt(n *pcast.SelectStmt) *ast.SelectStmt { windowClause := &ast.List{Items: make([]ast.Node, 0)} orderByClause := c.convertOrderByClause(n.OrderBy) if orderByClause != nil { windowClause.Items = append(windowClause.Items, orderByClause) } op, all := c.convertSetOprType(n.AfterSetOperator) stmt := &ast.SelectStmt{ TargetList: c.convertFieldList(n.Fields), FromClause: c.convertTableRefsClause(n.From), GroupClause: c.convertGroupByClause(n.GroupBy), HavingClause: c.convertHavingClause(n.Having), WhereClause: c.convert(n.Where), WithClause: c.convertWithClause(n.With), WindowClause: windowClause, Op: op, All: all, } if n.Limit != nil { stmt.LimitCount = c.convert(n.Limit.Count) stmt.LimitOffset = c.convert(n.Limit.Offset) } return stmt } func (c *cc) convertSubqueryExpr(n *pcast.SubqueryExpr) ast.Node { // Wrap subquery in SubLink to ensure parentheses are added return &ast.SubLink{ SubLinkType: ast.EXPR_SUBLINK, Subselect: c.convert(n.Query), } } func (c *cc) convertTableRefsClause(n *pcast.TableRefsClause) *ast.List { if n == nil { return &ast.List{} } return c.convertJoin(n.TableRefs) } func (c *cc) convertCommonTableExpression(n *pcast.CommonTableExpression) *ast.CommonTableExpr { if n == nil { return nil } name := n.Name.String() columns := &ast.List{} for _, col := range n.ColNameList { columns.Items = append(columns.Items, NewIdentifier(col.String())) } // CTE Query is wrapped in SubqueryExpr by TiDB parser. // We need to unwrap it to get the SelectStmt directly, // otherwise it would be double-wrapped with parentheses. var cteQuery ast.Node if n.Query != nil { cteQuery = c.convert(n.Query.Query) } return &ast.CommonTableExpr{ Ctename: &name, Ctequery: cteQuery, Ctecolnames: columns, } } func (c *cc) convertWithClause(n *pcast.WithClause) *ast.WithClause { if n == nil { return nil } list := &ast.List{} for _, n := range n.CTEs { list.Items = append(list.Items, c.convertCommonTableExpression(n)) } return &ast.WithClause{ Ctes: list, Recursive: n.IsRecursive, Location: n.OriginTextPosition(), } } func (c *cc) convertUpdateStmt(n *pcast.UpdateStmt) *ast.UpdateStmt { rels := c.convertTableRefsClause(n.TableRefs) if len(rels.Items) != 1 { panic("expected one range var") } relations := &ast.List{} convertToRangeVarList(rels, relations) // TargetList list := &ast.List{} for _, a := range n.List { list.Items = append(list.Items, c.convertAssignment(a)) } stmt := &ast.UpdateStmt{ Relations: relations, TargetList: list, WhereClause: c.convert(n.Where), FromClause: &ast.List{}, ReturningList: &ast.List{}, WithClause: c.convertWithClause(n.With), } if n.Limit != nil { stmt.LimitCount = c.convert(n.Limit.Count) } return stmt } func (c *cc) convertValueExpr(n *driver.ValueExpr) *ast.A_Const { switch n.TexprNode.Type.GetType() { case mysql.TypeBit: case mysql.TypeDate: case mysql.TypeDatetime: case mysql.TypeGeometry: case mysql.TypeJSON: case mysql.TypeNull: case mysql.TypeSet: case mysql.TypeShort: case mysql.TypeDuration: case mysql.TypeTimestamp: // TODO: Create an AST type for these? case mysql.TypeTiny, mysql.TypeInt24, mysql.TypeYear, mysql.TypeLong, mysql.TypeLonglong: return &ast.A_Const{ Val: &ast.Integer{ Ival: n.Datum.GetInt64(), }, Location: n.OriginTextPosition(), } case mysql.TypeDouble, mysql.TypeFloat, mysql.TypeNewDecimal: return &ast.A_Const{ Val: &ast.Float{ Str: strconv.FormatFloat(n.Datum.GetFloat64(), 'f', -1, 64), }, Location: n.OriginTextPosition(), } case mysql.TypeBlob, mysql.TypeString, mysql.TypeVarchar, mysql.TypeVarString, mysql.TypeLongBlob, mysql.TypeMediumBlob, mysql.TypeTinyBlob, mysql.TypeEnum: } return &ast.A_Const{ Val: &ast.String{ Str: n.Datum.GetString(), }, Location: n.OriginTextPosition(), } } func (c *cc) convertWildCardField(n *pcast.WildCardField) *ast.ColumnRef { items := []ast.Node{} if t := n.Table.String(); t != "" { items = append(items, NewIdentifier(t)) } items = append(items, &ast.A_Star{}) return &ast.ColumnRef{ Fields: &ast.List{ Items: items, }, } } func (c *cc) convertAdminStmt(n *pcast.AdminStmt) ast.Node { return todo(n) } func (c *cc) convertAggregateFuncExpr(n *pcast.AggregateFuncExpr) *ast.FuncCall { name := strings.ToLower(n.F) fn := &ast.FuncCall{ Func: &ast.FuncName{ Name: name, }, Funcname: &ast.List{ Items: []ast.Node{ NewIdentifier(name), }, }, Args: &ast.List{}, AggOrder: &ast.List{}, } // GROUP_CONCAT has special handling: // TiDB always adds the separator as the last argument // We need to extract it and use SEPARATOR syntax args := n.Args var separator string if name == "group_concat" && len(args) >= 2 { // The last arg is always the separator if value, ok := args[len(args)-1].(*driver.ValueExpr); ok { separator = value.GetString() args = args[:len(args)-1] } } for _, a := range args { if value, ok := a.(*driver.ValueExpr); ok { if value.GetInt64() == int64(1) { fn.AggStar = true continue } } fn.Args.Items = append(fn.Args.Items, c.convert(a)) } if n.Distinct { fn.AggDistinct = true } // Store separator for GROUP_CONCAT (only if non-default) if name == "group_concat" && separator != "" && separator != "," { fn.Separator = &separator } return fn } func (c *cc) convertAlterDatabaseStmt(n *pcast.AlterDatabaseStmt) ast.Node { return todo(n) } func (c *cc) convertAlterInstanceStmt(n *pcast.AlterInstanceStmt) ast.Node { return todo(n) } func (c *cc) convertAlterTableSpec(n *pcast.AlterTableSpec) ast.Node { return todo(n) } func (c *cc) convertAlterUserStmt(n *pcast.AlterUserStmt) ast.Node { return todo(n) } func (c *cc) convertAnalyzeTableStmt(n *pcast.AnalyzeTableStmt) ast.Node { return todo(n) } func (c *cc) convertBRIEStmt(n *pcast.BRIEStmt) ast.Node { return todo(n) } func (c *cc) convertBeginStmt(n *pcast.BeginStmt) ast.Node { return todo(n) } func (c *cc) convertBetweenExpr(n *pcast.BetweenExpr) ast.Node { return &ast.BetweenExpr{ Expr: c.convert(n.Expr), Left: c.convert(n.Left), Right: c.convert(n.Right), Location: n.OriginTextPosition(), Not: n.Not, } } func (c *cc) convertBinlogStmt(n *pcast.BinlogStmt) ast.Node { return todo(n) } func (c *cc) convertByItem(n *pcast.ByItem) ast.Node { switch n.Expr.(type) { case *pcast.PositionExpr: return c.convertPositionExpr(n.Expr.(*pcast.PositionExpr)) case *pcast.ColumnNameExpr: return c.convertColumnNameExpr(n.Expr.(*pcast.ColumnNameExpr)) default: return todo(n) } } func (c *cc) convertCaseExpr(n *pcast.CaseExpr) ast.Node { if n == nil { return nil } list := &ast.List{Items: []ast.Node{}} for _, n := range n.WhenClauses { list.Items = append(list.Items, c.convertWhenClause(n)) } return &ast.CaseExpr{ Arg: c.convert(n.Value), Args: list, Defresult: c.convert(n.ElseClause), Location: n.OriginTextPosition(), } } func (c *cc) convertCleanupTableLockStmt(n *pcast.CleanupTableLockStmt) ast.Node { return todo(n) } func (c *cc) convertColumnDef(n *pcast.ColumnDef) ast.Node { return todo(n) } func (c *cc) convertColumnName(n *pcast.ColumnName) ast.Node { return todo(n) } func (c *cc) convertColumnPosition(n *pcast.ColumnPosition) ast.Node { return todo(n) } func (c *cc) convertCommitStmt(n *pcast.CommitStmt) ast.Node { return todo(n) } func (c *cc) convertCompareSubqueryExpr(n *pcast.CompareSubqueryExpr) ast.Node { return todo(n) } func (c *cc) convertConstraint(n *pcast.Constraint) ast.Node { return todo(n) } func (c *cc) convertCreateBindingStmt(n *pcast.CreateBindingStmt) ast.Node { return todo(n) } func (c *cc) convertCreateDatabaseStmt(n *pcast.CreateDatabaseStmt) ast.Node { return &ast.CreateSchemaStmt{ Name: &n.Name.O, IfNotExists: n.IfNotExists, } } func (c *cc) convertCreateIndexStmt(n *pcast.CreateIndexStmt) ast.Node { return todo(n) } func (c *cc) convertCreateSequenceStmt(n *pcast.CreateSequenceStmt) ast.Node { return todo(n) } func (c *cc) convertCreateStatisticsStmt(n *pcast.CreateStatisticsStmt) ast.Node { return todo(n) } func (c *cc) convertCreateUserStmt(n *pcast.CreateUserStmt) ast.Node { return todo(n) } func (c *cc) convertCreateViewStmt(n *pcast.CreateViewStmt) ast.Node { return &ast.ViewStmt{ View: c.convertTableName(n.ViewName), Aliases: &ast.List{}, Query: c.convert(n.Select), Replace: n.OrReplace, Options: &ast.List{}, WithCheckOption: ast.ViewCheckOption(n.CheckOption), } } func (c *cc) convertDeallocateStmt(n *pcast.DeallocateStmt) ast.Node { return todo(n) } func (c *cc) convertDefaultExpr(n *pcast.DefaultExpr) ast.Node { return todo(n) } func (c *cc) convertDeleteTableList(n *pcast.DeleteTableList) ast.Node { return todo(n) } func (c *cc) convertDoStmt(n *pcast.DoStmt) ast.Node { return todo(n) } func (c *cc) convertDropBindingStmt(n *pcast.DropBindingStmt) ast.Node { return todo(n) } func (c *cc) convertDropDatabaseStmt(n *pcast.DropDatabaseStmt) ast.Node { return &ast.DropSchemaStmt{ MissingOk: !n.IfExists, Schemas: []*ast.String{ NewIdentifier(n.Name.O), }, } } func (c *cc) convertDropIndexStmt(n *pcast.DropIndexStmt) ast.Node { return todo(n) } func (c *cc) convertDropSequenceStmt(n *pcast.DropSequenceStmt) ast.Node { return todo(n) } func (c *cc) convertDropStatisticsStmt(n *pcast.DropStatisticsStmt) ast.Node { return todo(n) } func (c *cc) convertDropStatsStmt(n *pcast.DropStatsStmt) ast.Node { return todo(n) } func (c *cc) convertDropUserStmt(n *pcast.DropUserStmt) ast.Node { return todo(n) } func (c *cc) convertExecuteStmt(n *pcast.ExecuteStmt) ast.Node { return todo(n) } func (c *cc) convertExplainForStmt(n *pcast.ExplainForStmt) ast.Node { return todo(n) } func (c *cc) convertExplainStmt(n *pcast.ExplainStmt) ast.Node { return todo(n) } func (c *cc) convertFlashBackTableStmt(n *pcast.FlashBackTableStmt) ast.Node { return todo(n) } func (c *cc) convertFlushStmt(n *pcast.FlushStmt) ast.Node { return todo(n) } func (c *cc) convertFrameBound(n *pcast.FrameBound) ast.Node { return todo(n) } func (c *cc) convertFrameClause(n *pcast.FrameClause) ast.Node { return todo(n) } func (c *cc) convertFuncCastExpr(n *pcast.FuncCastExpr) ast.Node { typeName := types.TypeStr(n.Tp.GetType()) // MySQL CAST AS UNSIGNED/SIGNED uses bigint internally. // We need to preserve the signed/unsigned info for formatting. if typeName == "bigint" { if mysql.HasUnsignedFlag(n.Tp.GetFlag()) { typeName = "bigint unsigned" } else { typeName = "bigint signed" } } return &ast.TypeCast{ Arg: c.convert(n.Expr), TypeName: &ast.TypeName{Name: typeName}, } } func (c *cc) convertGetFormatSelectorExpr(n *pcast.GetFormatSelectorExpr) ast.Node { return todo(n) } func (c *cc) convertGrantRoleStmt(n *pcast.GrantRoleStmt) ast.Node { return todo(n) } func (c *cc) convertGrantStmt(n *pcast.GrantStmt) ast.Node { return todo(n) } func (c *cc) convertGroupByClause(n *pcast.GroupByClause) *ast.List { if n == nil { return &ast.List{} } var items []ast.Node for _, item := range n.Items { items = append(items, c.convertByItem(item)) } return &ast.List{ Items: items, } } func (c *cc) convertHavingClause(n *pcast.HavingClause) ast.Node { if n == nil { return nil } return c.convert(n.Expr) } func (c *cc) convertIndexLockAndAlgorithm(n *pcast.IndexLockAndAlgorithm) ast.Node { return todo(n) } func (c *cc) convertIndexPartSpecification(n *pcast.IndexPartSpecification) ast.Node { return todo(n) } func (c *cc) convertIsNullExpr(n *pcast.IsNullExpr) ast.Node { op := ast.BoolExprTypeIsNull if n.Not { op = ast.BoolExprTypeIsNotNull } return &ast.BoolExpr{ Boolop: op, Args: &ast.List{ Items: []ast.Node{ c.convert(n.Expr), }, }, } } func (c *cc) convertIsTruthExpr(n *pcast.IsTruthExpr) ast.Node { return todo(n) } func (c *cc) convertJoin(n *pcast.Join) *ast.List { if n == nil { return &ast.List{} } if n.Right != nil && n.Left != nil { // MySQL doesn't have a FULL join type joinType := ast.JoinType(n.Tp) if joinType >= ast.JoinTypeFull { joinType++ } // Convert USING clause var usingClause *ast.List if len(n.Using) > 0 { items := make([]ast.Node, len(n.Using)) for i, col := range n.Using { items[i] = &ast.String{Str: col.Name.O} } usingClause = &ast.List{Items: items} } return &ast.List{ Items: []ast.Node{&ast.JoinExpr{ Jointype: joinType, IsNatural: n.NaturalJoin, Larg: c.convert(n.Left), Rarg: c.convert(n.Right), UsingClause: usingClause, Quals: c.convert(n.On), }}, } } var tables []ast.Node if n.Right != nil { tables = append(tables, c.convert(n.Right)) } if n.Left != nil { tables = append(tables, c.convert(n.Left)) } return &ast.List{Items: tables} } func (c *cc) convertKillStmt(n *pcast.KillStmt) ast.Node { return todo(n) } func (c *cc) convertLimit(n *pcast.Limit) ast.Node { return todo(n) } func (c *cc) convertLoadDataStmt(n *pcast.LoadDataStmt) ast.Node { return todo(n) } func (c *cc) convertLoadStatsStmt(n *pcast.LoadStatsStmt) ast.Node { return todo(n) } func (c *cc) convertLockTablesStmt(n *pcast.LockTablesStmt) ast.Node { return todo(n) } func (c *cc) convertMatchAgainst(n *pcast.MatchAgainst) ast.Node { 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 { return todo(n) } func (c *cc) convertOnCondition(n *pcast.OnCondition) ast.Node { if n == nil { return nil } return c.convert(n.Expr) } func (c *cc) convertOnDeleteOpt(n *pcast.OnDeleteOpt) ast.Node { return todo(n) } func (c *cc) convertOnUpdateOpt(n *pcast.OnUpdateOpt) ast.Node { return todo(n) } func (c *cc) convertOrderByClause(n *pcast.OrderByClause) ast.Node { if n == nil { return nil } list := &ast.List{Items: []ast.Node{}} for _, item := range n.Items { list.Items = append(list.Items, c.convert(item.Expr)) } return list } func (c *cc) convertParenthesesExpr(n *pcast.ParenthesesExpr) ast.Node { if n == nil { return nil } inner := c.convert(n.Expr) // Only wrap in ParenExpr for SELECT statements (needed for UNION with parenthesized subqueries) // For other expressions, the BoolExpr already adds parentheses if _, ok := inner.(*ast.SelectStmt); ok { return &ast.ParenExpr{ Expr: inner, Location: n.OriginTextPosition(), } } return inner } func (c *cc) convertPartitionByClause(n *pcast.PartitionByClause) ast.Node { return todo(n) } func (c *cc) convertPatternInExpr(n *pcast.PatternInExpr) ast.Node { var list []ast.Node var val ast.Node expr := c.convert(n.Expr) for _, v := range n.List { val = c.convert(v) if val != nil { list = append(list, val) } } sel := c.convert(n.Sel) in := &ast.In{ Expr: expr, List: list, Not: n.Not, Sel: sel, Location: n.OriginTextPosition(), } return in } func (c *cc) convertPatternLikeExpr(n *pcast.PatternLikeOrIlikeExpr) ast.Node { return &ast.A_Expr{ Kind: ast.A_Expr_Kind(9), Name: &ast.List{ Items: []ast.Node{ &ast.String{Str: "~~"}, }, }, Lexpr: c.convert(n.Expr), Rexpr: c.convert(n.Pattern), } } func (c *cc) convertPatternRegexpExpr(n *pcast.PatternRegexpExpr) ast.Node { return todo(n) } func (c *cc) convertPositionExpr(n *pcast.PositionExpr) ast.Node { return &ast.Integer{Ival: int64(n.N)} } func (c *cc) convertPrepareStmt(n *pcast.PrepareStmt) ast.Node { return todo(n) } func (c *cc) convertPrivElem(n *pcast.PrivElem) ast.Node { return todo(n) } func (c *cc) convertRecoverTableStmt(n *pcast.RecoverTableStmt) ast.Node { return todo(n) } func (c *cc) convertReferenceDef(n *pcast.ReferenceDef) ast.Node { return todo(n) } func (c *cc) convertRepairTableStmt(n *pcast.RepairTableStmt) ast.Node { return todo(n) } func (c *cc) convertRevokeRoleStmt(n *pcast.RevokeRoleStmt) ast.Node { return todo(n) } func (c *cc) convertRevokeStmt(n *pcast.RevokeStmt) ast.Node { return todo(n) } func (c *cc) convertRollbackStmt(n *pcast.RollbackStmt) ast.Node { return todo(n) } func (c *cc) convertRowExpr(n *pcast.RowExpr) ast.Node { return todo(n) } func (c *cc) convertSetCollationExpr(n *pcast.SetCollationExpr) ast.Node { return todo(n) } func (c *cc) convertSetConfigStmt(n *pcast.SetConfigStmt) ast.Node { return todo(n) } func (c *cc) convertSetDefaultRoleStmt(n *pcast.SetDefaultRoleStmt) ast.Node { return todo(n) } func (c *cc) convertSetOprType(n *pcast.SetOprType) (op ast.SetOperation, all bool) { if n == nil { return } switch *n { case pcast.Union: op = ast.Union case pcast.UnionAll: op = ast.Union all = true case pcast.Intersect: op = ast.Intersect case pcast.IntersectAll: op = ast.Intersect all = true case pcast.Except: op = ast.Except case pcast.ExceptAll: op = ast.Except all = true } return } // convertSetOprSelectList converts a list of SELECT from the Pingcap parser // into a tree. It is called for UNION, INTERSECT or EXCLUDE operation. // // Given an union with the following nodes: // // [Select{1}, Select{2}, Select{3}, Select{4}] // // The function will return: // // Select{ // Larg: Select{ // Larg: Select{ // Larg: Select{1}, // Rarg: Select{2}, // Op: Union // }, // Rarg: Select{3}, // Op: Union, // }, // Rarg: Select{4}, // Op: Union, // } func (c *cc) convertSetOprSelectList(n *pcast.SetOprSelectList) ast.Node { selectStmts := make([]*ast.SelectStmt, len(n.Selects)) for i, node := range n.Selects { switch node := node.(type) { case *pcast.SelectStmt: selectStmts[i] = c.convertSelectStmt(node) case *pcast.SetOprSelectList: // If this is a single-select SetOprSelectList (e.g., from parenthesized SELECT), // extract the inner select instead of building a UNION tree if len(node.Selects) == 1 { if innerSelect, ok := node.Selects[0].(*pcast.SelectStmt); ok { selectStmts[i] = c.convertSelectStmt(innerSelect) } else { selectStmts[i] = c.convertSetOprSelectList(node).(*ast.SelectStmt) } } else { selectStmts[i] = c.convertSetOprSelectList(node).(*ast.SelectStmt) } default: // Handle other node types like ParenthesesExpr wrapping a SELECT converted := c.convert(node) if ss, ok := converted.(*ast.SelectStmt); ok { selectStmts[i] = ss } else if pe, ok := converted.(*ast.ParenExpr); ok { // Unwrap ParenExpr to get the inner SelectStmt if inner, ok := pe.Expr.(*ast.SelectStmt); ok { selectStmts[i] = inner } } } } op, all := c.convertSetOprType(n.AfterSetOperator) tree := &ast.SelectStmt{ TargetList: &ast.List{}, FromClause: &ast.List{}, WhereClause: nil, Op: op, All: all, WithClause: c.convertWithClause(n.With), } for _, stmt := range selectStmts { // We move Op and All from the child to the parent. op, all := stmt.Op, stmt.All stmt.Op, stmt.All = ast.None, false switch { case tree.Larg == nil: tree.Larg = stmt case tree.Rarg == nil: tree.Rarg = stmt tree.Op = op tree.All = all default: tree = &ast.SelectStmt{ TargetList: &ast.List{}, FromClause: &ast.List{}, WhereClause: nil, Larg: tree, Rarg: stmt, Op: op, All: all, WithClause: c.convertWithClause(n.With), } } } return tree } func (c *cc) convertSetOprStmt(n *pcast.SetOprStmt) ast.Node { if n.SelectList != nil { sn := c.convertSetOprSelectList(n.SelectList) if ss, ok := sn.(*ast.SelectStmt); ok && n.Limit != nil { ss.LimitOffset = c.convert(n.Limit.Offset) ss.LimitCount = c.convert(n.Limit.Count) } return sn } return todo(n) } func (c *cc) convertSetPwdStmt(n *pcast.SetPwdStmt) ast.Node { return todo(n) } func (c *cc) convertSetRoleStmt(n *pcast.SetRoleStmt) ast.Node { return todo(n) } func (c *cc) convertSetStmt(n *pcast.SetStmt) ast.Node { return todo(n) } func (c *cc) convertShowStmt(n *pcast.ShowStmt) ast.Node { if n.Tp != pcast.ShowWarnings { return todo(n) } level := "level" code := "code" message := "message" stmt := &ast.SelectStmt{ FromClause: &ast.List{}, TargetList: &ast.List{ Items: []ast.Node{ &ast.ResTarget{ Name: &level, Val: &ast.A_Const{Val: &ast.String{}}, }, &ast.ResTarget{ Name: &code, Val: &ast.A_Const{Val: &ast.Integer{}}, }, &ast.ResTarget{ Name: &message, Val: &ast.A_Const{Val: &ast.String{}}, }, }, }, } return stmt } func (c *cc) convertShutdownStmt(n *pcast.ShutdownStmt) ast.Node { return todo(n) } func (c *cc) convertSplitRegionStmt(n *pcast.SplitRegionStmt) ast.Node { return todo(n) } func (c *cc) convertTableName(n *pcast.TableName) *ast.RangeVar { schema := identifier(n.Schema.String()) rel := identifier(n.Name.String()) return &ast.RangeVar{ Schemaname: &schema, Relname: &rel, } } func (c *cc) convertTableNameExpr(n *pcast.TableNameExpr) ast.Node { return todo(n) } func (c *cc) convertTableOptimizerHint(n *pcast.TableOptimizerHint) ast.Node { return todo(n) } func (c *cc) convertTableSource(node *pcast.TableSource) ast.Node { if node == nil { return nil } alias := node.AsName.String() switch n := node.Source.(type) { case *pcast.SelectStmt, *pcast.SetOprStmt: rs := &ast.RangeSubselect{ Subquery: c.convert(n), } if alias != "" { rs.Alias = &ast.Alias{Aliasname: &alias} } return rs case *pcast.TableName: rv := c.convertTableName(n) if alias != "" { rv.Alias = &ast.Alias{Aliasname: &alias} } return rv default: return todo(n) } } func (c *cc) convertTableToTable(n *pcast.TableToTable) ast.Node { return todo(n) } func (c *cc) convertTimeUnitExpr(n *pcast.TimeUnitExpr) ast.Node { return todo(n) } func (c *cc) convertTraceStmt(n *pcast.TraceStmt) ast.Node { return todo(n) } func (c *cc) convertTrimDirectionExpr(n *pcast.TrimDirectionExpr) ast.Node { return todo(n) } func (c *cc) convertTruncateTableStmt(n *pcast.TruncateTableStmt) *ast.TruncateStmt { return &ast.TruncateStmt{ Relations: toList(n.Table), } } func (c *cc) convertUnaryOperationExpr(n *pcast.UnaryOperationExpr) ast.Node { return todo(n) } func (c *cc) convertUnlockTablesStmt(n *pcast.UnlockTablesStmt) ast.Node { return todo(n) } func (c *cc) convertUseStmt(n *pcast.UseStmt) ast.Node { return todo(n) } func (c *cc) convertValuesExpr(n *pcast.ValuesExpr) ast.Node { return todo(n) } func (c *cc) convertVariableAssignment(n *pcast.VariableAssignment) ast.Node { return todo(n) } func (c *cc) convertVariableExpr(n *pcast.VariableExpr) ast.Node { // MySQL @variable references are user-defined variables, NOT sqlc named parameters. // Use VariableExpr to preserve them as-is in the output. return &ast.VariableExpr{ Name: n.Name, Location: n.OriginTextPosition(), } } func (c *cc) convertWhenClause(n *pcast.WhenClause) ast.Node { if n == nil { return nil } return &ast.CaseWhen{ Expr: c.convert(n.Expr), Result: c.convert(n.Result), Location: n.OriginTextPosition(), } } func (c *cc) convertWindowFuncExpr(n *pcast.WindowFuncExpr) ast.Node { return todo(n) } func (c *cc) convertWindowSpec(n *pcast.WindowSpec) ast.Node { return todo(n) } func (c *cc) convertCallStmt(n *pcast.CallStmt) ast.Node { var funcname ast.List for _, s := range []string{n.Procedure.Schema.L, n.Procedure.FnName.L} { if s != "" { funcname.Items = append(funcname.Items, NewIdentifier(s)) } } var args ast.List for _, a := range n.Procedure.Args { args.Items = append(args.Items, c.convert(a)) } return &ast.CallStmt{ FuncCall: &ast.FuncCall{ Func: &ast.FuncName{ Schema: n.Procedure.Schema.L, Name: n.Procedure.FnName.L, }, Funcname: &funcname, Args: &args, Location: n.OriginTextPosition(), }, } } func (c *cc) convertProcedureInfo(n *pcast.ProcedureInfo) ast.Node { var params ast.List for _, sp := range n.ProcedureParam { paramName := sp.ParamName params.Items = append(params.Items, &ast.FuncParam{ Name: ¶mName, Type: &ast.TypeName{Name: types.TypeToStr(sp.ParamType.GetType(), sp.ParamType.GetCharset())}, }) } return &ast.CreateFunctionStmt{ Params: ¶ms, Func: &ast.FuncName{ Schema: n.ProcedureName.Schema.L, Name: n.ProcedureName.Name.L, }, } } func (c *cc) convert(node pcast.Node) ast.Node { switch n := node.(type) { case *driver.ParamMarkerExpr: return c.convertParamMarkerExpr(n) case *driver.ValueExpr: return c.convertValueExpr(n) case *pcast.AdminStmt: return c.convertAdminStmt(n) case *pcast.AggregateFuncExpr: return c.convertAggregateFuncExpr(n) case *pcast.AlterDatabaseStmt: return c.convertAlterDatabaseStmt(n) case *pcast.AlterInstanceStmt: return c.convertAlterInstanceStmt(n) case *pcast.AlterTableSpec: return c.convertAlterTableSpec(n) case *pcast.AlterTableStmt: return c.convertAlterTableStmt(n) case *pcast.AlterUserStmt: return c.convertAlterUserStmt(n) case *pcast.AnalyzeTableStmt: return c.convertAnalyzeTableStmt(n) case *pcast.Assignment: return c.convertAssignment(n) case *pcast.BRIEStmt: return c.convertBRIEStmt(n) case *pcast.BeginStmt: return c.convertBeginStmt(n) case *pcast.BetweenExpr: return c.convertBetweenExpr(n) case *pcast.BinaryOperationExpr: return c.convertBinaryOperationExpr(n) case *pcast.BinlogStmt: return c.convertBinlogStmt(n) case *pcast.ByItem: return c.convertByItem(n) case *pcast.CallStmt: return c.convertCallStmt(n) case *pcast.CaseExpr: return c.convertCaseExpr(n) case *pcast.CleanupTableLockStmt: return c.convertCleanupTableLockStmt(n) case *pcast.ColumnDef: return c.convertColumnDef(n) case *pcast.ColumnName: return c.convertColumnName(n) case *pcast.ColumnNameExpr: return c.convertColumnNameExpr(n) case *pcast.ColumnPosition: return c.convertColumnPosition(n) case *pcast.CommitStmt: return c.convertCommitStmt(n) case *pcast.CompareSubqueryExpr: return c.convertCompareSubqueryExpr(n) case *pcast.Constraint: return c.convertConstraint(n) case *pcast.CreateBindingStmt: return c.convertCreateBindingStmt(n) case *pcast.CreateDatabaseStmt: return c.convertCreateDatabaseStmt(n) case *pcast.CreateIndexStmt: return c.convertCreateIndexStmt(n) case *pcast.CreateSequenceStmt: return c.convertCreateSequenceStmt(n) case *pcast.CreateStatisticsStmt: return c.convertCreateStatisticsStmt(n) case *pcast.CreateTableStmt: return c.convertCreateTableStmt(n) case *pcast.CreateUserStmt: return c.convertCreateUserStmt(n) case *pcast.CreateViewStmt: return c.convertCreateViewStmt(n) case *pcast.DeallocateStmt: return c.convertDeallocateStmt(n) case *pcast.DefaultExpr: return c.convertDefaultExpr(n) case *pcast.DeleteStmt: return c.convertDeleteStmt(n) case *pcast.DeleteTableList: return c.convertDeleteTableList(n) case *pcast.DoStmt: return c.convertDoStmt(n) case *pcast.DropBindingStmt: return c.convertDropBindingStmt(n) case *pcast.DropDatabaseStmt: return c.convertDropDatabaseStmt(n) case *pcast.DropIndexStmt: return c.convertDropIndexStmt(n) case *pcast.DropSequenceStmt: return c.convertDropSequenceStmt(n) case *pcast.DropStatisticsStmt: return c.convertDropStatisticsStmt(n) case *pcast.DropStatsStmt: return c.convertDropStatsStmt(n) case *pcast.DropTableStmt: return c.convertDropTableStmt(n) case *pcast.DropUserStmt: return c.convertDropUserStmt(n) case *pcast.ExecuteStmt: return c.convertExecuteStmt(n) case *pcast.ExistsSubqueryExpr: return c.convertExistsSubqueryExpr(n) case *pcast.ExplainForStmt: return c.convertExplainForStmt(n) case *pcast.ExplainStmt: return c.convertExplainStmt(n) case *pcast.FieldList: return c.convertFieldList(n) case *pcast.FlashBackTableStmt: return c.convertFlashBackTableStmt(n) case *pcast.FlushStmt: return c.convertFlushStmt(n) case *pcast.FrameBound: return c.convertFrameBound(n) case *pcast.FrameClause: return c.convertFrameClause(n) case *pcast.FuncCallExpr: return c.convertFuncCallExpr(n) case *pcast.FuncCastExpr: return c.convertFuncCastExpr(n) case *pcast.GetFormatSelectorExpr: return c.convertGetFormatSelectorExpr(n) case *pcast.GrantRoleStmt: return c.convertGrantRoleStmt(n) case *pcast.GrantStmt: return c.convertGrantStmt(n) case *pcast.GroupByClause: return c.convertGroupByClause(n) case *pcast.HavingClause: return c.convertHavingClause(n) case *pcast.IndexLockAndAlgorithm: return c.convertIndexLockAndAlgorithm(n) case *pcast.IndexPartSpecification: return c.convertIndexPartSpecification(n) case *pcast.InsertStmt: return c.convertInsertStmt(n) case *pcast.IsNullExpr: return c.convertIsNullExpr(n) case *pcast.IsTruthExpr: return c.convertIsTruthExpr(n) case *pcast.Join: return c.convertJoin(n) case *pcast.KillStmt: return c.convertKillStmt(n) case *pcast.Limit: return c.convertLimit(n) case *pcast.LoadDataStmt: return c.convertLoadDataStmt(n) case *pcast.LoadStatsStmt: return c.convertLoadStatsStmt(n) case *pcast.LockTablesStmt: return c.convertLockTablesStmt(n) case *pcast.MatchAgainst: return c.convertMatchAgainst(n) case *pcast.MaxValueExpr: return c.convertMaxValueExpr(n) case *pcast.OnCondition: return c.convertOnCondition(n) case *pcast.OnDeleteOpt: return c.convertOnDeleteOpt(n) case *pcast.OnUpdateOpt: return c.convertOnUpdateOpt(n) case *pcast.OrderByClause: return c.convertOrderByClause(n) case *pcast.ParenthesesExpr: return c.convertParenthesesExpr(n) case *pcast.PartitionByClause: return c.convertPartitionByClause(n) case *pcast.PatternInExpr: return c.convertPatternInExpr(n) case *pcast.PatternLikeOrIlikeExpr: return c.convertPatternLikeExpr(n) case *pcast.PatternRegexpExpr: return c.convertPatternRegexpExpr(n) case *pcast.PositionExpr: return c.convertPositionExpr(n) case *pcast.PrepareStmt: return c.convertPrepareStmt(n) case *pcast.PrivElem: return c.convertPrivElem(n) case *pcast.ProcedureInfo: return c.convertProcedureInfo(n) case *pcast.RecoverTableStmt: return c.convertRecoverTableStmt(n) case *pcast.ReferenceDef: return c.convertReferenceDef(n) case *pcast.RenameTableStmt: return c.convertRenameTableStmt(n) case *pcast.RepairTableStmt: return c.convertRepairTableStmt(n) case *pcast.RevokeRoleStmt: return c.convertRevokeRoleStmt(n) case *pcast.RevokeStmt: return c.convertRevokeStmt(n) case *pcast.RollbackStmt: return c.convertRollbackStmt(n) case *pcast.RowExpr: return c.convertRowExpr(n) case *pcast.SelectField: return c.convertSelectField(n) case *pcast.SelectStmt: return c.convertSelectStmt(n) case *pcast.SetCollationExpr: return c.convertSetCollationExpr(n) case *pcast.SetConfigStmt: return c.convertSetConfigStmt(n) case *pcast.SetDefaultRoleStmt: return c.convertSetDefaultRoleStmt(n) case *pcast.SetOprSelectList: return c.convertSetOprSelectList(n) case *pcast.SetOprStmt: return c.convertSetOprStmt(n) case *pcast.SetPwdStmt: return c.convertSetPwdStmt(n) case *pcast.SetRoleStmt: return c.convertSetRoleStmt(n) case *pcast.SetStmt: return c.convertSetStmt(n) case *pcast.ShowStmt: return c.convertShowStmt(n) case *pcast.ShutdownStmt: return c.convertShutdownStmt(n) case *pcast.SplitRegionStmt: return c.convertSplitRegionStmt(n) case *pcast.SubqueryExpr: return c.convertSubqueryExpr(n) case *pcast.TableName: return c.convertTableName(n) case *pcast.TableNameExpr: return c.convertTableNameExpr(n) case *pcast.TableOptimizerHint: return c.convertTableOptimizerHint(n) case *pcast.TableRefsClause: return c.convertTableRefsClause(n) case *pcast.TableSource: return c.convertTableSource(n) case *pcast.TableToTable: return c.convertTableToTable(n) case *pcast.TimeUnitExpr: return c.convertTimeUnitExpr(n) case *pcast.TraceStmt: return c.convertTraceStmt(n) case *pcast.TrimDirectionExpr: return c.convertTrimDirectionExpr(n) case *pcast.TruncateTableStmt: return c.convertTruncateTableStmt(n) case *pcast.UnaryOperationExpr: return c.convertUnaryOperationExpr(n) case *pcast.UnlockTablesStmt: return c.convertUnlockTablesStmt(n) case *pcast.UpdateStmt: return c.convertUpdateStmt(n) case *pcast.UseStmt: return c.convertUseStmt(n) case *pcast.ValuesExpr: return c.convertValuesExpr(n) case *pcast.VariableAssignment: return c.convertVariableAssignment(n) case *pcast.VariableExpr: return c.convertVariableExpr(n) case *pcast.WhenClause: return c.convertWhenClause(n) case *pcast.WildCardField: return c.convertWildCardField(n) case *pcast.WindowFuncExpr: return c.convertWindowFuncExpr(n) case *pcast.WindowSpec: return c.convertWindowSpec(n) case nil: return nil default: return todo(n) } } ================================================ FILE: internal/engine/dolphin/format.go ================================================ package dolphin // QuoteIdent returns a quoted identifier if it needs quoting. // MySQL uses backticks for quoting identifiers. func (p *Parser) QuoteIdent(s string) string { // For now, don't quote - MySQL is less strict about quoting return s } // TypeName returns the SQL type name for the given namespace and name. // Handles MySQL-specific type name mappings for formatting. func (p *Parser) TypeName(ns, name string) string { if ns != "" { return ns + "." + name } // Map internal type names to MySQL CAST-compatible names for formatting switch name { case "bigint unsigned": return "UNSIGNED" case "bigint signed": return "SIGNED" } return name } // Param returns the parameter placeholder for the given number. // MySQL uses ? for all parameters (positional). func (p *Parser) Param(n int) string { return "?" } // NamedParam returns the named parameter placeholder for the given name. // MySQL doesn't have native named parameters, so we use ? (positional). // The actual parameter names are handled by sqlc's rewrite phase. func (p *Parser) NamedParam(name string) string { return "?" } // Cast returns a type cast expression. // MySQL uses CAST(expr AS type) syntax. func (p *Parser) Cast(arg, typeName string) string { return "CAST(" + arg + " AS " + typeName + ")" } ================================================ FILE: internal/engine/dolphin/parse.go ================================================ package dolphin import ( "errors" "io" "regexp" "strconv" "strings" "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" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) func NewParser() *Parser { return &Parser{parser.New()} } type Parser struct { pingcap *parser.Parser } var lineColumn = regexp.MustCompile(`^line (\d+) column (\d+) (.*)`) func normalizeErr(err error) error { if err == nil { return err } parts := strings.Split(err.Error(), "\n") msg := strings.TrimSpace(parts[0] + "\"") out := lineColumn.FindStringSubmatch(msg) if len(out) == 4 { line, lineErr := strconv.Atoi(out[1]) col, colErr := strconv.Atoi(out[2]) if lineErr != nil || colErr != nil { return errors.New(msg) } return &sqlerr.Error{ Message: "syntax error", Err: errors.New(out[3]), Line: line, Column: col, } } return errors.New(msg) } func (p *Parser) Parse(r io.Reader) ([]ast.Statement, error) { blob, err := io.ReadAll(r) if err != nil { return nil, err } stmtNodes, _, err := p.pingcap.Parse(string(blob), "", "") if err != nil { return nil, normalizeErr(err) } var stmts []ast.Statement for i := range stmtNodes { converter := &cc{} out := converter.convert(stmtNodes[i]) if _, ok := out.(*ast.TODO); ok { continue } // TODO: Attach the text directly to the ast.Statement node text := stmtNodes[i].Text() loc := strings.Index(string(blob), text) stmtLen := len(text) if text[stmtLen-1] == ';' { stmtLen -= 1 // Subtract one to remove semicolon } stmts = append(stmts, ast.Statement{ Raw: &ast.RawStmt{ Stmt: out, StmtLocation: loc, StmtLen: stmtLen, }, }) } return stmts, nil } // https://dev.mysql.com/doc/refman/8.0/en/comments.html func (p *Parser) CommentSyntax() source.CommentSyntax { return source.CommentSyntax{ Dash: true, SlashStar: true, Hash: true, } } ================================================ FILE: internal/engine/dolphin/reserved.go ================================================ package dolphin import "strings" // https://dev.mysql.com/doc/refman/8.0/en/keywords.html func (p *Parser) IsReservedKeyword(s string) bool { switch strings.ToLower(s) { case "accessible": case "add": case "all": case "alter": case "analyze": case "and": case "as": case "asc": case "asensitive": case "before": case "between": case "bigint": case "binary": case "blob": case "both": case "by": case "call": case "cascade": case "case": case "change": case "char": case "character": case "check": case "collate": case "column": case "condition": case "constraint": case "continue": case "convert": case "create": case "cross": case "cube": case "cume_dist": case "current_date": case "current_time": case "current_timestamp": case "current_user": case "cursor": case "database": case "databases": case "day_hour": case "day_microsecond": case "day_minute": case "day_second": case "dec": case "decimal": case "declare": case "default": case "delayed": case "delete": case "dense_rank": case "desc": case "describe": case "deterministic": case "distinct": case "distinctrow": case "div": case "double": case "drop": case "dual": case "each": case "else": case "elseif": case "empty": case "enclosed": case "escaped": case "except": case "exists": case "exit": case "explain": case "false": case "fetch": case "first_value": case "float": case "float4": case "float8": case "for": case "force": case "foreign": case "from": case "fulltext": case "function": case "generated": case "get": case "grant": case "group": case "grouping": case "groups": case "having": case "high_priority": case "hour_microsecond": case "hour_minute": case "hour_second": case "if": case "ignore": case "in": case "index": case "infile": case "inner": case "inout": case "insensitive": case "insert": case "int": case "int1": case "int2": case "int3": case "int4": case "int8": case "integer": case "interval": case "into": case "io_after_gtids": case "io_before_gtids": case "is": case "iterate": case "join": case "json_table": case "key": case "keys": case "kill": case "lag": case "last_value": case "lateral": case "lead": case "leading": case "leave": case "left": case "like": case "limit": case "linear": case "lines": case "load": case "localtime": case "localtimestamp": case "lock": case "long": case "longblob": case "longtext": case "loop": case "low_priority": case "master_bind": case "master_ssl_verify_server_cert": case "match": case "maxvalue": case "mediumblob": case "mediumint": case "mediumtext": case "middleint": case "minute_microsecond": case "minute_second": case "mod": case "modifies": case "natural": case "not": case "no_write_to_binlog": case "nth_value": case "ntile": case "null": case "numeric": case "of": case "on": case "optimize": case "optimizer_costs": case "option": case "optionally": case "or": case "order": case "out": case "outer": case "outfile": case "over": case "partition": case "percent_rank": case "precision": case "primary": case "procedure": case "purge": case "range": case "rank": case "read": case "reads": case "read_write": case "real": case "recursive": case "references": case "regexp": case "release": case "rename": case "repeat": case "replace": case "require": case "resignal": case "restrict": case "return": case "revoke": case "right": case "rlike": case "row": case "rows": case "row_number": case "schema": case "schemas": case "second_microsecond": case "select": case "sensitive": case "separator": case "set": case "show": case "signal": case "smallint": case "spatial": case "specific": case "sql": case "sqlexception": case "sqlstate": case "sqlwarning": case "sql_big_result": case "sql_calc_found_rows": case "sql_small_result": case "ssl": case "starting": case "stored": case "straight_join": case "system": case "table": case "terminated": case "then": case "tinyblob": case "tinyint": case "tinytext": case "to": case "trailing": case "trigger": case "true": case "undo": case "union": case "unique": case "unlock": case "unsigned": case "update": case "usage": case "use": case "using": case "utc_date": case "utc_time": case "utc_timestamp": case "values": case "varbinary": case "varchar": case "varcharacter": case "varying": case "virtual": case "when": case "where": case "while": case "window": case "with": case "write": case "xor": case "year_month": case "zerofill": default: return false } return true } ================================================ FILE: internal/engine/dolphin/stdlib.go ================================================ package dolphin import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) func defaultSchema(name string) *catalog.Schema { s := &catalog.Schema{Name: name} s.Funcs = []*catalog.Function{ { Name: "ABS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tinyint"}, }, }, ReturnType: &ast.TypeName{Name: "tinyint"}, }, { Name: "ABS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "ABS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "mediumint"}, }, }, ReturnType: &ast.TypeName{Name: "mediumint"}, }, { Name: "ABS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "ABS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "ABS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double"}, }, }, ReturnType: &ast.TypeName{Name: "double"}, }, { Name: "ABS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ACOS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ADDDATE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "ADDTIME", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time"}, }, { Type: &ast.TypeName{Name: "time"}, }, }, ReturnType: &ast.TypeName{Name: "time"}, }, { Name: "AES_DECRYPT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "AES_DECRYPT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "AES_ENCRYPT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "binary"}, }, { Name: "AES_ENCRYPT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "binary"}, }, { Name: "ANY_VALUE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ASCII", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "ASIN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ATAN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ATAN2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "AVG", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "BENCHMARK", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "BIN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "BIN_TO_UUID", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "BIN_TO_UUID", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "tinyint"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "BIT_AND", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "BIT_COUNT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "BIT_LENGTH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "BIT_OR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "BIT_XOR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "CAST", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "CEIL", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "CEIL", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "CEILING", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "CEILING", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "CHAR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "CHARACTER_LENGTH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "CHARSET", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "CHAR_LENGTH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "COERCIBILITY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "COLLATION", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "COMPRESS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "binary"}, }, { Name: "CONCAT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "CONCAT_WS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "CONNECTION_ID", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "CONV", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "CONVERT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "CONVERT_TZ", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "datetime"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "datetime"}, }, { Name: "COS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "COT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "COUNT", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "COUNT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "CRC32", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "CUME_DIST", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "CURDATE", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "CURRENT_DATE", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "CURRENT_ROLE", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "CURRENT_TIME", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "time"}, }, { Name: "CURRENT_TIME", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "time"}, }, { Name: "CURRENT_TIMESTAMP", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "datetime"}, }, { Name: "CURRENT_TIMESTAMP", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "datetime"}, }, { Name: "CURRENT_USER", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "CURTIME", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "time"}, }, { Name: "CURTIME", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "time"}, }, { Name: "DATABASE", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "DATE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "datetime"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "DATEDIFF", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "datetime"}, }, { Type: &ast.TypeName{Name: "datetime"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "DATE_ADD", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { // DATE_ADD with INTERVAL expression (2 args) Name: "DATE_ADD", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "DATE_ADD_INTERVAL", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "DATE_FORMAT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "DATE_SUB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { // DATE_SUB with INTERVAL expression (2 args) Name: "DATE_SUB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "DATE_SUB_INTERVAL", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "DAY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "DAYNAME", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "DAYOFMONTH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "DAYOFWEEK", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "DAYOFYEAR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "DEFAULT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "DEGREES", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "DENSE_RANK", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "DISTINCT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ELT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "EXP", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "EXPORT_SET", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "EXPORT_SET", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "EXPORT_SET", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "EXTRACT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "EXTRACTVALUE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "FIELD", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "FIND_IN_SET", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "FIRST_VALUE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "FLOOR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "FORMAT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "FORMAT_BYTES", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "FORMAT_PICO_TIME", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "FOUND_ROWS", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "FROM_BASE64", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "FROM_DAYS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "FROM_UNIXTIME", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "FROM_UNIXTIME", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "GEOMCOLLECTION", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "GEOMETRYCOLLECTION", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "GET_FORMAT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "GET_LOCK", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "GREATEST", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "GROUPING", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "GROUP_CONCAT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "text"}, ReturnTypeNullable: true, }, { Name: "GTID_SUBSET", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "GTID_SUBTRACT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "HEX", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "HEX", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "HOUR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "ICU_VERSION", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "IF", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "IFNULL", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "INET6_ATON", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "binary"}, }, { Name: "INET6_NTOA", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "INET_ATON", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "INET_NTOA", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "INSERT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "INSTR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "INTERVAL", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ISNULL", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "IS_FREE_LOCK", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "IS_IPV4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "IS_IPV4_COMPAT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "IS_IPV4_MAPPED", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "IS_IPV6", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "IS_USED_LOCK", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "IS_UUID", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "JSON_ARRAY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_ARRAYAGG", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_ARRAY_APPEND", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_ARRAY_INSERT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_CONTAINS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "JSON_CONTAINS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "JSON_CONTAINS_PATH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "JSON_DEPTH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "JSON_EXTRACT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "JSON_INSERT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_KEYS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_KEYS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_LENGTH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "JSON_LENGTH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "JSON_MERGE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_MERGE_PATCH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_MERGE_PRESERVE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_OBJECT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_OBJECTAGG", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_OVERLAPS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "JSON_PRETTY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "JSON_QUOTE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "JSON_REMOVE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_REPLACE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_SCHEMA_VALID", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "JSON_SCHEMA_VALIDATION_REPORT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_SEARCH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "JSON_SEARCH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "JSON_SET", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_STORAGE_FREE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "JSON_STORAGE_SIZE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "JSON_TYPE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "JSON_UNQUOTE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "JSON_VALID", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "JSON_VALUE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "LAG", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "int"}, HasDefault: true, }, { Type: &ast.TypeName{Name: "any"}, HasDefault: true, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "LAST_DAY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "LAST_INSERT_ID", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "LAST_INSERT_ID", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "LAST_VALUE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "LCASE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "LEAD", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "int"}, HasDefault: true, }, { Type: &ast.TypeName{Name: "any"}, HasDefault: true, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "LEAST", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "LEFT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "LENGTH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "LINESTRING", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "LN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "LOAD_FILE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "LOCALTIME", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "datetime"}, }, { Name: "LOCALTIME", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "datetime"}, }, { Name: "LOCALTIMESTAMP", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "datetime"}, }, { Name: "LOCALTIMESTAMP", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "datetime"}, }, { Name: "LOCATE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "LOCATE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "LOG", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "LOG", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "LOG10", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "LOG2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "LOWER", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "LPAD", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "LTRIM", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "MAKEDATE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "MAKETIME", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "time"}, }, { Name: "MAKE_SET", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "MASTER_POS_WAIT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "MASTER_POS_WAIT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "MASTER_POS_WAIT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "MAX", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "MBRCONTAINS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "MBRCOVEREDBY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "MBRCOVERS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "MBRDISJOINT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "MBREQUALS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "MBRINTERSECTS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "MBROVERLAPS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "MBRTOUCHES", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "MBRWITHIN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "MD5", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "MICROSECOND", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "MID", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "MIN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "MINUTE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "MOD", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "MONTH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "MONTHNAME", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "MULTILINESTRING", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "MULTIPOINT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "MULTIPOLYGON", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "NAME_CONST", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "NOW", 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{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "datetime"}, }, { Name: "NTH_VALUE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "NTILE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "NULLIF", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "OCT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "OCTET_LENGTH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "ORD", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "PERCENT_RANK", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "PERIOD_ADD", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "PERIOD_DIFF", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "PI", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "POINT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "POLYGON", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "POSITION", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "POW", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "POWER", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "PS_CURRENT_THREAD_ID", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "PS_THREAD_ID", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "QUARTER", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "QUOTE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "RADIANS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "RAND", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "RAND", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "RANDOM_BYTES", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "binary"}, }, { Name: "RANK", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "REGEXP_INSTR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, HasDefault: true, }, { Type: &ast.TypeName{Name: "int"}, HasDefault: true, }, { Type: &ast.TypeName{Name: "int"}, HasDefault: true, }, { Type: &ast.TypeName{Name: "text"}, HasDefault: true, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "REGEXP_LIKE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, HasDefault: true, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "REGEXP_REPLACE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, HasDefault: true, }, { Type: &ast.TypeName{Name: "int"}, HasDefault: true, }, { Type: &ast.TypeName{Name: "text"}, HasDefault: true, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "REGEXP_SUBSTR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, HasDefault: true, }, { Type: &ast.TypeName{Name: "int"}, HasDefault: true, }, { Type: &ast.TypeName{Name: "text"}, HasDefault: true, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "RELEASE_ALL_LOCKS", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "RELEASE_LOCK", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "REPEAT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "REPLACE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "REVERSE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "RIGHT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ROLES_GRAPHML", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ROUND", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ROUND", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ROW_COUNT", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "ROW_NUMBER", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "RPAD", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "RTRIM", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SCHEMA", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SECOND", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "SEC_TO_TIME", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "time"}, }, { Name: "SESSION_USER", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SHA", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SHA1", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SHA2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SIGN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "SIN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "SLEEP", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "SOUNDEX", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SPACE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SQRT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "STATEMENT_DIGEST", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "STATEMENT_DIGEST_TEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "STD", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "STDDEV", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "STDDEV_POP", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "STDDEV_SAMP", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "STRCMP", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tinyint"}, }, { Name: "STR_TO_DATE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "datetime"}, }, { Name: "ST_AREA", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_ASBINARY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "binary"}, }, { Name: "ST_ASBINARY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "binary"}, }, { Name: "ST_ASGEOJSON", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "ST_ASGEOJSON", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "ST_ASGEOJSON", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "tinyint"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "ST_ASTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ST_ASTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ST_ASWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "binary"}, }, { Name: "ST_ASWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "binary"}, }, { Name: "ST_ASWKT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ST_ASWKT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ST_BUFFER", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_BUFFER", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_BUFFER", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_BUFFER", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_BUFFER_STRATEGY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "binary"}, }, { Name: "ST_BUFFER_STRATEGY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "binary"}, }, { Name: "ST_CENTROID", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_CONTAINS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "ST_CONVEXHULL", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_CROSSES", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "ST_DIFFERENCE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_DIMENSION", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "tinyint"}, }, { Name: "ST_DISJOINT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "ST_DISTANCE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_DISTANCE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_DISTANCE_SPHERE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_DISTANCE_SPHERE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_ENDPOINT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_ENVELOPE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_EQUALS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "ST_EXTERIORRING", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_FRECHET_DISTANCE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_FRECHET_DISTANCE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_GEOHASH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ST_GEOHASH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ST_GEOMCOLLFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMCOLLFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMCOLLFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMCOLLFROMTXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMCOLLFROMTXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMCOLLFROMTXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMCOLLFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMCOLLFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMCOLLFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMETRYCOLLECTIONFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMETRYCOLLECTIONFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMETRYCOLLECTIONFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMETRYCOLLECTIONFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMETRYCOLLECTIONFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMETRYCOLLECTIONFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMETRYFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMETRYFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMETRYFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMETRYFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMETRYFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMETRYFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMETRYN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMETRYTYPE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ST_GEOMFROMGEOJSON", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMFROMGEOJSON", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "tinyint"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMFROMGEOJSON", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "tinyint"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_GEOMFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_HAUSDORFF_DISTANCE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_HAUSDORFF_DISTANCE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_INTERIORRINGN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_INTERSECTION", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_INTERSECTS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "ST_ISCLOSED", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "ST_ISEMPTY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "ST_ISSIMPLE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "ST_ISVALID", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "ST_LATFROMGEOHASH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_LATITUDE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_LATITUDE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_LENGTH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_LENGTH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_LINEFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_LINEFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_LINEFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_LINEFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_LINEFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_LINEFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_LINEINTERPOLATEPOINT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_LINEINTERPOLATEPOINTS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_LINESTRINGFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_LINESTRINGFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_LINESTRINGFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_LINESTRINGFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_LINESTRINGFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_LINESTRINGFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_LONGFROMGEOHASH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_LONGITUDE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_LONGITUDE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MAKEENVELOPE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MLINEFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MLINEFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MLINEFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MLINEFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MLINEFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MLINEFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MPOINTFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MPOINTFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MPOINTFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MPOINTFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MPOINTFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MPOINTFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MPOLYFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MPOLYFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MPOLYFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MPOLYFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MPOLYFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MPOLYFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTILINESTRINGFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTILINESTRINGFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTILINESTRINGFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTILINESTRINGFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTILINESTRINGFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTILINESTRINGFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTIPOINTFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTIPOINTFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTIPOINTFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTIPOINTFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTIPOINTFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTIPOINTFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTIPOLYGONFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTIPOLYGONFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTIPOLYGONFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTIPOLYGONFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTIPOLYGONFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_MULTIPOLYGONFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_NUMGEOMETRIES", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "ST_NUMINTERIORRING", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "ST_NUMINTERIORRINGS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "ST_NUMPOINTS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "ST_OVERLAPS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "ST_POINTATDISTANCE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POINTFROMGEOHASH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POINTFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POINTFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POINTFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POINTFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POINTFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POINTFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POINTN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POLYFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POLYFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POLYFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POLYFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POLYFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POLYFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POLYGONFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POLYGONFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POLYGONFROMTEXT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POLYGONFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POLYGONFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_POLYGONFROMWKB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_SIMPLIFY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_SRID", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "ST_SRID", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "ST_STARTPOINT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_SWAPXY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_SYMDIFFERENCE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_TOUCHES", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "ST_TRANSFORM", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_UNION", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_VALIDATE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_WITHIN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "ST_X", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_X", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "ST_Y", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ST_Y", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "SUBDATE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "SUBSTR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SUBSTR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SUBSTRING", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SUBSTRING", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SUBSTRING_INDEX", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SUBTIME", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time"}, }, { Type: &ast.TypeName{Name: "time"}, }, }, ReturnType: &ast.TypeName{Name: "time"}, }, { Name: "SUM", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "SYSDATE", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "datetime"}, }, { Name: "SYSDATE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "datetime"}, }, { Name: "SYSTEM_USER", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "TAN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "TIME", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "datetime"}, }, }, ReturnType: &ast.TypeName{Name: "time"}, }, { Name: "TIMEDIFF", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time"}, }, { Type: &ast.TypeName{Name: "time"}, }, }, ReturnType: &ast.TypeName{Name: "time"}, }, { Name: "TIMESTAMP", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "datetime"}, }, }, ReturnType: &ast.TypeName{Name: "datetime"}, }, { Name: "TIMESTAMP", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "datetime"}, }, { Type: &ast.TypeName{Name: "datetime"}, }, }, ReturnType: &ast.TypeName{Name: "datetime"}, }, { Name: "TIMESTAMPADD", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "datetime"}, }, }, ReturnType: &ast.TypeName{Name: "datetime"}, }, { Name: "TIMESTAMPDIFF", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "datetime"}, }, { Type: &ast.TypeName{Name: "datetime"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "TIME_FORMAT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "TIME_TO_SEC", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "TO_BASE64", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "TO_DAYS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "TO_SECONDS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "datetime"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "TRIM", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "TRIM", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "TRUNCATE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "UCASE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "UNCOMPRESS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "UNCOMPRESSED_LENGTH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "binary"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "UNHEX", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, }, { Name: "UNIX_TIMESTAMP", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "UNIX_TIMESTAMP", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "datetime"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "UPDATEXML", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "UPPER", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "USER", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "UTC_DATE", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "UTC_TIME", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "time"}, }, { Name: "UTC_TIMESTAMP", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "datetime"}, }, { Name: "UUID", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "UUID_SHORT", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "UUID_TO_BIN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "binary"}, }, { Name: "UUID_TO_BIN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "tinyint"}, }, }, ReturnType: &ast.TypeName{Name: "binary"}, }, { Name: "VALIDATE_PASSWORD_STRENGTH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "VALUES", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "VARIANCE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "VAR_POP", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "VAR_SAMP", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "VERSION", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "WAIT_FOR_EXECUTED_GTID_SET", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, HasDefault: true, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int"}, HasDefault: true, }, { Type: &ast.TypeName{Name: "text"}, HasDefault: true, }, }, ReturnType: &ast.TypeName{Name: "bool"}, }, { Name: "WEEK", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "WEEK", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "int"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "WEEKDAY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "WEEKOFYEAR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "WEIGHT_STRING", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "YEAR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, { Name: "YEARWEEK", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "int"}, }, } return s } ================================================ FILE: internal/engine/dolphin/utils.go ================================================ package dolphin import ( pcast "github.com/pingcap/tidb/pkg/parser/ast" "github.com/pingcap/tidb/pkg/parser/mysql" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) func parseTableName(n *pcast.TableName) *ast.TableName { return &ast.TableName{ Schema: identifier(n.Schema.String()), Name: identifier(n.Name.String()), } } func toList(node pcast.Node) *ast.List { var items []ast.Node switch n := node.(type) { case *pcast.TableName: if schema := n.Schema.String(); schema != "" { items = append(items, NewIdentifier(schema)) } items = append(items, NewIdentifier(n.Name.String())) default: return nil } return &ast.List{Items: items} } func isNotNull(n *pcast.ColumnDef) bool { for i := range n.Options { if n.Options[i].Tp == pcast.ColumnOptionNotNull { return true } if n.Options[i].Tp == pcast.ColumnOptionPrimaryKey { return true } } return false } func convertToRangeVarList(list *ast.List, result *ast.List) { if len(list.Items) == 0 { return } switch rel := list.Items[0].(type) { // Special case for joins in updates case *ast.JoinExpr: left, ok := rel.Larg.(*ast.RangeVar) 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") } } if left != nil { result.Items = append(result.Items, left) } right, ok := rel.Rarg.(*ast.RangeVar) 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") } } if right != nil { result.Items = append(result.Items, right) } case *ast.RangeVar: result.Items = append(result.Items, rel) case *ast.RangeSubselect: result.Items = append(result.Items, rel) default: panic("expected range var") } } func isUnsigned(n *pcast.ColumnDef) bool { return mysql.HasUnsignedFlag(n.Tp.GetFlag()) } ================================================ FILE: internal/engine/postgresql/analyzer/analyze.go ================================================ package analyzer import ( "context" "errors" "fmt" "strings" "sync" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgconn" "github.com/jackc/pgx/v5/pgxpool" 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" "github.com/sqlc-dev/sqlc/internal/shfmt" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" "github.com/sqlc-dev/sqlc/internal/sql/named" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) type Analyzer struct { db config.Database client dbmanager.Client pool *pgxpool.Pool dbg opts.Debug replacer *shfmt.Replacer formats sync.Map columns sync.Map tables sync.Map } func New(client dbmanager.Client, db config.Database) *Analyzer { return &Analyzer{ db: db, dbg: opts.DebugFromEnv(), client: client, replacer: shfmt.NewReplacer(nil), } } const columnQuery = ` SELECT pg_catalog.format_type(pg_attribute.atttypid, pg_attribute.atttypmod) AS data_type, pg_attribute.attnotnull as not_null, pg_attribute.attndims as array_dims FROM pg_catalog.pg_attribute WHERE attrelid = $1 AND attnum = $2; ` const tableQuery = ` SELECT pg_class.relname as table_name, pg_namespace.nspname as schema_name FROM pg_catalog.pg_class JOIN pg_catalog.pg_namespace ON pg_namespace.oid = pg_class.relnamespace WHERE pg_class.oid = $1; ` type pgTable struct { TableName string `db:"table_name"` SchemaName string `db:"schema_name"` } // Cache these types in memory func (a *Analyzer) tableInfo(ctx context.Context, oid uint32) (*pgTable, error) { ctbl, ok := a.tables.Load(oid) if ok { return ctbl.(*pgTable), nil } rows, err := a.pool.Query(ctx, tableQuery, oid) if err != nil { return nil, err } tbl, err := pgx.CollectOneRow(rows, pgx.RowToStructByName[pgTable]) if err != nil { return nil, err } a.tables.Store(oid, &tbl) return &tbl, nil } type pgColumn struct { DataType string `db:"data_type"` NotNull bool `db:"not_null"` ArrayDims int `db:"array_dims"` } type columnKey struct { OID uint32 Attr uint16 } // Cache these types in memory func (a *Analyzer) columnInfo(ctx context.Context, field pgconn.FieldDescription) (*pgColumn, error) { key := columnKey{field.TableOID, field.TableAttributeNumber} cinfo, ok := a.columns.Load(key) if ok { return cinfo.(*pgColumn), nil } rows, err := a.pool.Query(ctx, columnQuery, field.TableOID, int16(field.TableAttributeNumber)) if err != nil { return nil, err } col, err := pgx.CollectOneRow(rows, pgx.RowToStructByName[pgColumn]) if err != nil { return nil, err } a.columns.Store(key, &col) return &col, nil } type formatKey struct { OID uint32 Modified int32 } // TODO: Use PGX to do the lookup for basic OID types func (a *Analyzer) formatType(ctx context.Context, oid uint32, modifier int32) (string, error) { key := formatKey{oid, modifier} ftyp, ok := a.formats.Load(key) if ok { return ftyp.(string), nil } rows, err := a.pool.Query(ctx, `SELECT format_type($1, $2)`, oid, modifier) if err != nil { return "", err } dt, err := pgx.CollectOneRow(rows, pgx.RowTo[string]) if err != nil { return "", err } a.formats.Store(key, dt) return dt, err } // TODO: This is bad func rewriteType(dt string) string { switch { case strings.HasPrefix(dt, "character("): return "pg_catalog.bpchar" case strings.HasPrefix(dt, "character varying"): return "pg_catalog.varchar" case strings.HasPrefix(dt, "bit varying"): return "pg_catalog.varbit" case strings.HasPrefix(dt, "bit("): return "pg_catalog.bit" } switch dt { case "bpchar": return "pg_catalog.bpchar" case "timestamp without time zone": return "pg_catalog.timestamp" case "timestamp with time zone": return "pg_catalog.timestamptz" case "time without time zone": return "pg_catalog.time" case "time with time zone": return "pg_catalog.timetz" } return dt } func parseType(dt string) (string, bool, int) { size := 0 for { trimmed := strings.TrimSuffix(dt, "[]") if trimmed == dt { return rewriteType(dt), size > 0, size } size += 1 dt = trimmed } } // Don't create a database per query func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrations []string, ps *named.ParamSet) (*core.Analysis, error) { extractSqlErr := func(e error) error { var pgErr *pgconn.PgError if errors.As(e, &pgErr) { return &sqlerr.Error{ Code: pgErr.Code, Message: pgErr.Message, Location: max(n.Pos()+int(pgErr.Position)-1, 0), } } return e } if a.pool == nil { var uri string if a.db.Managed { if a.client == nil { return nil, fmt.Errorf("client is nil") } edb, err := a.client.CreateDatabase(ctx, &dbmanager.CreateDatabaseRequest{ Engine: "postgresql", Migrations: migrations, }) if err != nil { return nil, err } uri = edb.Uri } else if a.dbg.OnlyManagedDatabases { return nil, fmt.Errorf("database: connections disabled via SQLCDEBUG=databases=managed") } else { uri = a.replacer.Replace(a.db.URI) } conf, err := pgxpool.ParseConfig(uri) if err != nil { return nil, err } pool, err := pgxpool.NewWithConfig(ctx, conf) if err != nil { return nil, err } a.pool = pool } c, err := a.pool.Acquire(ctx) if err != nil { return nil, err } defer c.Release() // TODO: Pick a random name desc, err := c.Conn().Prepare(ctx, "foo", query) if err != nil { return nil, extractSqlErr(err) } if err := c.Conn().Deallocate(ctx, "foo"); err != nil { return nil, err } var result core.Analysis for _, field := range desc.Fields { if field.TableOID > 0 { col, err := a.columnInfo(ctx, field) if err != nil { return nil, err } // debug.Dump(i, field, col) tbl, err := a.tableInfo(ctx, field.TableOID) if err != nil { return nil, err } dt, isArray, dims := parseType(col.DataType) notNull := col.NotNull name := field.Name result.Columns = append(result.Columns, &core.Column{ Name: name, OriginalName: field.Name, DataType: dt, NotNull: notNull, IsArray: isArray, ArrayDims: int32(max(col.ArrayDims, dims)), Table: &core.Identifier{ Schema: tbl.SchemaName, Name: tbl.TableName, }, }) } else { dataType, err := a.formatType(ctx, field.DataTypeOID, field.TypeModifier) if err != nil { return nil, err } // debug.Dump(i, field, dataType) notNull := false name := field.Name dt, isArray, dims := parseType(dataType) result.Columns = append(result.Columns, &core.Column{ Name: name, OriginalName: field.Name, DataType: dt, NotNull: notNull, IsArray: isArray, ArrayDims: int32(dims), }) } } for i, oid := range desc.ParamOIDs { dataType, err := a.formatType(ctx, oid, -1) if err != nil { return nil, err } notNull := false dt, isArray, dims := parseType(dataType) name := "" if ps != nil { name, _ = ps.NameFor(i + 1) } result.Params = append(result.Params, &core.Parameter{ Number: int32(i + 1), Column: &core.Column{ Name: name, DataType: dt, IsArray: isArray, ArrayDims: int32(dims), NotNull: notNull, }, }) } return &result, nil } func (a *Analyzer) Close(_ context.Context) error { if a.pool != nil { a.pool.Close() } return nil } // SQL queries for schema introspection const introspectTablesQuery = ` SELECT n.nspname AS schema_name, c.relname AS table_name, a.attname AS column_name, pg_catalog.format_type(a.atttypid, a.atttypmod) AS data_type, a.attnotnull AS not_null, a.attndims AS array_dims, COALESCE( (SELECT true FROM pg_index i WHERE i.indrelid = c.oid AND i.indisprimary AND a.attnum = ANY(i.indkey)), false ) AS is_primary_key FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace JOIN pg_catalog.pg_attribute a ON a.attrelid = c.oid WHERE c.relkind IN ('r', 'v', 'p') -- tables, views, partitioned tables AND a.attnum > 0 -- skip system columns AND NOT a.attisdropped AND n.nspname = ANY($1) ORDER BY n.nspname, c.relname, a.attnum ` const introspectEnumsQuery = ` SELECT n.nspname AS schema_name, t.typname AS type_name, e.enumlabel AS enum_value FROM pg_catalog.pg_type t JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace JOIN pg_catalog.pg_enum e ON e.enumtypid = t.oid WHERE t.typtype = 'e' AND n.nspname = ANY($1) ORDER BY n.nspname, t.typname, e.enumsortorder ` type introspectedColumn struct { SchemaName string `db:"schema_name"` TableName string `db:"table_name"` ColumnName string `db:"column_name"` DataType string `db:"data_type"` NotNull bool `db:"not_null"` ArrayDims int `db:"array_dims"` IsPrimaryKey bool `db:"is_primary_key"` } type introspectedEnum struct { SchemaName string `db:"schema_name"` TypeName string `db:"type_name"` EnumValue string `db:"enum_value"` } // IntrospectSchema queries the database to build a catalog containing // tables, columns, and enum types for the specified schemas. func (a *Analyzer) IntrospectSchema(ctx context.Context, schemas []string) (*catalog.Catalog, error) { if a.pool == nil { return nil, fmt.Errorf("database connection not initialized") } c, err := a.pool.Acquire(ctx) if err != nil { return nil, err } defer c.Release() // Query tables and columns rows, err := c.Query(ctx, introspectTablesQuery, schemas) if err != nil { return nil, fmt.Errorf("introspect tables: %w", err) } columns, err := pgx.CollectRows(rows, pgx.RowToStructByName[introspectedColumn]) if err != nil { return nil, fmt.Errorf("collect table rows: %w", err) } // Query enums enumRows, err := c.Query(ctx, introspectEnumsQuery, schemas) if err != nil { return nil, fmt.Errorf("introspect enums: %w", err) } enums, err := pgx.CollectRows(enumRows, pgx.RowToStructByName[introspectedEnum]) if err != nil { return nil, fmt.Errorf("collect enum rows: %w", err) } // Build catalog cat := &catalog.Catalog{ DefaultSchema: "public", SearchPath: schemas, } // Create schema map for quick lookup schemaMap := make(map[string]*catalog.Schema) for _, schemaName := range schemas { schema := &catalog.Schema{Name: schemaName} cat.Schemas = append(cat.Schemas, schema) schemaMap[schemaName] = schema } // Group columns by table tableMap := make(map[string]*catalog.Table) for _, col := range columns { key := col.SchemaName + "." + col.TableName tbl, exists := tableMap[key] if !exists { tbl = &catalog.Table{ Rel: &ast.TableName{ Schema: col.SchemaName, Name: col.TableName, }, } tableMap[key] = tbl if schema, ok := schemaMap[col.SchemaName]; ok { schema.Tables = append(schema.Tables, tbl) } } dt, isArray, dims := parseType(col.DataType) tbl.Columns = append(tbl.Columns, &catalog.Column{ Name: col.ColumnName, Type: ast.TypeName{Name: dt}, IsNotNull: col.NotNull, IsArray: isArray || col.ArrayDims > 0, ArrayDims: max(dims, col.ArrayDims), }) } // Group enum values by type enumMap := make(map[string]*catalog.Enum) for _, e := range enums { key := e.SchemaName + "." + e.TypeName enum, exists := enumMap[key] if !exists { enum = &catalog.Enum{ Name: e.TypeName, } enumMap[key] = enum if schema, ok := schemaMap[e.SchemaName]; ok { schema.Types = append(schema.Types, enum) } } enum.Vals = append(enum.Vals, e.EnumValue) } return cat, nil } // EnsureConn initializes the database connection pool if not already done. // This is useful for database-only mode where we need to connect before analyzing queries. func (a *Analyzer) EnsureConn(ctx context.Context, migrations []string) error { if a.pool != nil { return nil } var uri string if a.db.Managed { if a.client == nil { return fmt.Errorf("client is nil") } edb, err := a.client.CreateDatabase(ctx, &dbmanager.CreateDatabaseRequest{ Engine: "postgresql", Migrations: migrations, }) if err != nil { return err } uri = edb.Uri } else if a.dbg.OnlyManagedDatabases { return fmt.Errorf("database: connections disabled via SQLCDEBUG=databases=managed") } else { uri = a.replacer.Replace(a.db.URI) } conf, err := pgxpool.ParseConfig(uri) if err != nil { return err } pool, err := pgxpool.NewWithConfig(ctx, conf) if err != nil { return err } a.pool = pool return nil } // GetColumnNames implements the expander.ColumnGetter interface. // It prepares a query and returns the column names from the result set description. func (a *Analyzer) GetColumnNames(ctx context.Context, query string) ([]string, error) { if a.pool == nil { return nil, fmt.Errorf("database connection not initialized") } conn, err := a.pool.Acquire(ctx) if err != nil { return nil, err } defer conn.Release() desc, err := conn.Conn().Prepare(ctx, "", query) if err != nil { return nil, err } columns := make([]string, len(desc.Fields)) for i, field := range desc.Fields { columns[i] = field.Name } return columns, nil } ================================================ FILE: internal/engine/postgresql/catalog.go ================================================ package postgresql import "github.com/sqlc-dev/sqlc/internal/sql/catalog" // toPointer converts an int to a pointer without a temporary // variable at the call-site, and is used by the generated schemas func toPointer(x int) *int { return &x } func NewCatalog() *catalog.Catalog { c := catalog.New("public") c.Schemas = append(c.Schemas, pgTemp()) c.Schemas = append(c.Schemas, genPGCatalog()) c.Schemas = append(c.Schemas, genInformationSchema()) c.SearchPath = []string{"pg_catalog"} c.LoadExtension = loadExtension return c } ================================================ FILE: internal/engine/postgresql/catalog_test.go ================================================ package postgresql import ( "errors" "strconv" "strings" "testing" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" "github.com/google/go-cmp/cmp" ) func TestUpdateErrors(t *testing.T) { p := NewParser() for i, tc := range []struct { stmt string err *sqlerr.Error }{ { ` CREATE TABLE foo (); CREATE TABLE foo (); `, sqlerr.RelationExists("foo"), }, { ` CREATE TYPE foo AS ENUM ('bar'); CREATE TYPE foo AS ENUM ('bar'); `, sqlerr.TypeExists("foo"), }, { ` DROP TABLE foo; `, sqlerr.RelationNotFound("foo"), }, { ` DROP TYPE foo; `, sqlerr.TypeNotFound("foo"), }, { ` CREATE TABLE foo (); CREATE TABLE bar (); ALTER TABLE foo RENAME TO bar; `, sqlerr.RelationExists("bar"), }, { ` ALTER TABLE foo RENAME TO bar; `, sqlerr.RelationNotFound("foo"), }, { ` CREATE TABLE foo (); ALTER TABLE foo ADD COLUMN bar text; ALTER TABLE foo ADD COLUMN bar text; `, sqlerr.ColumnExists("foo", "bar"), }, { ` CREATE TABLE foo (); ALTER TABLE foo DROP COLUMN bar; `, sqlerr.ColumnNotFound("foo", "bar"), }, { ` CREATE TABLE foo (); ALTER TABLE foo ALTER COLUMN bar SET NOT NULL; `, sqlerr.ColumnNotFound("foo", "bar"), }, { ` CREATE TABLE foo (); ALTER TABLE foo ALTER COLUMN bar DROP NOT NULL; `, sqlerr.ColumnNotFound("foo", "bar"), }, { ` CREATE SCHEMA foo; CREATE SCHEMA foo; `, sqlerr.SchemaExists("foo"), }, { ` ALTER TABLE foo.baz SET SCHEMA bar; `, sqlerr.SchemaNotFound("foo"), }, { ` CREATE SCHEMA foo; ALTER TABLE foo.baz SET SCHEMA bar; `, sqlerr.RelationNotFound("baz"), }, { ` CREATE SCHEMA foo; CREATE TABLE foo.baz (); ALTER TABLE foo.baz SET SCHEMA bar; `, sqlerr.SchemaNotFound("bar"), }, { ` DROP SCHEMA bar; `, sqlerr.SchemaNotFound("bar"), }, { ` ALTER TABLE foo RENAME bar TO baz; `, sqlerr.RelationNotFound("foo"), }, { ` CREATE TABLE foo (); ALTER TABLE foo RENAME bar TO baz; `, sqlerr.ColumnNotFound("foo", "bar"), }, { ` CREATE TABLE foo (bar text, baz text); ALTER TABLE foo RENAME bar TO baz; `, sqlerr.ColumnExists("foo", "baz"), }, } { test := tc t.Run(strconv.Itoa(i), func(t *testing.T) { stmts, err := p.Parse(strings.NewReader(test.stmt)) if err != nil { t.Log(test.stmt) t.Fatal(err) } c := NewCatalog() err = c.Build(stmts) if err == nil { t.Log(test.stmt) t.Fatal("err was nil") } var actual *sqlerr.Error if !errors.As(err, &actual) { t.Fatalf("err is not *sqlerr.Error: %#v", err) } if diff := cmp.Diff(test.err.Error(), actual.Error()); diff != "" { t.Log(test.stmt) t.Errorf("error mismatch: \n%s", diff) } }) } } ================================================ FILE: internal/engine/postgresql/contrib/adminpack.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsAdminpack = []*catalog.Function{ { Name: "pg_file_rename", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_file_rename", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_file_sync", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_file_unlink", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_file_write", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_logdir_ls", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, } func Adminpack() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsAdminpack return s } ================================================ FILE: internal/engine/postgresql/contrib/amcheck.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsAmcheck = []*catalog.Function{ { Name: "bt_index_check", Args: []*catalog.Argument{ { Name: "index", Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "bt_index_check", Args: []*catalog.Argument{ { Name: "index", Type: &ast.TypeName{Name: "regclass"}, }, { Name: "heapallindexed", Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "bt_index_parent_check", Args: []*catalog.Argument{ { Name: "index", Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "bt_index_parent_check", Args: []*catalog.Argument{ { Name: "index", Type: &ast.TypeName{Name: "regclass"}, }, { Name: "heapallindexed", Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "bt_index_parent_check", Args: []*catalog.Argument{ { Name: "index", Type: &ast.TypeName{Name: "regclass"}, }, { Name: "heapallindexed", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "rootdescend", Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "verify_heapam", Args: []*catalog.Argument{ { Name: "relation", Type: &ast.TypeName{Name: "regclass"}, }, { Name: "on_error_stop", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, { Name: "check_toast", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, { Name: "skip", HasDefault: true, Type: &ast.TypeName{Name: "text"}, }, { Name: "startblock", HasDefault: true, Type: &ast.TypeName{Name: "bigint"}, }, { Name: "endblock", HasDefault: true, Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, } func Amcheck() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsAmcheck return s } ================================================ FILE: internal/engine/postgresql/contrib/btree_gin.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsBtreeGin = []*catalog.Function{ { Name: "gin_enum_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "gin_numeric_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, } func BtreeGin() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsBtreeGin return s } ================================================ FILE: internal/engine/postgresql/contrib/btree_gist.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsBtreeGist = []*catalog.Function{ { Name: "cash_dist", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "date_dist", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "float4_dist", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float8_dist", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "gbtreekey16_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "gbtreekey16"}, }, { Name: "gbtreekey16_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "gbtreekey16"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "gbtreekey2_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "gbtreekey2"}, }, { Name: "gbtreekey2_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "gbtreekey2"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "gbtreekey32_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "gbtreekey32"}, }, { Name: "gbtreekey32_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "gbtreekey32"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "gbtreekey4_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "gbtreekey4"}, }, { Name: "gbtreekey4_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "gbtreekey4"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "gbtreekey8_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "gbtreekey8"}, }, { Name: "gbtreekey8_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "gbtreekey8"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "gbtreekey_var_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "gbtreekey_var"}, }, { Name: "gbtreekey_var_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "gbtreekey_var"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "int2_dist", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int4_dist", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int8_dist", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "interval_dist", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "oid_dist", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "time_dist", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "ts_dist", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "tstz_dist", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, } func BtreeGist() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsBtreeGist return s } ================================================ FILE: internal/engine/postgresql/contrib/citext.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsCitext = []*catalog.Function{ { Name: "citext", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "citext"}, }, { Name: "citext", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "citext"}, }, { Name: "citext", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "citext"}, }, { Name: "citext_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "citext_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "citext_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "citext_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "citext_hash", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "citext_hash_extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "citext_larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "citext"}, }, { Name: "citext_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "citext_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "citext_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "citext_pattern_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "citext_pattern_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "citext_pattern_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "citext_pattern_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "citext_pattern_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "citext_smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "citext"}, }, { Name: "citextin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "citext"}, }, { Name: "citextout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "citextsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "citext"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "citext"}, }, { Name: "regexp_match", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "regexp_match", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "regexp_matches", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "regexp_matches", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "regexp_replace", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "regexp_replace", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "regexp_split_to_array", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "regexp_split_to_array", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "regexp_split_to_table", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "regexp_split_to_table", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "replace", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "split_part", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "strpos", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "texticlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "texticlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "texticnlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "texticnlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "texticregexeq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "texticregexeq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "texticregexne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "texticregexne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "translate", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "citext"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, } func Citext() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsCitext return s } ================================================ FILE: internal/engine/postgresql/contrib/cube.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsCube = []*catalog.Function{ { Name: "cube", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, }, { Name: "cube", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, }, { Name: "cube", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, }, { Name: "cube", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, }, { Name: "cube", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, }, { Name: "cube", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, }, { Name: "cube_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "cube_contained", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cube_contains", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cube_coord", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "cube_coord_llur", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "cube_dim", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "cube_distance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "cube_enlarge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, }, { Name: "cube_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cube_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cube_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cube_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, }, { Name: "cube_inter", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, }, { Name: "cube_is_point", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cube_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cube_ll_coord", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "cube_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cube_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cube_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "cube_overlap", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cube_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "cube_size", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "cube_subset", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, }, { Name: "cube_union", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, }, { Name: "cube_ur_coord", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "distance_chebyshev", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "distance_taxicab", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cube"}, }, { Type: &ast.TypeName{Name: "cube"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, } func Cube() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsCube return s } ================================================ FILE: internal/engine/postgresql/contrib/dblink.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsDblink = []*catalog.Function{ { Name: "dblink", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "dblink", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "dblink", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "dblink", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "dblink_build_sql_delete", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int2vector"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_build_sql_insert", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int2vector"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_build_sql_update", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "int2vector"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_cancel_query", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_close", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_close", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_close", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_close", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_connect", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_connect", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_connect_u", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_connect_u", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_current_query", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_disconnect", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_disconnect", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_error_message", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_exec", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_exec", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_exec", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_exec", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_fdw_validator", Args: []*catalog.Argument{ { Name: "options", Type: &ast.TypeName{Name: "text[]"}, }, { Name: "catalog", Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "dblink_fetch", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "dblink_fetch", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "dblink_fetch", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "dblink_fetch", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "dblink_get_connections", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "dblink_get_notify", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "dblink_get_notify", Args: []*catalog.Argument{ { Name: "conname", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "dblink_get_pkey", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "dblink_pkey_results"}, }, { Name: "dblink_get_result", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "dblink_get_result", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "dblink_is_busy", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "dblink_open", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_open", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_open", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_open", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dblink_send_query", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, } func Dblink() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsDblink return s } ================================================ FILE: internal/engine/postgresql/contrib/earthdistance.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsEarthdistance = []*catalog.Function{ { Name: "earth", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "earth_box", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "earth"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "cube"}, }, { Name: "earth_distance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "earth"}, }, { Type: &ast.TypeName{Name: "earth"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "gc_to_sec", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "geo_distance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "latitude", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "earth"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ll_to_earth", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "earth"}, }, { Name: "longitude", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "earth"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "sec_to_gc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, } func Earthdistance() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsEarthdistance return s } ================================================ FILE: internal/engine/postgresql/contrib/file_fdw.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsFileFdw = []*catalog.Function{ { Name: "file_fdw_handler", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "fdw_handler"}, }, { Name: "file_fdw_validator", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text[]"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, } func FileFdw() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsFileFdw return s } ================================================ FILE: internal/engine/postgresql/contrib/fuzzystrmatch.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsFuzzystrmatch = []*catalog.Function{ { Name: "difference", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "dmetaphone", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dmetaphone_alt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "levenshtein", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "levenshtein", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "levenshtein_less_equal", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "levenshtein_less_equal", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "metaphone", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "soundex", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "text_soundex", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, } func Fuzzystrmatch() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsFuzzystrmatch return s } ================================================ FILE: internal/engine/postgresql/contrib/hstore.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsHstore = []*catalog.Function{ { Name: "akeys", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "avals", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "defined", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "delete", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, }, { Name: "delete", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, }, { Name: "delete", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, }, { Name: "each", Args: []*catalog.Argument{ { Name: "hs", Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "exist", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "exists_all", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "exists_any", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "fetchval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ghstore_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "ghstore"}, }, { Name: "ghstore_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ghstore"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "hs_concat", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, }, { Name: "hs_contained", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "hs_contains", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "hstore", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, }, { Name: "hstore", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, }, { Name: "hstore", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, }, { Name: "hstore", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text[]"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, }, { Name: "hstore_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hstore_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "hstore_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "hstore_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "hstore_hash", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hstore_hash_extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hstore_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, }, { Name: "hstore_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "hstore_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "hstore_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "hstore_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "hstore_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "hstore_to_array", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "hstore_to_json", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "hstore_to_json_loose", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "hstore_to_jsonb", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "hstore_to_jsonb_loose", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "hstore_to_matrix", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "hstore_version_diag", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "isdefined", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isexists", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "populate_record", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "skeys", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "slice", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, }, { Name: "slice_array", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "svals", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "hstore"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "tconvert", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "hstore"}, }, } func Hstore() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsHstore return s } ================================================ FILE: internal/engine/postgresql/contrib/intagg.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsIntagg = []*catalog.Function{ { Name: "int_array_aggregate", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "int_array_enum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, } func Intagg() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsIntagg return s } ================================================ FILE: internal/engine/postgresql/contrib/intarray.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsIntarray = []*catalog.Function{ { Name: "_int_contained", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "_int_contains", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "_int_different", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "_int_inter", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "_int_overlap", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "_int_same", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "_int_union", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "_intbig_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "intbig_gkey"}, }, { Name: "_intbig_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "intbig_gkey"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "boolop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "query_int"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bqarr_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "query_int"}, }, { Name: "bqarr_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "query_int"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "icount", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "idx", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "intarray_del_elem", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "intarray_push_array", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "intarray_push_elem", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "intset", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "intset_subtract", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "intset_union_elem", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "querytree", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "query_int"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "rboolop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "query_int"}, }, { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "sort", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "sort", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "sort_asc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "sort_desc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "subarray", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "subarray", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "uniq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, } func Intarray() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsIntarray return s } ================================================ FILE: internal/engine/postgresql/contrib/isn.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsIsn = []*catalog.Function{ { Name: "btean13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btean13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btean13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btean13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btean13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btean13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btean13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btean13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btisbn13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btisbn13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btisbn13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btisbncmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btisbncmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btisbncmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btismn13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btismn13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btismn13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btismncmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btismncmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btismncmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btissn13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btissn13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btissn13cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btissncmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btissncmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btissncmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btupccmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btupccmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "ean13_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "ean13"}, }, { Name: "ean13_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "ean13_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "ean13_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "ean13_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "hashean13", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashisbn", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashisbn13", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashismn", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashismn13", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashissn", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashissn13", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashupc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "is_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "is_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "is_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "is_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "is_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "is_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "is_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "is_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isbn", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "isbn"}, }, { Name: "isbn13", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "isbn13"}, }, { Name: "isbn13_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "isbn13"}, }, { Name: "isbn_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "isbn"}, }, { Name: "ismn", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "ismn"}, }, { Name: "ismn13", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "ismn13"}, }, { Name: "ismn13_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "ismn13"}, }, { Name: "ismn_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "ismn"}, }, { Name: "isn_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "isn_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "isn_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "isn_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "isn_weak", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isn_weak", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isngt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isnne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "issn", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "issn"}, }, { Name: "issn13", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "issn13"}, }, { Name: "issn13_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "issn13"}, }, { Name: "issn_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "issn"}, }, { Name: "make_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "ean13"}, }, { Name: "make_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn"}, }, }, ReturnType: &ast.TypeName{Name: "isbn"}, }, { Name: "make_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "isbn13"}, }, }, ReturnType: &ast.TypeName{Name: "isbn13"}, }, { Name: "make_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn"}, }, }, ReturnType: &ast.TypeName{Name: "ismn"}, }, { Name: "make_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ismn13"}, }, }, ReturnType: &ast.TypeName{Name: "ismn13"}, }, { Name: "make_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn"}, }, }, ReturnType: &ast.TypeName{Name: "issn"}, }, { Name: "make_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "issn13"}, }, }, ReturnType: &ast.TypeName{Name: "issn13"}, }, { Name: "make_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "upc"}, }, }, ReturnType: &ast.TypeName{Name: "upc"}, }, { Name: "upc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ean13"}, }, }, ReturnType: &ast.TypeName{Name: "upc"}, }, { Name: "upc_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "upc"}, }, } func Isn() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsIsn return s } ================================================ FILE: internal/engine/postgresql/contrib/lo.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsLo = []*catalog.Function{ { Name: "lo_manage", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "lo_oid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lo"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, } func Lo() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsLo return s } ================================================ FILE: internal/engine/postgresql/contrib/ltree.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsLtree = []*catalog.Function{ { Name: "_lt_q_regex", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree[]"}, }, { Type: &ast.TypeName{Name: "lquery[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "_lt_q_rregex", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lquery[]"}, }, { Type: &ast.TypeName{Name: "ltree[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "_ltq_extract_regex", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree[]"}, }, { Type: &ast.TypeName{Name: "lquery"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "_ltq_regex", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree[]"}, }, { Type: &ast.TypeName{Name: "lquery"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "_ltq_rregex", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lquery"}, }, { Type: &ast.TypeName{Name: "ltree[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "_ltree_extract_isparent", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree[]"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "_ltree_extract_risparent", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree[]"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "_ltree_isparent", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree[]"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "_ltree_r_isparent", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "_ltree_r_risparent", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "_ltree_risparent", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree[]"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "_ltxtq_exec", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree[]"}, }, { Type: &ast.TypeName{Name: "ltxtquery"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "_ltxtq_extract_exec", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree[]"}, }, { Type: &ast.TypeName{Name: "ltxtquery"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "_ltxtq_rexec", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltxtquery"}, }, { Type: &ast.TypeName{Name: "ltree[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "index", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "index", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "lca", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "lca", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "lca", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "lca", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "lca", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "lca", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "lca", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "lca", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree[]"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "lquery_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "lquery"}, }, { Name: "lquery_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lquery"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "lquery_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lquery"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "lt_q_regex", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "lquery[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "lt_q_rregex", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lquery[]"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ltq_regex", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "lquery"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ltq_rregex", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lquery"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ltree2text", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ltree_addltree", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "ltree_addtext", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "ltree_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "ltree_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ltree_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ltree_gist_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "ltree_gist"}, }, { Name: "ltree_gist_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree_gist"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "ltree_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ltree_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "ltree_isparent", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ltree_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ltree_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ltree_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ltree_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "ltree_risparent", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ltree_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "ltree_textadd", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "ltxtq_exec", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "ltxtquery"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ltxtq_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "ltxtquery"}, }, { Name: "ltxtq_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltxtquery"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "ltxtq_rexec", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltxtquery"}, }, { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ltxtq_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltxtquery"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "nlevel", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "subltree", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "subpath", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "subpath", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "ltree"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, { Name: "text2ltree", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "ltree"}, }, } func Ltree() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsLtree return s } ================================================ FILE: internal/engine/postgresql/contrib/pageinspect.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsPageinspect = []*catalog.Function{ { Name: "brin_metapage_info", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "brin_page_items", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, { Name: "index_oid", Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "brin_page_type", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "brin_revmap_data", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "tid"}, }, { Name: "bt_metap", Args: []*catalog.Argument{ { Name: "relname", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "bt_page_items", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "bt_page_items", Args: []*catalog.Argument{ { Name: "relname", Type: &ast.TypeName{Name: "text"}, }, { Name: "blkno", Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "bt_page_stats", Args: []*catalog.Argument{ { Name: "relname", Type: &ast.TypeName{Name: "text"}, }, { Name: "blkno", Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "fsm_page_contents", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "get_raw_page", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "get_raw_page", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "gin_leafpage_items", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "gin_metapage_info", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "gin_page_opaque_info", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "gist_page_items", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, { Name: "index_oid", Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "gist_page_items_bytea", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "gist_page_opaque_info", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "hash_bitmap_info", Args: []*catalog.Argument{ { Name: "index_oid", Type: &ast.TypeName{Name: "regclass"}, }, { Name: "blkno", Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "hash_metapage_info", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "hash_page_items", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "hash_page_stats", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "hash_page_type", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "heap_page_item_attrs", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, { Name: "rel_oid", Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "heap_page_item_attrs", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, { Name: "rel_oid", Type: &ast.TypeName{Name: "regclass"}, }, { Name: "do_detoast", Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "heap_page_items", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "heap_tuple_infomask_flags", Args: []*catalog.Argument{ { Name: "t_infomask", Type: &ast.TypeName{Name: "integer"}, }, { Name: "t_infomask2", Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "page_checksum", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, { Name: "blkno", Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "page_header", Args: []*catalog.Argument{ { Name: "page", Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "tuple_data_split", Args: []*catalog.Argument{ { Name: "rel_oid", Type: &ast.TypeName{Name: "oid"}, }, { Name: "t_data", Type: &ast.TypeName{Name: "bytea"}, }, { Name: "t_infomask", Type: &ast.TypeName{Name: "integer"}, }, { Name: "t_infomask2", Type: &ast.TypeName{Name: "integer"}, }, { Name: "t_bits", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea[]"}, }, { Name: "tuple_data_split", Args: []*catalog.Argument{ { Name: "rel_oid", Type: &ast.TypeName{Name: "oid"}, }, { Name: "t_data", Type: &ast.TypeName{Name: "bytea"}, }, { Name: "t_infomask", Type: &ast.TypeName{Name: "integer"}, }, { Name: "t_infomask2", Type: &ast.TypeName{Name: "integer"}, }, { Name: "t_bits", Type: &ast.TypeName{Name: "text"}, }, { Name: "do_detoast", Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "bytea[]"}, }, } func Pageinspect() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsPageinspect return s } ================================================ FILE: internal/engine/postgresql/contrib/pg_buffercache.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsPgBuffercache = []*catalog.Function{ { Name: "pg_buffercache_pages", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, } func PgBuffercache() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsPgBuffercache return s } ================================================ FILE: internal/engine/postgresql/contrib/pg_freespacemap.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsPgFreespacemap = []*catalog.Function{ { Name: "pg_freespace", Args: []*catalog.Argument{ { Name: "rel", Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_freespace", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, } func PgFreespacemap() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsPgFreespacemap return s } ================================================ FILE: internal/engine/postgresql/contrib/pg_prewarm.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsPgPrewarm = []*catalog.Function{ { Name: "autoprewarm_dump_now", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "autoprewarm_start_worker", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_prewarm", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, { Name: "mode", HasDefault: true, Type: &ast.TypeName{Name: "text"}, }, { Name: "fork", HasDefault: true, Type: &ast.TypeName{Name: "text"}, }, { Name: "first_block", HasDefault: true, Type: &ast.TypeName{Name: "bigint"}, }, { Name: "last_block", HasDefault: true, Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, } func PgPrewarm() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsPgPrewarm return s } ================================================ FILE: internal/engine/postgresql/contrib/pg_stat_statements.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsPgStatStatements = []*catalog.Function{ { Name: "pg_stat_statements", Args: []*catalog.Argument{ { Name: "showtext", Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_stat_statements_info", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_stat_statements_reset", Args: []*catalog.Argument{ { Name: "userid", HasDefault: true, Type: &ast.TypeName{Name: "oid"}, }, { Name: "dbid", HasDefault: true, Type: &ast.TypeName{Name: "oid"}, }, { Name: "queryid", HasDefault: true, Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, } func PgStatStatements() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsPgStatStatements return s } ================================================ FILE: internal/engine/postgresql/contrib/pg_trgm.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsPgTrgm = []*catalog.Function{ { Name: "gtrgm_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "gtrgm"}, }, { Name: "gtrgm_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "gtrgm"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "set_limit", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "show_limit", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "show_trgm", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "similarity", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "similarity_dist", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "similarity_op", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "strict_word_similarity", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "strict_word_similarity_commutator_op", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "strict_word_similarity_dist_commutator_op", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "strict_word_similarity_dist_op", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "strict_word_similarity_op", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "word_similarity", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "word_similarity_commutator_op", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "word_similarity_dist_commutator_op", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "word_similarity_dist_op", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "word_similarity_op", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, } func PgTrgm() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsPgTrgm return s } ================================================ FILE: internal/engine/postgresql/contrib/pg_visibility.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsPgVisibility = []*catalog.Function{ { Name: "pg_check_frozen", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "tid"}, }, { Name: "pg_check_visible", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "tid"}, }, { Name: "pg_truncate_visibility_map", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_visibility", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_visibility", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, { Name: "blkno", Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_visibility_map", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_visibility_map", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, { Name: "blkno", Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_visibility_map_summary", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, } func PgVisibility() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsPgVisibility return s } ================================================ FILE: internal/engine/postgresql/contrib/pgcrypto.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsPgcrypto = []*catalog.Function{ { Name: "armor", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "armor", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "crypt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "dearmor", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "decrypt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "decrypt_iv", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "digest", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "digest", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "encrypt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "encrypt_iv", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "gen_random_bytes", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "gen_salt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "gen_salt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "hmac", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "hmac", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pgp_armor_headers", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pgp_key_id", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pgp_pub_decrypt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pgp_pub_decrypt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pgp_pub_decrypt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pgp_pub_decrypt_bytea", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pgp_pub_decrypt_bytea", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pgp_pub_decrypt_bytea", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pgp_pub_encrypt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pgp_pub_encrypt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pgp_pub_encrypt_bytea", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pgp_pub_encrypt_bytea", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pgp_sym_decrypt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pgp_sym_decrypt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pgp_sym_decrypt_bytea", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pgp_sym_decrypt_bytea", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pgp_sym_encrypt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pgp_sym_encrypt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pgp_sym_encrypt_bytea", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pgp_sym_encrypt_bytea", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, } func Pgcrypto() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsPgcrypto return s } ================================================ FILE: internal/engine/postgresql/contrib/pgrowlocks.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsPgrowlocks = []*catalog.Function{ { Name: "pgrowlocks", Args: []*catalog.Argument{ { Name: "relname", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, } func Pgrowlocks() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsPgrowlocks return s } ================================================ FILE: internal/engine/postgresql/contrib/pgstattuple.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsPgstattuple = []*catalog.Function{ { Name: "pg_relpages", Args: []*catalog.Argument{ { Name: "relname", Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_relpages", Args: []*catalog.Argument{ { Name: "relname", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pgstatginindex", Args: []*catalog.Argument{ { Name: "relname", Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pgstathashindex", Args: []*catalog.Argument{ { Name: "relname", Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pgstatindex", Args: []*catalog.Argument{ { Name: "relname", Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pgstatindex", Args: []*catalog.Argument{ { Name: "relname", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pgstattuple", Args: []*catalog.Argument{ { Name: "reloid", Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pgstattuple", Args: []*catalog.Argument{ { Name: "relname", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pgstattuple_approx", Args: []*catalog.Argument{ { Name: "reloid", Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, } func Pgstattuple() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsPgstattuple return s } ================================================ FILE: internal/engine/postgresql/contrib/postgres_fdw.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsPostgresFdw = []*catalog.Function{ { Name: "postgres_fdw_disconnect", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "postgres_fdw_disconnect_all", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "postgres_fdw_get_connections", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "postgres_fdw_handler", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "fdw_handler"}, }, { Name: "postgres_fdw_validator", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text[]"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, } func PostgresFdw() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsPostgresFdw return s } ================================================ FILE: internal/engine/postgresql/contrib/seg.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsSeg = []*catalog.Function{ { Name: "seg_center", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "seg_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "seg_contained", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "seg_contains", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "seg_different", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "seg_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "seg_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "seg_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "seg"}, }, { Name: "seg_inter", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "seg"}, }, { Name: "seg_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "seg_left", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "seg_lower", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "seg_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "seg_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "seg_over_left", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "seg_over_right", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "seg_overlap", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "seg_right", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "seg_same", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "seg_size", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "seg_union", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "seg"}, }, { Name: "seg_upper", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "seg"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, } func Seg() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsSeg return s } ================================================ FILE: internal/engine/postgresql/contrib/sslinfo.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsSslinfo = []*catalog.Function{ { Name: "ssl_cipher", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ssl_client_cert_present", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ssl_client_dn", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ssl_client_dn_field", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ssl_client_serial", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "ssl_extension_info", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "ssl_is_used", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ssl_issuer_dn", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ssl_issuer_field", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ssl_version", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, } func Sslinfo() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsSslinfo return s } ================================================ FILE: internal/engine/postgresql/contrib/tablefunc.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsTablefunc = []*catalog.Function{ { Name: "connectby", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "connectby", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "connectby", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "connectby", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "crosstab", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "crosstab", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "crosstab", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "crosstab2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tablefunc_crosstab_2"}, }, { Name: "crosstab3", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tablefunc_crosstab_3"}, }, { Name: "crosstab4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tablefunc_crosstab_4"}, }, { Name: "normal_rand", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, } func Tablefunc() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsTablefunc return s } ================================================ FILE: internal/engine/postgresql/contrib/tcn.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsTcn = []*catalog.Function{ { Name: "triggered_change_notification", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, } func Tcn() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsTcn return s } ================================================ FILE: internal/engine/postgresql/contrib/unaccent.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsUnaccent = []*catalog.Function{ { Name: "unaccent", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regdictionary"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "unaccent", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, } func Unaccent() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsUnaccent return s } ================================================ FILE: internal/engine/postgresql/contrib/uuid_ossp.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsUuidOssp = []*catalog.Function{ { Name: "uuid_generate_v1", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "uuid"}, }, { Name: "uuid_generate_v1mc", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "uuid"}, }, { Name: "uuid_generate_v3", Args: []*catalog.Argument{ { Name: "namespace", Type: &ast.TypeName{Name: "uuid"}, }, { Name: "name", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "uuid"}, }, { Name: "uuid_generate_v4", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "uuid"}, }, { Name: "uuid_generate_v5", Args: []*catalog.Argument{ { Name: "namespace", Type: &ast.TypeName{Name: "uuid"}, }, { Name: "name", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "uuid"}, }, { Name: "uuid_nil", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "uuid"}, }, { Name: "uuid_ns_dns", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "uuid"}, }, { Name: "uuid_ns_oid", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "uuid"}, }, { Name: "uuid_ns_url", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "uuid"}, }, { Name: "uuid_ns_x500", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "uuid"}, }, } func UuidOssp() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsUuidOssp return s } ================================================ FILE: internal/engine/postgresql/contrib/xml2.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package contrib import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsXml2 = []*catalog.Function{ { Name: "xml_encode_special_chars", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "xml_valid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xpath_bool", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xpath_list", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "xpath_list", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "xpath_nodeset", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "xpath_nodeset", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "xpath_nodeset", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "xpath_number", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "xpath_string", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "xpath_table", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "xslt_process", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "xslt_process", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, } func Xml2() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsXml2 return s } ================================================ FILE: internal/engine/postgresql/convert.go ================================================ package postgresql import ( "fmt" pg "github.com/pganalyze/pg_query_go/v6" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) func convertFuncParamMode(m pg.FunctionParameterMode) (ast.FuncParamMode, error) { switch m { case pg.FunctionParameterMode_FUNC_PARAM_IN: return ast.FuncParamIn, nil case pg.FunctionParameterMode_FUNC_PARAM_OUT: return ast.FuncParamOut, nil case pg.FunctionParameterMode_FUNC_PARAM_INOUT: return ast.FuncParamInOut, nil case pg.FunctionParameterMode_FUNC_PARAM_VARIADIC: return ast.FuncParamVariadic, nil case pg.FunctionParameterMode_FUNC_PARAM_TABLE: return ast.FuncParamTable, nil case pg.FunctionParameterMode_FUNC_PARAM_DEFAULT: return ast.FuncParamDefault, nil default: return -1, fmt.Errorf("parse func param: invalid mode %v", m) } } func convertSubLinkType(t pg.SubLinkType) (ast.SubLinkType, error) { switch t { case pg.SubLinkType_EXISTS_SUBLINK: return ast.EXISTS_SUBLINK, nil case pg.SubLinkType_ALL_SUBLINK: return ast.ALL_SUBLINK, nil case pg.SubLinkType_ANY_SUBLINK: return ast.ANY_SUBLINK, nil case pg.SubLinkType_ROWCOMPARE_SUBLINK: return ast.ROWCOMPARE_SUBLINK, nil case pg.SubLinkType_EXPR_SUBLINK: return ast.EXPR_SUBLINK, nil case pg.SubLinkType_MULTIEXPR_SUBLINK: return ast.MULTIEXPR_SUBLINK, nil case pg.SubLinkType_ARRAY_SUBLINK: return ast.ARRAY_SUBLINK, nil case pg.SubLinkType_CTE_SUBLINK: return ast.CTE_SUBLINK, nil default: return 0, fmt.Errorf("parse sublink type: unknown type %s", t) } } func convertSetOperation(t pg.SetOperation) (ast.SetOperation, error) { switch t { case pg.SetOperation_SETOP_NONE: return ast.None, nil case pg.SetOperation_SETOP_UNION: return ast.Union, nil case pg.SetOperation_SETOP_INTERSECT: return ast.Intersect, nil case pg.SetOperation_SETOP_EXCEPT: return ast.Except, nil default: return 0, fmt.Errorf("parse set operation: unknown type %s", t) } } func convertList(l *pg.List) *ast.List { out := &ast.List{} for _, item := range l.Items { out.Items = append(out.Items, convertNode(item)) } return out } func convertSlice(nodes []*pg.Node) *ast.List { out := &ast.List{} for _, n := range nodes { out.Items = append(out.Items, convertNode(n)) } return out } func convert(node *pg.Node) (ast.Node, error) { return convertNode(node), nil } func convertA_ArrayExpr(n *pg.A_ArrayExpr) *ast.A_ArrayExpr { if n == nil { return nil } return &ast.A_ArrayExpr{ Elements: convertSlice(n.Elements), Location: int(n.Location), } } func convertA_Const(n *pg.A_Const) *ast.A_Const { if n == nil { return nil } var val ast.Node if n.Isnull { val = &ast.Null{} } else { switch v := n.Val.(type) { case *pg.A_Const_Boolval: val = convertBoolean(v.Boolval) case *pg.A_Const_Bsval: val = convertBitString(v.Bsval) case *pg.A_Const_Fval: val = convertFloat(v.Fval) case *pg.A_Const_Ival: val = convertInteger(v.Ival) case *pg.A_Const_Sval: val = convertString(v.Sval) } } return &ast.A_Const{ Val: val, Location: int(n.Location), } } func convertA_Expr(n *pg.A_Expr) *ast.A_Expr { if n == nil { return nil } return &ast.A_Expr{ Kind: ast.A_Expr_Kind(n.Kind), Name: convertSlice(n.Name), Lexpr: convertNode(n.Lexpr), Rexpr: convertNode(n.Rexpr), Location: int(n.Location), } } func convertA_Indices(n *pg.A_Indices) *ast.A_Indices { if n == nil { return nil } return &ast.A_Indices{ IsSlice: n.IsSlice, Lidx: convertNode(n.Lidx), Uidx: convertNode(n.Uidx), } } func convertA_Indirection(n *pg.A_Indirection) *ast.A_Indirection { if n == nil { return nil } return &ast.A_Indirection{ Arg: convertNode(n.Arg), Indirection: convertSlice(n.Indirection), } } func convertA_Star(n *pg.A_Star) *ast.A_Star { if n == nil { return nil } return &ast.A_Star{} } func convertAccessPriv(n *pg.AccessPriv) *ast.AccessPriv { if n == nil { return nil } return &ast.AccessPriv{ PrivName: makeString(n.PrivName), Cols: convertSlice(n.Cols), } } func convertAggref(n *pg.Aggref) *ast.Aggref { if n == nil { return nil } return &ast.Aggref{ Xpr: convertNode(n.Xpr), Aggfnoid: ast.Oid(n.Aggfnoid), Aggtype: ast.Oid(n.Aggtype), Aggcollid: ast.Oid(n.Aggcollid), Inputcollid: ast.Oid(n.Inputcollid), Aggargtypes: convertSlice(n.Aggargtypes), Aggdirectargs: convertSlice(n.Aggdirectargs), Args: convertSlice(n.Args), Aggorder: convertSlice(n.Aggorder), Aggdistinct: convertSlice(n.Aggdistinct), Aggfilter: convertNode(n.Aggfilter), Aggstar: n.Aggstar, Aggvariadic: n.Aggvariadic, Aggkind: makeByte(n.Aggkind), Agglevelsup: ast.Index(n.Agglevelsup), Aggsplit: ast.AggSplit(n.Aggsplit), Location: int(n.Location), } } func convertAlias(n *pg.Alias) *ast.Alias { if n == nil { return nil } return &ast.Alias{ Aliasname: makeString(n.Aliasname), Colnames: convertSlice(n.Colnames), } } func convertAlterCollationStmt(n *pg.AlterCollationStmt) *ast.AlterCollationStmt { if n == nil { return nil } return &ast.AlterCollationStmt{ Collname: convertSlice(n.Collname), } } func convertAlterDatabaseSetStmt(n *pg.AlterDatabaseSetStmt) *ast.AlterDatabaseSetStmt { if n == nil { return nil } return &ast.AlterDatabaseSetStmt{ Dbname: makeString(n.Dbname), Setstmt: convertVariableSetStmt(n.Setstmt), } } func convertAlterDatabaseStmt(n *pg.AlterDatabaseStmt) *ast.AlterDatabaseStmt { if n == nil { return nil } return &ast.AlterDatabaseStmt{ Dbname: makeString(n.Dbname), Options: convertSlice(n.Options), } } func convertAlterDefaultPrivilegesStmt(n *pg.AlterDefaultPrivilegesStmt) *ast.AlterDefaultPrivilegesStmt { if n == nil { return nil } return &ast.AlterDefaultPrivilegesStmt{ Options: convertSlice(n.Options), Action: convertGrantStmt(n.Action), } } func convertAlterDomainStmt(n *pg.AlterDomainStmt) *ast.AlterDomainStmt { if n == nil { return nil } return &ast.AlterDomainStmt{ Subtype: makeByte(n.Subtype), TypeName: convertSlice(n.TypeName), Name: makeString(n.Name), Def: convertNode(n.Def), Behavior: ast.DropBehavior(n.Behavior), MissingOk: n.MissingOk, } } func convertAlterEnumStmt(n *pg.AlterEnumStmt) *ast.AlterEnumStmt { if n == nil { return nil } return &ast.AlterEnumStmt{ TypeName: convertSlice(n.TypeName), OldVal: makeString(n.OldVal), NewVal: makeString(n.NewVal), NewValNeighbor: makeString(n.NewValNeighbor), NewValIsAfter: n.NewValIsAfter, SkipIfNewValExists: n.SkipIfNewValExists, } } func convertAlterEventTrigStmt(n *pg.AlterEventTrigStmt) *ast.AlterEventTrigStmt { if n == nil { return nil } return &ast.AlterEventTrigStmt{ Trigname: makeString(n.Trigname), Tgenabled: makeByte(n.Tgenabled), } } func convertAlterExtensionContentsStmt(n *pg.AlterExtensionContentsStmt) *ast.AlterExtensionContentsStmt { if n == nil { return nil } return &ast.AlterExtensionContentsStmt{ Extname: makeString(n.Extname), Action: int(n.Action), Objtype: ast.ObjectType(n.Objtype), Object: convertNode(n.Object), } } func convertAlterExtensionStmt(n *pg.AlterExtensionStmt) *ast.AlterExtensionStmt { if n == nil { return nil } return &ast.AlterExtensionStmt{ Extname: makeString(n.Extname), Options: convertSlice(n.Options), } } func convertAlterFdwStmt(n *pg.AlterFdwStmt) *ast.AlterFdwStmt { if n == nil { return nil } return &ast.AlterFdwStmt{ Fdwname: makeString(n.Fdwname), FuncOptions: convertSlice(n.FuncOptions), Options: convertSlice(n.Options), } } func convertAlterForeignServerStmt(n *pg.AlterForeignServerStmt) *ast.AlterForeignServerStmt { if n == nil { return nil } return &ast.AlterForeignServerStmt{ Servername: makeString(n.Servername), Version: makeString(n.Version), Options: convertSlice(n.Options), HasVersion: n.HasVersion, } } func convertAlterFunctionStmt(n *pg.AlterFunctionStmt) *ast.AlterFunctionStmt { if n == nil { return nil } return &ast.AlterFunctionStmt{ Func: convertObjectWithArgs(n.Func), Actions: convertSlice(n.Actions), } } func convertAlterObjectDependsStmt(n *pg.AlterObjectDependsStmt) *ast.AlterObjectDependsStmt { if n == nil { return nil } return &ast.AlterObjectDependsStmt{ ObjectType: ast.ObjectType(n.ObjectType), Relation: convertRangeVar(n.Relation), Object: convertNode(n.Object), Extname: convertString(n.Extname), } } func convertAlterObjectSchemaStmt(n *pg.AlterObjectSchemaStmt) *ast.AlterObjectSchemaStmt { if n == nil { return nil } return &ast.AlterObjectSchemaStmt{ ObjectType: ast.ObjectType(n.ObjectType), Relation: convertRangeVar(n.Relation), Object: convertNode(n.Object), Newschema: makeString(n.Newschema), MissingOk: n.MissingOk, } } func convertAlterOpFamilyStmt(n *pg.AlterOpFamilyStmt) *ast.AlterOpFamilyStmt { if n == nil { return nil } return &ast.AlterOpFamilyStmt{ Opfamilyname: convertSlice(n.Opfamilyname), Amname: makeString(n.Amname), IsDrop: n.IsDrop, Items: convertSlice(n.Items), } } func convertAlterOperatorStmt(n *pg.AlterOperatorStmt) *ast.AlterOperatorStmt { if n == nil { return nil } return &ast.AlterOperatorStmt{ Opername: convertObjectWithArgs(n.Opername), Options: convertSlice(n.Options), } } func convertAlterOwnerStmt(n *pg.AlterOwnerStmt) *ast.AlterOwnerStmt { if n == nil { return nil } return &ast.AlterOwnerStmt{ ObjectType: ast.ObjectType(n.ObjectType), Relation: convertRangeVar(n.Relation), Object: convertNode(n.Object), Newowner: convertRoleSpec(n.Newowner), } } func convertAlterPolicyStmt(n *pg.AlterPolicyStmt) *ast.AlterPolicyStmt { if n == nil { return nil } return &ast.AlterPolicyStmt{ PolicyName: makeString(n.PolicyName), Table: convertRangeVar(n.Table), Roles: convertSlice(n.Roles), Qual: convertNode(n.Qual), WithCheck: convertNode(n.WithCheck), } } func convertAlterPublicationStmt(n *pg.AlterPublicationStmt) *ast.AlterPublicationStmt { if n == nil { return nil } return &ast.AlterPublicationStmt{ Pubname: makeString(n.Pubname), Options: convertSlice(n.Options), Tables: convertSlice(n.Pubobjects), ForAllTables: n.ForAllTables, TableAction: ast.DefElemAction(n.Action), } } func convertAlterRoleSetStmt(n *pg.AlterRoleSetStmt) *ast.AlterRoleSetStmt { if n == nil { return nil } return &ast.AlterRoleSetStmt{ Role: convertRoleSpec(n.Role), Database: makeString(n.Database), Setstmt: convertVariableSetStmt(n.Setstmt), } } func convertAlterRoleStmt(n *pg.AlterRoleStmt) *ast.AlterRoleStmt { if n == nil { return nil } return &ast.AlterRoleStmt{ Role: convertRoleSpec(n.Role), Options: convertSlice(n.Options), Action: int(n.Action), } } func convertAlterSeqStmt(n *pg.AlterSeqStmt) *ast.AlterSeqStmt { if n == nil { return nil } return &ast.AlterSeqStmt{ Sequence: convertRangeVar(n.Sequence), Options: convertSlice(n.Options), ForIdentity: n.ForIdentity, MissingOk: n.MissingOk, } } func convertAlterSubscriptionStmt(n *pg.AlterSubscriptionStmt) *ast.AlterSubscriptionStmt { if n == nil { return nil } return &ast.AlterSubscriptionStmt{ Kind: ast.AlterSubscriptionType(n.Kind), Subname: makeString(n.Subname), Conninfo: makeString(n.Conninfo), Publication: convertSlice(n.Publication), Options: convertSlice(n.Options), } } func convertAlterSystemStmt(n *pg.AlterSystemStmt) *ast.AlterSystemStmt { if n == nil { return nil } return &ast.AlterSystemStmt{ Setstmt: convertVariableSetStmt(n.Setstmt), } } func convertAlterTSConfigurationStmt(n *pg.AlterTSConfigurationStmt) *ast.AlterTSConfigurationStmt { if n == nil { return nil } return &ast.AlterTSConfigurationStmt{ Kind: ast.AlterTSConfigType(n.Kind), Cfgname: convertSlice(n.Cfgname), Tokentype: convertSlice(n.Tokentype), Dicts: convertSlice(n.Dicts), Override: n.Override, Replace: n.Replace, MissingOk: n.MissingOk, } } func convertAlterTSDictionaryStmt(n *pg.AlterTSDictionaryStmt) *ast.AlterTSDictionaryStmt { if n == nil { return nil } return &ast.AlterTSDictionaryStmt{ Dictname: convertSlice(n.Dictname), Options: convertSlice(n.Options), } } func convertAlterTableCmd(n *pg.AlterTableCmd) *ast.AlterTableCmd { if n == nil { return nil } def := convertNode(n.Def) columnDef := def.(*ast.ColumnDef) return &ast.AlterTableCmd{ Subtype: ast.AlterTableType(n.Subtype), Name: makeString(n.Name), Newowner: convertRoleSpec(n.Newowner), Def: columnDef, Behavior: ast.DropBehavior(n.Behavior), MissingOk: n.MissingOk, } } func convertAlterTableMoveAllStmt(n *pg.AlterTableMoveAllStmt) *ast.AlterTableMoveAllStmt { if n == nil { return nil } return &ast.AlterTableMoveAllStmt{ OrigTablespacename: makeString(n.OrigTablespacename), Objtype: ast.ObjectType(n.Objtype), Roles: convertSlice(n.Roles), NewTablespacename: makeString(n.NewTablespacename), Nowait: n.Nowait, } } func convertAlterTableSpaceOptionsStmt(n *pg.AlterTableSpaceOptionsStmt) *ast.AlterTableSpaceOptionsStmt { if n == nil { return nil } return &ast.AlterTableSpaceOptionsStmt{ Tablespacename: makeString(n.Tablespacename), Options: convertSlice(n.Options), IsReset: n.IsReset, } } func convertAlterTableStmt(n *pg.AlterTableStmt) *ast.AlterTableStmt { if n == nil { return nil } return &ast.AlterTableStmt{ Relation: convertRangeVar(n.Relation), Cmds: convertSlice(n.Cmds), Relkind: ast.ObjectType(n.Objtype), MissingOk: n.MissingOk, } } func convertAlterUserMappingStmt(n *pg.AlterUserMappingStmt) *ast.AlterUserMappingStmt { if n == nil { return nil } return &ast.AlterUserMappingStmt{ User: convertRoleSpec(n.User), Servername: makeString(n.Servername), Options: convertSlice(n.Options), } } func convertAlternativeSubPlan(n *pg.AlternativeSubPlan) *ast.AlternativeSubPlan { if n == nil { return nil } return &ast.AlternativeSubPlan{ Xpr: convertNode(n.Xpr), Subplans: convertSlice(n.Subplans), } } func convertArrayCoerceExpr(n *pg.ArrayCoerceExpr) *ast.ArrayCoerceExpr { if n == nil { return nil } return &ast.ArrayCoerceExpr{ Xpr: convertNode(n.Xpr), Arg: convertNode(n.Arg), Resulttype: ast.Oid(n.Resulttype), Resulttypmod: n.Resulttypmod, Resultcollid: ast.Oid(n.Resultcollid), Coerceformat: ast.CoercionForm(n.Coerceformat), Location: int(n.Location), } } func convertArrayExpr(n *pg.ArrayExpr) *ast.ArrayExpr { if n == nil { return nil } return &ast.ArrayExpr{ Xpr: convertNode(n.Xpr), ArrayTypeid: ast.Oid(n.ArrayTypeid), ArrayCollid: ast.Oid(n.ArrayCollid), ElementTypeid: ast.Oid(n.ElementTypeid), Elements: convertSlice(n.Elements), Multidims: n.Multidims, Location: int(n.Location), } } func convertBitString(n *pg.BitString) *ast.BitString { if n == nil { return nil } return &ast.BitString{ Str: n.Bsval, } } func convertBoolExpr(n *pg.BoolExpr) *ast.BoolExpr { if n == nil { return nil } return &ast.BoolExpr{ Xpr: convertNode(n.Xpr), Boolop: ast.BoolExprType(n.Boolop), Args: convertSlice(n.Args), Location: int(n.Location), } } func convertBoolean(n *pg.Boolean) *ast.Boolean { if n == nil { return nil } return &ast.Boolean{ Boolval: n.Boolval, } } func convertBooleanTest(n *pg.BooleanTest) *ast.BooleanTest { if n == nil { return nil } return &ast.BooleanTest{ Xpr: convertNode(n.Xpr), Arg: convertNode(n.Arg), Booltesttype: ast.BoolTestType(n.Booltesttype), Location: int(n.Location), } } func convertCallStmt(n *pg.CallStmt) *ast.CallStmt { if n == nil { return nil } rel, err := parseRelationFromNodes(n.Funccall.Funcname) if err != nil { // TODO: How should we handle errors? panic(err) } return &ast.CallStmt{ FuncCall: &ast.FuncCall{ Func: rel.FuncName(), Funcname: convertSlice(n.Funccall.Funcname), Args: convertSlice(n.Funccall.Args), AggOrder: convertSlice(n.Funccall.AggOrder), AggFilter: convertNode(n.Funccall.AggFilter), AggWithinGroup: n.Funccall.AggWithinGroup, AggStar: n.Funccall.AggStar, AggDistinct: n.Funccall.AggDistinct, FuncVariadic: n.Funccall.FuncVariadic, Over: convertWindowDef(n.Funccall.Over), Location: int(n.Funccall.Location), }, } } func convertCaseExpr(n *pg.CaseExpr) *ast.CaseExpr { if n == nil { return nil } return &ast.CaseExpr{ Xpr: convertNode(n.Xpr), Casetype: ast.Oid(n.Casetype), Casecollid: ast.Oid(n.Casecollid), Arg: convertNode(n.Arg), Args: convertSlice(n.Args), Defresult: convertNode(n.Defresult), Location: int(n.Location), } } func convertCaseTestExpr(n *pg.CaseTestExpr) *ast.CaseTestExpr { if n == nil { return nil } return &ast.CaseTestExpr{ Xpr: convertNode(n.Xpr), TypeId: ast.Oid(n.TypeId), TypeMod: n.TypeMod, Collation: ast.Oid(n.Collation), } } func convertCaseWhen(n *pg.CaseWhen) *ast.CaseWhen { if n == nil { return nil } return &ast.CaseWhen{ Xpr: convertNode(n.Xpr), Expr: convertNode(n.Expr), Result: convertNode(n.Result), Location: int(n.Location), } } func convertCheckPointStmt(n *pg.CheckPointStmt) *ast.CheckPointStmt { if n == nil { return nil } return &ast.CheckPointStmt{} } func convertClosePortalStmt(n *pg.ClosePortalStmt) *ast.ClosePortalStmt { if n == nil { return nil } return &ast.ClosePortalStmt{ Portalname: makeString(n.Portalname), } } func convertClusterStmt(n *pg.ClusterStmt) *ast.ClusterStmt { if n == nil { return nil } return &ast.ClusterStmt{ Relation: convertRangeVar(n.Relation), Indexname: makeString(n.Indexname), } } func convertCoalesceExpr(n *pg.CoalesceExpr) *ast.CoalesceExpr { if n == nil { return nil } return &ast.CoalesceExpr{ Xpr: convertNode(n.Xpr), Coalescetype: ast.Oid(n.Coalescetype), Coalescecollid: ast.Oid(n.Coalescecollid), Args: convertSlice(n.Args), Location: int(n.Location), } } func convertCoerceToDomain(n *pg.CoerceToDomain) *ast.CoerceToDomain { if n == nil { return nil } return &ast.CoerceToDomain{ Xpr: convertNode(n.Xpr), Arg: convertNode(n.Arg), Resulttype: ast.Oid(n.Resulttype), Resulttypmod: n.Resulttypmod, Resultcollid: ast.Oid(n.Resultcollid), Coercionformat: ast.CoercionForm(n.Coercionformat), Location: int(n.Location), } } func convertCoerceToDomainValue(n *pg.CoerceToDomainValue) *ast.CoerceToDomainValue { if n == nil { return nil } return &ast.CoerceToDomainValue{ Xpr: convertNode(n.Xpr), TypeId: ast.Oid(n.TypeId), TypeMod: n.TypeMod, Collation: ast.Oid(n.Collation), Location: int(n.Location), } } func convertCoerceViaIO(n *pg.CoerceViaIO) *ast.CoerceViaIO { if n == nil { return nil } return &ast.CoerceViaIO{ Xpr: convertNode(n.Xpr), Arg: convertNode(n.Arg), Resulttype: ast.Oid(n.Resulttype), Resultcollid: ast.Oid(n.Resultcollid), Coerceformat: ast.CoercionForm(n.Coerceformat), Location: int(n.Location), } } func convertCollateClause(n *pg.CollateClause) *ast.CollateClause { if n == nil { return nil } return &ast.CollateClause{ Arg: convertNode(n.Arg), Collname: convertSlice(n.Collname), Location: int(n.Location), } } func convertCollateExpr(n *pg.CollateExpr) *ast.CollateExpr { if n == nil { return nil } return &ast.CollateExpr{ Xpr: convertNode(n.Xpr), Arg: convertNode(n.Arg), CollOid: ast.Oid(n.CollOid), Location: int(n.Location), } } func convertColumnDef(n *pg.ColumnDef) *ast.ColumnDef { if n == nil { return nil } return &ast.ColumnDef{ Colname: n.Colname, TypeName: convertTypeName(n.TypeName), Inhcount: int(n.Inhcount), IsLocal: n.IsLocal, IsNotNull: n.IsNotNull, IsFromType: n.IsFromType, Storage: makeByte(n.Storage), RawDefault: convertNode(n.RawDefault), CookedDefault: convertNode(n.CookedDefault), Identity: makeByte(n.Identity), CollClause: convertCollateClause(n.CollClause), CollOid: ast.Oid(n.CollOid), Constraints: convertSlice(n.Constraints), Fdwoptions: convertSlice(n.Fdwoptions), Location: int(n.Location), } } func convertColumnRef(n *pg.ColumnRef) *ast.ColumnRef { if n == nil { return nil } return &ast.ColumnRef{ Fields: convertSlice(n.Fields), Location: int(n.Location), } } func convertCommentStmt(n *pg.CommentStmt) *ast.CommentStmt { if n == nil { return nil } return &ast.CommentStmt{ Objtype: ast.ObjectType(n.Objtype), Object: convertNode(n.Object), Comment: makeString(n.Comment), } } func convertCommonTableExpr(n *pg.CommonTableExpr) *ast.CommonTableExpr { if n == nil { return nil } return &ast.CommonTableExpr{ Ctename: makeString(n.Ctename), Aliascolnames: convertSlice(n.Aliascolnames), Ctequery: convertNode(n.Ctequery), Location: int(n.Location), Cterecursive: n.Cterecursive, Cterefcount: int(n.Cterefcount), Ctecolnames: convertSlice(n.Ctecolnames), Ctecoltypes: convertSlice(n.Ctecoltypes), Ctecoltypmods: convertSlice(n.Ctecoltypmods), Ctecolcollations: convertSlice(n.Ctecolcollations), } } func convertCompositeTypeStmt(n *pg.CompositeTypeStmt) *ast.CompositeTypeStmt { if n == nil { return nil } rel := parseRelationFromRangeVar(n.Typevar) return &ast.CompositeTypeStmt{ TypeName: rel.TypeName(), } } func convertConstraint(n *pg.Constraint) *ast.Constraint { if n == nil { return nil } return &ast.Constraint{ Contype: ast.ConstrType(n.Contype), Conname: makeString(n.Conname), Deferrable: n.Deferrable, Initdeferred: n.Initdeferred, Location: int(n.Location), IsNoInherit: n.IsNoInherit, RawExpr: convertNode(n.RawExpr), CookedExpr: makeString(n.CookedExpr), GeneratedWhen: makeByte(n.GeneratedWhen), Keys: convertSlice(n.Keys), Exclusions: convertSlice(n.Exclusions), Options: convertSlice(n.Options), Indexname: makeString(n.Indexname), Indexspace: makeString(n.Indexspace), AccessMethod: makeString(n.AccessMethod), WhereClause: convertNode(n.WhereClause), Pktable: convertRangeVar(n.Pktable), FkAttrs: convertSlice(n.FkAttrs), PkAttrs: convertSlice(n.PkAttrs), FkMatchtype: makeByte(n.FkMatchtype), FkUpdAction: makeByte(n.FkUpdAction), FkDelAction: makeByte(n.FkDelAction), OldConpfeqop: convertSlice(n.OldConpfeqop), OldPktableOid: ast.Oid(n.OldPktableOid), SkipValidation: n.SkipValidation, InitiallyValid: n.InitiallyValid, } } func convertConstraintsSetStmt(n *pg.ConstraintsSetStmt) *ast.ConstraintsSetStmt { if n == nil { return nil } return &ast.ConstraintsSetStmt{ Constraints: convertSlice(n.Constraints), Deferred: n.Deferred, } } func convertConvertRowtypeExpr(n *pg.ConvertRowtypeExpr) *ast.ConvertRowtypeExpr { if n == nil { return nil } return &ast.ConvertRowtypeExpr{ Xpr: convertNode(n.Xpr), Arg: convertNode(n.Arg), Resulttype: ast.Oid(n.Resulttype), Convertformat: ast.CoercionForm(n.Convertformat), Location: int(n.Location), } } func convertCopyStmt(n *pg.CopyStmt) *ast.CopyStmt { if n == nil { return nil } return &ast.CopyStmt{ Relation: convertRangeVar(n.Relation), Query: convertNode(n.Query), Attlist: convertSlice(n.Attlist), IsFrom: n.IsFrom, IsProgram: n.IsProgram, Filename: makeString(n.Filename), Options: convertSlice(n.Options), } } func convertCreateAmStmt(n *pg.CreateAmStmt) *ast.CreateAmStmt { if n == nil { return nil } return &ast.CreateAmStmt{ Amname: makeString(n.Amname), HandlerName: convertSlice(n.HandlerName), Amtype: makeByte(n.Amtype), } } func convertCreateCastStmt(n *pg.CreateCastStmt) *ast.CreateCastStmt { if n == nil { return nil } return &ast.CreateCastStmt{ Sourcetype: convertTypeName(n.Sourcetype), Targettype: convertTypeName(n.Targettype), Func: convertObjectWithArgs(n.Func), Context: ast.CoercionContext(n.Context), Inout: n.Inout, } } func convertCreateConversionStmt(n *pg.CreateConversionStmt) *ast.CreateConversionStmt { if n == nil { return nil } return &ast.CreateConversionStmt{ ConversionName: convertSlice(n.ConversionName), ForEncodingName: makeString(n.ForEncodingName), ToEncodingName: makeString(n.ToEncodingName), FuncName: convertSlice(n.FuncName), Def: n.Def, } } func convertCreateDomainStmt(n *pg.CreateDomainStmt) *ast.CreateDomainStmt { if n == nil { return nil } return &ast.CreateDomainStmt{ Domainname: convertSlice(n.Domainname), TypeName: convertTypeName(n.TypeName), CollClause: convertCollateClause(n.CollClause), Constraints: convertSlice(n.Constraints), } } func convertCreateEnumStmt(n *pg.CreateEnumStmt) *ast.CreateEnumStmt { if n == nil { return nil } rel, err := parseRelationFromNodes(n.TypeName) if err != nil { panic(err) } return &ast.CreateEnumStmt{ TypeName: rel.TypeName(), Vals: convertSlice(n.Vals), } } func convertCreateEventTrigStmt(n *pg.CreateEventTrigStmt) *ast.CreateEventTrigStmt { if n == nil { return nil } return &ast.CreateEventTrigStmt{ Trigname: makeString(n.Trigname), Eventname: makeString(n.Eventname), Whenclause: convertSlice(n.Whenclause), Funcname: convertSlice(n.Funcname), } } func convertCreateExtensionStmt(n *pg.CreateExtensionStmt) *ast.CreateExtensionStmt { if n == nil { return nil } return &ast.CreateExtensionStmt{ Extname: makeString(n.Extname), IfNotExists: n.IfNotExists, Options: convertSlice(n.Options), } } func convertCreateFdwStmt(n *pg.CreateFdwStmt) *ast.CreateFdwStmt { if n == nil { return nil } return &ast.CreateFdwStmt{ Fdwname: makeString(n.Fdwname), FuncOptions: convertSlice(n.FuncOptions), Options: convertSlice(n.Options), } } func convertCreateForeignServerStmt(n *pg.CreateForeignServerStmt) *ast.CreateForeignServerStmt { if n == nil { return nil } return &ast.CreateForeignServerStmt{ Servername: makeString(n.Servername), Servertype: makeString(n.Servertype), Version: makeString(n.Version), Fdwname: makeString(n.Fdwname), IfNotExists: n.IfNotExists, Options: convertSlice(n.Options), } } func convertCreateForeignTableStmt(n *pg.CreateForeignTableStmt) *ast.CreateForeignTableStmt { if n == nil { return nil } return &ast.CreateForeignTableStmt{ Servername: makeString(n.Servername), Options: convertSlice(n.Options), } } func convertCreateFunctionStmt(n *pg.CreateFunctionStmt) *ast.CreateFunctionStmt { if n == nil { return nil } rel, err := parseRelationFromNodes(n.Funcname) if err != nil { panic(err) } return &ast.CreateFunctionStmt{ Replace: n.Replace, Func: rel.FuncName(), Params: convertSlice(n.Parameters), ReturnType: convertTypeName(n.ReturnType), Options: convertSlice(n.Options), } } func convertCreateOpClassItem(n *pg.CreateOpClassItem) *ast.CreateOpClassItem { if n == nil { return nil } return &ast.CreateOpClassItem{ Itemtype: int(n.Itemtype), Name: convertObjectWithArgs(n.Name), Number: int(n.Number), OrderFamily: convertSlice(n.OrderFamily), ClassArgs: convertSlice(n.ClassArgs), Storedtype: convertTypeName(n.Storedtype), } } func convertCreateOpClassStmt(n *pg.CreateOpClassStmt) *ast.CreateOpClassStmt { if n == nil { return nil } return &ast.CreateOpClassStmt{ Opclassname: convertSlice(n.Opclassname), Opfamilyname: convertSlice(n.Opfamilyname), Amname: makeString(n.Amname), Datatype: convertTypeName(n.Datatype), Items: convertSlice(n.Items), IsDefault: n.IsDefault, } } func convertCreateOpFamilyStmt(n *pg.CreateOpFamilyStmt) *ast.CreateOpFamilyStmt { if n == nil { return nil } return &ast.CreateOpFamilyStmt{ Opfamilyname: convertSlice(n.Opfamilyname), Amname: makeString(n.Amname), } } func convertCreatePLangStmt(n *pg.CreatePLangStmt) *ast.CreatePLangStmt { if n == nil { return nil } return &ast.CreatePLangStmt{ Replace: n.Replace, Plname: makeString(n.Plname), Plhandler: convertSlice(n.Plhandler), Plinline: convertSlice(n.Plinline), Plvalidator: convertSlice(n.Plvalidator), Pltrusted: n.Pltrusted, } } func convertCreatePolicyStmt(n *pg.CreatePolicyStmt) *ast.CreatePolicyStmt { if n == nil { return nil } return &ast.CreatePolicyStmt{ PolicyName: makeString(n.PolicyName), Table: convertRangeVar(n.Table), CmdName: makeString(n.CmdName), Permissive: n.Permissive, Roles: convertSlice(n.Roles), Qual: convertNode(n.Qual), WithCheck: convertNode(n.WithCheck), } } func convertCreatePublicationStmt(n *pg.CreatePublicationStmt) *ast.CreatePublicationStmt { if n == nil { return nil } return &ast.CreatePublicationStmt{ Pubname: makeString(n.Pubname), Options: convertSlice(n.Options), Tables: convertSlice(n.Pubobjects), ForAllTables: n.ForAllTables, } } func convertCreateRangeStmt(n *pg.CreateRangeStmt) *ast.CreateRangeStmt { if n == nil { return nil } return &ast.CreateRangeStmt{ TypeName: convertSlice(n.TypeName), Params: convertSlice(n.Params), } } func convertCreateRoleStmt(n *pg.CreateRoleStmt) *ast.CreateRoleStmt { if n == nil { return nil } return &ast.CreateRoleStmt{ StmtType: ast.RoleStmtType(n.StmtType), Role: makeString(n.Role), Options: convertSlice(n.Options), } } func convertCreateSchemaStmt(n *pg.CreateSchemaStmt) *ast.CreateSchemaStmt { if n == nil { return nil } return &ast.CreateSchemaStmt{ Name: makeString(n.Schemaname), Authrole: convertRoleSpec(n.Authrole), SchemaElts: convertSlice(n.SchemaElts), IfNotExists: n.IfNotExists, } } func convertCreateSeqStmt(n *pg.CreateSeqStmt) *ast.CreateSeqStmt { if n == nil { return nil } return &ast.CreateSeqStmt{ Sequence: convertRangeVar(n.Sequence), Options: convertSlice(n.Options), OwnerId: ast.Oid(n.OwnerId), ForIdentity: n.ForIdentity, IfNotExists: n.IfNotExists, } } func convertCreateStatsStmt(n *pg.CreateStatsStmt) *ast.CreateStatsStmt { if n == nil { return nil } return &ast.CreateStatsStmt{ Defnames: convertSlice(n.Defnames), StatTypes: convertSlice(n.StatTypes), Exprs: convertSlice(n.Exprs), Relations: convertSlice(n.Relations), IfNotExists: n.IfNotExists, } } func convertCreateStmt(n *pg.CreateStmt) *ast.CreateStmt { if n == nil { return nil } return &ast.CreateStmt{ Relation: convertRangeVar(n.Relation), TableElts: convertSlice(n.TableElts), InhRelations: convertSlice(n.InhRelations), Partbound: convertPartitionBoundSpec(n.Partbound), Partspec: convertPartitionSpec(n.Partspec), OfTypename: convertTypeName(n.OfTypename), Constraints: convertSlice(n.Constraints), Options: convertSlice(n.Options), Oncommit: ast.OnCommitAction(n.Oncommit), Tablespacename: makeString(n.Tablespacename), IfNotExists: n.IfNotExists, } } func convertCreateSubscriptionStmt(n *pg.CreateSubscriptionStmt) *ast.CreateSubscriptionStmt { if n == nil { return nil } return &ast.CreateSubscriptionStmt{ Subname: makeString(n.Subname), Conninfo: makeString(n.Conninfo), Publication: convertSlice(n.Publication), Options: convertSlice(n.Options), } } func convertCreateTableAsStmt(n *pg.CreateTableAsStmt) *ast.CreateTableAsStmt { if n == nil { return nil } res := &ast.CreateTableAsStmt{ Query: convertNode(n.Query), Into: convertIntoClause(n.Into), Relkind: ast.ObjectType(n.Objtype), IsSelectInto: n.IsSelectInto, IfNotExists: n.IfNotExists, } return res } func convertCreateTableSpaceStmt(n *pg.CreateTableSpaceStmt) *ast.CreateTableSpaceStmt { if n == nil { return nil } return &ast.CreateTableSpaceStmt{ Tablespacename: makeString(n.Tablespacename), Owner: convertRoleSpec(n.Owner), Location: makeString(n.Location), Options: convertSlice(n.Options), } } func convertCreateTransformStmt(n *pg.CreateTransformStmt) *ast.CreateTransformStmt { if n == nil { return nil } return &ast.CreateTransformStmt{ Replace: n.Replace, TypeName: convertTypeName(n.TypeName), Lang: makeString(n.Lang), Fromsql: convertObjectWithArgs(n.Fromsql), Tosql: convertObjectWithArgs(n.Tosql), } } func convertCreateTrigStmt(n *pg.CreateTrigStmt) *ast.CreateTrigStmt { if n == nil { return nil } return &ast.CreateTrigStmt{ Trigname: makeString(n.Trigname), Relation: convertRangeVar(n.Relation), Funcname: convertSlice(n.Funcname), Args: convertSlice(n.Args), Row: n.Row, Timing: int16(n.Timing), Events: int16(n.Events), Columns: convertSlice(n.Columns), WhenClause: convertNode(n.WhenClause), Isconstraint: n.Isconstraint, TransitionRels: convertSlice(n.TransitionRels), Deferrable: n.Deferrable, Initdeferred: n.Initdeferred, Constrrel: convertRangeVar(n.Constrrel), } } func convertCreateUserMappingStmt(n *pg.CreateUserMappingStmt) *ast.CreateUserMappingStmt { if n == nil { return nil } return &ast.CreateUserMappingStmt{ User: convertRoleSpec(n.User), Servername: makeString(n.Servername), IfNotExists: n.IfNotExists, Options: convertSlice(n.Options), } } func convertCreatedbStmt(n *pg.CreatedbStmt) *ast.CreatedbStmt { if n == nil { return nil } return &ast.CreatedbStmt{ Dbname: makeString(n.Dbname), Options: convertSlice(n.Options), } } func convertCurrentOfExpr(n *pg.CurrentOfExpr) *ast.CurrentOfExpr { if n == nil { return nil } return &ast.CurrentOfExpr{ Xpr: convertNode(n.Xpr), Cvarno: ast.Index(n.Cvarno), CursorName: makeString(n.CursorName), CursorParam: int(n.CursorParam), } } func convertDeallocateStmt(n *pg.DeallocateStmt) *ast.DeallocateStmt { if n == nil { return nil } return &ast.DeallocateStmt{ Name: makeString(n.Name), } } func convertDeclareCursorStmt(n *pg.DeclareCursorStmt) *ast.DeclareCursorStmt { if n == nil { return nil } return &ast.DeclareCursorStmt{ Portalname: makeString(n.Portalname), Options: int(n.Options), Query: convertNode(n.Query), } } func convertDefElem(n *pg.DefElem) *ast.DefElem { if n == nil { return nil } return &ast.DefElem{ Defnamespace: makeString(n.Defnamespace), Defname: makeString(n.Defname), Arg: convertNode(n.Arg), Defaction: ast.DefElemAction(n.Defaction), Location: int(n.Location), } } func convertDefineStmt(n *pg.DefineStmt) *ast.DefineStmt { if n == nil { return nil } return &ast.DefineStmt{ Kind: ast.ObjectType(n.Kind), Oldstyle: n.Oldstyle, Defnames: convertSlice(n.Defnames), Args: convertSlice(n.Args), Definition: convertSlice(n.Definition), IfNotExists: n.IfNotExists, } } func convertDeleteStmt(n *pg.DeleteStmt) *ast.DeleteStmt { if n == nil { return nil } return &ast.DeleteStmt{ Relations: &ast.List{ Items: []ast.Node{convertRangeVar(n.Relation)}, }, UsingClause: convertSlice(n.UsingClause), WhereClause: convertNode(n.WhereClause), ReturningList: convertSlice(n.ReturningList), WithClause: convertWithClause(n.WithClause), } } func convertDiscardStmt(n *pg.DiscardStmt) *ast.DiscardStmt { if n == nil { return nil } return &ast.DiscardStmt{ Target: ast.DiscardMode(n.Target), } } func convertDoStmt(n *pg.DoStmt) *ast.DoStmt { if n == nil { return nil } return &ast.DoStmt{ Args: convertSlice(n.Args), } } func convertDropOwnedStmt(n *pg.DropOwnedStmt) *ast.DropOwnedStmt { if n == nil { return nil } return &ast.DropOwnedStmt{ Roles: convertSlice(n.Roles), Behavior: ast.DropBehavior(n.Behavior), } } func convertDropRoleStmt(n *pg.DropRoleStmt) *ast.DropRoleStmt { if n == nil { return nil } return &ast.DropRoleStmt{ Roles: convertSlice(n.Roles), MissingOk: n.MissingOk, } } func convertDropStmt(n *pg.DropStmt) *ast.DropStmt { if n == nil { return nil } return &ast.DropStmt{ Objects: convertSlice(n.Objects), RemoveType: ast.ObjectType(n.RemoveType), Behavior: ast.DropBehavior(n.Behavior), MissingOk: n.MissingOk, Concurrent: n.Concurrent, } } func convertDropSubscriptionStmt(n *pg.DropSubscriptionStmt) *ast.DropSubscriptionStmt { if n == nil { return nil } return &ast.DropSubscriptionStmt{ Subname: makeString(n.Subname), MissingOk: n.MissingOk, Behavior: ast.DropBehavior(n.Behavior), } } func convertDropTableSpaceStmt(n *pg.DropTableSpaceStmt) *ast.DropTableSpaceStmt { if n == nil { return nil } return &ast.DropTableSpaceStmt{ Tablespacename: makeString(n.Tablespacename), MissingOk: n.MissingOk, } } func convertDropUserMappingStmt(n *pg.DropUserMappingStmt) *ast.DropUserMappingStmt { if n == nil { return nil } return &ast.DropUserMappingStmt{ User: convertRoleSpec(n.User), Servername: makeString(n.Servername), MissingOk: n.MissingOk, } } func convertDropdbStmt(n *pg.DropdbStmt) *ast.DropdbStmt { if n == nil { return nil } return &ast.DropdbStmt{ Dbname: makeString(n.Dbname), MissingOk: n.MissingOk, } } func convertExecuteStmt(n *pg.ExecuteStmt) *ast.ExecuteStmt { if n == nil { return nil } return &ast.ExecuteStmt{ Name: makeString(n.Name), Params: convertSlice(n.Params), } } func convertExplainStmt(n *pg.ExplainStmt) *ast.ExplainStmt { if n == nil { return nil } return &ast.ExplainStmt{ Query: convertNode(n.Query), Options: convertSlice(n.Options), } } func convertFetchStmt(n *pg.FetchStmt) *ast.FetchStmt { if n == nil { return nil } return &ast.FetchStmt{ Direction: ast.FetchDirection(n.Direction), HowMany: n.HowMany, Portalname: makeString(n.Portalname), Ismove: n.Ismove, } } func convertFieldSelect(n *pg.FieldSelect) *ast.FieldSelect { if n == nil { return nil } return &ast.FieldSelect{ Xpr: convertNode(n.Xpr), Arg: convertNode(n.Arg), Fieldnum: ast.AttrNumber(n.Fieldnum), Resulttype: ast.Oid(n.Resulttype), Resulttypmod: n.Resulttypmod, Resultcollid: ast.Oid(n.Resultcollid), } } func convertFieldStore(n *pg.FieldStore) *ast.FieldStore { if n == nil { return nil } return &ast.FieldStore{ Xpr: convertNode(n.Xpr), Arg: convertNode(n.Arg), Newvals: convertSlice(n.Newvals), Fieldnums: convertSlice(n.Fieldnums), Resulttype: ast.Oid(n.Resulttype), } } func convertFloat(n *pg.Float) *ast.Float { if n == nil { return nil } return &ast.Float{ Str: n.Fval, } } func convertFromExpr(n *pg.FromExpr) *ast.FromExpr { if n == nil { return nil } return &ast.FromExpr{ Fromlist: convertSlice(n.Fromlist), Quals: convertNode(n.Quals), } } func convertFuncCall(n *pg.FuncCall) *ast.FuncCall { if n == nil { return nil } rel, err := parseRelationFromNodes(n.Funcname) if err != nil { // TODO: How should we handle errors? panic(err) } return &ast.FuncCall{ Func: rel.FuncName(), Funcname: convertSlice(n.Funcname), Args: convertSlice(n.Args), AggOrder: convertSlice(n.AggOrder), AggFilter: convertNode(n.AggFilter), AggWithinGroup: n.AggWithinGroup, AggStar: n.AggStar, AggDistinct: n.AggDistinct, FuncVariadic: n.FuncVariadic, Over: convertWindowDef(n.Over), Location: int(n.Location), } } func convertFuncExpr(n *pg.FuncExpr) *ast.FuncExpr { if n == nil { return nil } return &ast.FuncExpr{ Xpr: convertNode(n.Xpr), Funcid: ast.Oid(n.Funcid), Funcresulttype: ast.Oid(n.Funcresulttype), Funcretset: n.Funcretset, Funcvariadic: n.Funcvariadic, Funcformat: ast.CoercionForm(n.Funcformat), Funccollid: ast.Oid(n.Funccollid), Inputcollid: ast.Oid(n.Inputcollid), Args: convertSlice(n.Args), Location: int(n.Location), } } func convertFunctionParameter(n *pg.FunctionParameter) *ast.FunctionParameter { if n == nil { return nil } return &ast.FunctionParameter{ Name: makeString(n.Name), ArgType: convertTypeName(n.ArgType), Mode: ast.FunctionParameterMode(n.Mode), Defexpr: convertNode(n.Defexpr), } } func convertGrantRoleStmt(n *pg.GrantRoleStmt) *ast.GrantRoleStmt { if n == nil { return nil } return &ast.GrantRoleStmt{ GrantedRoles: convertSlice(n.GrantedRoles), GranteeRoles: convertSlice(n.GranteeRoles), IsGrant: n.IsGrant, Grantor: convertRoleSpec(n.Grantor), Behavior: ast.DropBehavior(n.Behavior), } } func convertGrantStmt(n *pg.GrantStmt) *ast.GrantStmt { if n == nil { return nil } return &ast.GrantStmt{ IsGrant: n.IsGrant, Targtype: ast.GrantTargetType(n.Targtype), Objtype: ast.GrantObjectType(n.Objtype), Objects: convertSlice(n.Objects), Privileges: convertSlice(n.Privileges), Grantees: convertSlice(n.Grantees), GrantOption: n.GrantOption, Behavior: ast.DropBehavior(n.Behavior), } } func convertGroupingFunc(n *pg.GroupingFunc) *ast.GroupingFunc { if n == nil { return nil } return &ast.GroupingFunc{ Xpr: convertNode(n.Xpr), Args: convertSlice(n.Args), Refs: convertSlice(n.Refs), Agglevelsup: ast.Index(n.Agglevelsup), Location: int(n.Location), } } func convertGroupingSet(n *pg.GroupingSet) *ast.GroupingSet { if n == nil { return nil } return &ast.GroupingSet{ Kind: ast.GroupingSetKind(n.Kind), Content: convertSlice(n.Content), Location: int(n.Location), } } func convertImportForeignSchemaStmt(n *pg.ImportForeignSchemaStmt) *ast.ImportForeignSchemaStmt { if n == nil { return nil } return &ast.ImportForeignSchemaStmt{ ServerName: makeString(n.ServerName), RemoteSchema: makeString(n.RemoteSchema), LocalSchema: makeString(n.LocalSchema), ListType: ast.ImportForeignSchemaType(n.ListType), TableList: convertSlice(n.TableList), Options: convertSlice(n.Options), } } func convertIndexElem(n *pg.IndexElem) *ast.IndexElem { if n == nil { return nil } return &ast.IndexElem{ Name: makeString(n.Name), Expr: convertNode(n.Expr), Indexcolname: makeString(n.Indexcolname), Collation: convertSlice(n.Collation), Opclass: convertSlice(n.Opclass), Ordering: ast.SortByDir(n.Ordering), NullsOrdering: ast.SortByNulls(n.NullsOrdering), } } func convertIndexStmt(n *pg.IndexStmt) *ast.IndexStmt { if n == nil { return nil } return &ast.IndexStmt{ Idxname: makeString(n.Idxname), Relation: convertRangeVar(n.Relation), AccessMethod: makeString(n.AccessMethod), TableSpace: makeString(n.TableSpace), IndexParams: convertSlice(n.IndexParams), Options: convertSlice(n.Options), WhereClause: convertNode(n.WhereClause), ExcludeOpNames: convertSlice(n.ExcludeOpNames), Idxcomment: makeString(n.Idxcomment), IndexOid: ast.Oid(n.IndexOid), Unique: n.Unique, Primary: n.Primary, Isconstraint: n.Isconstraint, Deferrable: n.Deferrable, Initdeferred: n.Initdeferred, Transformed: n.Transformed, Concurrent: n.Concurrent, IfNotExists: n.IfNotExists, } } func convertInferClause(n *pg.InferClause) *ast.InferClause { if n == nil { return nil } return &ast.InferClause{ IndexElems: convertSlice(n.IndexElems), WhereClause: convertNode(n.WhereClause), Conname: makeString(n.Conname), Location: int(n.Location), } } func convertInferenceElem(n *pg.InferenceElem) *ast.InferenceElem { if n == nil { return nil } return &ast.InferenceElem{ Xpr: convertNode(n.Xpr), Expr: convertNode(n.Expr), Infercollid: ast.Oid(n.Infercollid), Inferopclass: ast.Oid(n.Inferopclass), } } func convertInlineCodeBlock(n *pg.InlineCodeBlock) *ast.InlineCodeBlock { if n == nil { return nil } return &ast.InlineCodeBlock{ SourceText: makeString(n.SourceText), LangOid: ast.Oid(n.LangOid), LangIsTrusted: n.LangIsTrusted, } } func convertInsertStmt(n *pg.InsertStmt) *ast.InsertStmt { if n == nil { return nil } return &ast.InsertStmt{ Relation: convertRangeVar(n.Relation), Cols: convertSlice(n.Cols), SelectStmt: convertNode(n.SelectStmt), OnConflictClause: convertOnConflictClause(n.OnConflictClause), ReturningList: convertSlice(n.ReturningList), WithClause: convertWithClause(n.WithClause), Override: ast.OverridingKind(n.Override), } } func convertInteger(n *pg.Integer) *ast.Integer { if n == nil { return nil } return &ast.Integer{ Ival: int64(n.Ival), } } func convertIntoClause(n *pg.IntoClause) *ast.IntoClause { if n == nil { return nil } return &ast.IntoClause{ Rel: convertRangeVar(n.Rel), ColNames: convertSlice(n.ColNames), Options: convertSlice(n.Options), OnCommit: ast.OnCommitAction(n.OnCommit), TableSpaceName: makeString(n.TableSpaceName), ViewQuery: convertNode(n.ViewQuery), SkipData: n.SkipData, } } func convertJoinExpr(n *pg.JoinExpr) *ast.JoinExpr { if n == nil { return nil } return &ast.JoinExpr{ Jointype: ast.JoinType(n.Jointype), IsNatural: n.IsNatural, Larg: convertNode(n.Larg), Rarg: convertNode(n.Rarg), UsingClause: convertSlice(n.UsingClause), Quals: convertNode(n.Quals), Alias: convertAlias(n.Alias), Rtindex: int(n.Rtindex), } } func convertListenStmt(n *pg.ListenStmt) *ast.ListenStmt { if n == nil { return nil } return &ast.ListenStmt{ Conditionname: makeString(n.Conditionname), } } func convertLoadStmt(n *pg.LoadStmt) *ast.LoadStmt { if n == nil { return nil } return &ast.LoadStmt{ Filename: makeString(n.Filename), } } func convertLockStmt(n *pg.LockStmt) *ast.LockStmt { if n == nil { return nil } return &ast.LockStmt{ Relations: convertSlice(n.Relations), Mode: int(n.Mode), Nowait: n.Nowait, } } func convertLockingClause(n *pg.LockingClause) *ast.LockingClause { if n == nil { return nil } return &ast.LockingClause{ LockedRels: convertSlice(n.LockedRels), Strength: ast.LockClauseStrength(n.Strength), WaitPolicy: ast.LockWaitPolicy(n.WaitPolicy), } } func convertMinMaxExpr(n *pg.MinMaxExpr) *ast.MinMaxExpr { if n == nil { return nil } return &ast.MinMaxExpr{ Xpr: convertNode(n.Xpr), Minmaxtype: ast.Oid(n.Minmaxtype), Minmaxcollid: ast.Oid(n.Minmaxcollid), Inputcollid: ast.Oid(n.Inputcollid), Op: ast.MinMaxOp(n.Op), Args: convertSlice(n.Args), Location: int(n.Location), } } func convertMultiAssignRef(n *pg.MultiAssignRef) *ast.MultiAssignRef { if n == nil { return nil } return &ast.MultiAssignRef{ Source: convertNode(n.Source), Colno: int(n.Colno), Ncolumns: int(n.Ncolumns), } } func convertNamedArgExpr(n *pg.NamedArgExpr) *ast.NamedArgExpr { if n == nil { return nil } return &ast.NamedArgExpr{ Xpr: convertNode(n.Xpr), Arg: convertNode(n.Arg), Name: makeString(n.Name), Argnumber: int(n.Argnumber), Location: int(n.Location), } } func convertNextValueExpr(n *pg.NextValueExpr) *ast.NextValueExpr { if n == nil { return nil } return &ast.NextValueExpr{ Xpr: convertNode(n.Xpr), Seqid: ast.Oid(n.Seqid), TypeId: ast.Oid(n.TypeId), } } func convertNotifyStmt(n *pg.NotifyStmt) *ast.NotifyStmt { if n == nil { return nil } return &ast.NotifyStmt{ Conditionname: makeString(n.Conditionname), Payload: makeString(n.Payload), } } func convertNullTest(n *pg.NullTest) *ast.NullTest { if n == nil { return nil } return &ast.NullTest{ Xpr: convertNode(n.Xpr), Arg: convertNode(n.Arg), Nulltesttype: ast.NullTestType(n.Nulltesttype), Argisrow: n.Argisrow, Location: int(n.Location), } } func convertNullIfExpr(n *pg.NullIfExpr) *ast.NullIfExpr { if n == nil { return nil } return &ast.NullIfExpr{ Xpr: convertNode(n.Xpr), Opno: ast.Oid(n.Opno), Opresulttype: ast.Oid(n.Opresulttype), Opretset: n.Opretset, Opcollid: ast.Oid(n.Opcollid), Inputcollid: ast.Oid(n.Inputcollid), Args: convertSlice(n.Args), Location: int(n.Location), } } func convertObjectWithArgs(n *pg.ObjectWithArgs) *ast.ObjectWithArgs { if n == nil { return nil } return &ast.ObjectWithArgs{ Objname: convertSlice(n.Objname), Objargs: convertSlice(n.Objargs), ArgsUnspecified: n.ArgsUnspecified, } } func convertOnConflictClause(n *pg.OnConflictClause) *ast.OnConflictClause { if n == nil { return nil } return &ast.OnConflictClause{ Action: ast.OnConflictAction(n.Action), Infer: convertInferClause(n.Infer), TargetList: convertSlice(n.TargetList), WhereClause: convertNode(n.WhereClause), Location: int(n.Location), } } func convertOnConflictExpr(n *pg.OnConflictExpr) *ast.OnConflictExpr { if n == nil { return nil } return &ast.OnConflictExpr{ Action: ast.OnConflictAction(n.Action), ArbiterElems: convertSlice(n.ArbiterElems), ArbiterWhere: convertNode(n.ArbiterWhere), Constraint: ast.Oid(n.Constraint), OnConflictSet: convertSlice(n.OnConflictSet), OnConflictWhere: convertNode(n.OnConflictWhere), ExclRelIndex: int(n.ExclRelIndex), ExclRelTlist: convertSlice(n.ExclRelTlist), } } func convertOpExpr(n *pg.OpExpr) *ast.OpExpr { if n == nil { return nil } return &ast.OpExpr{ Xpr: convertNode(n.Xpr), Opno: ast.Oid(n.Opno), Opresulttype: ast.Oid(n.Opresulttype), Opretset: n.Opretset, Opcollid: ast.Oid(n.Opcollid), Inputcollid: ast.Oid(n.Inputcollid), Args: convertSlice(n.Args), Location: int(n.Location), } } func convertParam(n *pg.Param) *ast.Param { if n == nil { return nil } return &ast.Param{ Xpr: convertNode(n.Xpr), Paramkind: ast.ParamKind(n.Paramkind), Paramid: int(n.Paramid), Paramtype: ast.Oid(n.Paramtype), Paramtypmod: n.Paramtypmod, Paramcollid: ast.Oid(n.Paramcollid), Location: int(n.Location), } } func convertParamRef(n *pg.ParamRef) *ast.ParamRef { if n == nil { return nil } var dollar bool if n.Number != 0 { dollar = true } return &ast.ParamRef{ Dollar: dollar, Number: int(n.Number), Location: int(n.Location), } } func convertPartitionBoundSpec(n *pg.PartitionBoundSpec) *ast.PartitionBoundSpec { if n == nil { return nil } return &ast.PartitionBoundSpec{ Strategy: makeByte(n.Strategy), Listdatums: convertSlice(n.Listdatums), Lowerdatums: convertSlice(n.Lowerdatums), Upperdatums: convertSlice(n.Upperdatums), Location: int(n.Location), } } func convertPartitionCmd(n *pg.PartitionCmd) *ast.PartitionCmd { if n == nil { return nil } return &ast.PartitionCmd{ Name: convertRangeVar(n.Name), Bound: convertPartitionBoundSpec(n.Bound), } } func convertPartitionElem(n *pg.PartitionElem) *ast.PartitionElem { if n == nil { return nil } return &ast.PartitionElem{ Name: makeString(n.Name), Expr: convertNode(n.Expr), Collation: convertSlice(n.Collation), Opclass: convertSlice(n.Opclass), Location: int(n.Location), } } func convertPartitionRangeDatum(n *pg.PartitionRangeDatum) *ast.PartitionRangeDatum { if n == nil { return nil } return &ast.PartitionRangeDatum{ Kind: ast.PartitionRangeDatumKind(n.Kind), Value: convertNode(n.Value), Location: int(n.Location), } } func convertPartitionSpec(n *pg.PartitionSpec) *ast.PartitionSpec { if n == nil { return nil } return &ast.PartitionSpec{ Strategy: makeString(n.Strategy.String()), PartParams: convertSlice(n.PartParams), Location: int(n.Location), } } func convertPrepareStmt(n *pg.PrepareStmt) *ast.PrepareStmt { if n == nil { return nil } return &ast.PrepareStmt{ Name: makeString(n.Name), Argtypes: convertSlice(n.Argtypes), Query: convertNode(n.Query), } } func convertQuery(n *pg.Query) *ast.Query { if n == nil { return nil } return &ast.Query{ CommandType: ast.CmdType(n.CommandType), QuerySource: ast.QuerySource(n.QuerySource), CanSetTag: n.CanSetTag, UtilityStmt: convertNode(n.UtilityStmt), ResultRelation: int(n.ResultRelation), HasAggs: n.HasAggs, HasWindowFuncs: n.HasWindowFuncs, HasTargetSrfs: n.HasTargetSrfs, HasSubLinks: n.HasSubLinks, HasDistinctOn: n.HasDistinctOn, HasRecursive: n.HasRecursive, HasModifyingCte: n.HasModifyingCte, HasForUpdate: n.HasForUpdate, HasRowSecurity: n.HasRowSecurity, CteList: convertSlice(n.CteList), Rtable: convertSlice(n.Rtable), Jointree: convertFromExpr(n.Jointree), TargetList: convertSlice(n.TargetList), Override: ast.OverridingKind(n.Override), OnConflict: convertOnConflictExpr(n.OnConflict), ReturningList: convertSlice(n.ReturningList), GroupClause: convertSlice(n.GroupClause), GroupingSets: convertSlice(n.GroupingSets), HavingQual: convertNode(n.HavingQual), WindowClause: convertSlice(n.WindowClause), DistinctClause: convertSlice(n.DistinctClause), SortClause: convertSlice(n.SortClause), LimitOffset: convertNode(n.LimitOffset), LimitCount: convertNode(n.LimitCount), RowMarks: convertSlice(n.RowMarks), SetOperations: convertNode(n.SetOperations), ConstraintDeps: convertSlice(n.ConstraintDeps), WithCheckOptions: convertSlice(n.WithCheckOptions), StmtLocation: int(n.StmtLocation), StmtLen: int(n.StmtLen), } } func convertRangeFunction(n *pg.RangeFunction) *ast.RangeFunction { if n == nil { return nil } return &ast.RangeFunction{ Lateral: n.Lateral, Ordinality: n.Ordinality, IsRowsfrom: n.IsRowsfrom, Functions: convertSlice(n.Functions), Alias: convertAlias(n.Alias), Coldeflist: convertSlice(n.Coldeflist), } } func convertRangeSubselect(n *pg.RangeSubselect) *ast.RangeSubselect { if n == nil { return nil } return &ast.RangeSubselect{ Lateral: n.Lateral, Subquery: convertNode(n.Subquery), Alias: convertAlias(n.Alias), } } func convertRangeTableFunc(n *pg.RangeTableFunc) *ast.RangeTableFunc { if n == nil { return nil } return &ast.RangeTableFunc{ Lateral: n.Lateral, Docexpr: convertNode(n.Docexpr), Rowexpr: convertNode(n.Rowexpr), Namespaces: convertSlice(n.Namespaces), Columns: convertSlice(n.Columns), Alias: convertAlias(n.Alias), Location: int(n.Location), } } func convertRangeTableFuncCol(n *pg.RangeTableFuncCol) *ast.RangeTableFuncCol { if n == nil { return nil } return &ast.RangeTableFuncCol{ Colname: makeString(n.Colname), TypeName: convertTypeName(n.TypeName), ForOrdinality: n.ForOrdinality, IsNotNull: n.IsNotNull, Colexpr: convertNode(n.Colexpr), Coldefexpr: convertNode(n.Coldefexpr), Location: int(n.Location), } } func convertRangeTableSample(n *pg.RangeTableSample) *ast.RangeTableSample { if n == nil { return nil } return &ast.RangeTableSample{ Relation: convertNode(n.Relation), Method: convertSlice(n.Method), Args: convertSlice(n.Args), Repeatable: convertNode(n.Repeatable), Location: int(n.Location), } } func convertRangeTblEntry(n *pg.RangeTblEntry) *ast.RangeTblEntry { if n == nil { return nil } return &ast.RangeTblEntry{ Rtekind: ast.RTEKind(n.Rtekind), Relid: ast.Oid(n.Relid), Relkind: makeByte(n.Relkind), Tablesample: convertTableSampleClause(n.Tablesample), Subquery: convertQuery(n.Subquery), SecurityBarrier: n.SecurityBarrier, Jointype: ast.JoinType(n.Jointype), Joinaliasvars: convertSlice(n.Joinaliasvars), Functions: convertSlice(n.Functions), Funcordinality: n.Funcordinality, Tablefunc: convertTableFunc(n.Tablefunc), ValuesLists: convertSlice(n.ValuesLists), Ctename: makeString(n.Ctename), Ctelevelsup: ast.Index(n.Ctelevelsup), SelfReference: n.SelfReference, Coltypes: convertSlice(n.Coltypes), Coltypmods: convertSlice(n.Coltypmods), Colcollations: convertSlice(n.Colcollations), Enrname: makeString(n.Enrname), Enrtuples: n.Enrtuples, Alias: convertAlias(n.Alias), Eref: convertAlias(n.Eref), Lateral: n.Lateral, Inh: n.Inh, InFromCl: n.InFromCl, SecurityQuals: convertSlice(n.SecurityQuals), } } func convertRangeTblFunction(n *pg.RangeTblFunction) *ast.RangeTblFunction { if n == nil { return nil } return &ast.RangeTblFunction{ Funcexpr: convertNode(n.Funcexpr), Funccolcount: int(n.Funccolcount), Funccolnames: convertSlice(n.Funccolnames), Funccoltypes: convertSlice(n.Funccoltypes), Funccoltypmods: convertSlice(n.Funccoltypmods), Funccolcollations: convertSlice(n.Funccolcollations), Funcparams: makeUint32Slice(n.Funcparams), } } func convertRangeTblRef(n *pg.RangeTblRef) *ast.RangeTblRef { if n == nil { return nil } return &ast.RangeTblRef{ Rtindex: int(n.Rtindex), } } func convertRangeVar(n *pg.RangeVar) *ast.RangeVar { if n == nil { return nil } return &ast.RangeVar{ Catalogname: makeString(n.Catalogname), Schemaname: makeString(n.Schemaname), Relname: makeString(n.Relname), Inh: n.Inh, Relpersistence: makeByte(n.Relpersistence), Alias: convertAlias(n.Alias), Location: int(n.Location), } } func convertRawStmt(n *pg.RawStmt) *ast.RawStmt { if n == nil { return nil } return &ast.RawStmt{ Stmt: convertNode(n.Stmt), StmtLocation: int(n.StmtLocation), StmtLen: int(n.StmtLen), } } func convertReassignOwnedStmt(n *pg.ReassignOwnedStmt) *ast.ReassignOwnedStmt { if n == nil { return nil } return &ast.ReassignOwnedStmt{ Roles: convertSlice(n.Roles), Newrole: convertRoleSpec(n.Newrole), } } func convertRefreshMatViewStmt(n *pg.RefreshMatViewStmt) *ast.RefreshMatViewStmt { if n == nil { return nil } return &ast.RefreshMatViewStmt{ Concurrent: n.Concurrent, SkipData: n.SkipData, Relation: convertRangeVar(n.Relation), } } func convertReindexStmt(n *pg.ReindexStmt) *ast.ReindexStmt { if n == nil { return nil } return &ast.ReindexStmt{ Kind: ast.ReindexObjectType(n.Kind), Relation: convertRangeVar(n.Relation), Name: makeString(n.Name), // Options: int(n.Options), TODO: Support params } } func convertRelabelType(n *pg.RelabelType) *ast.RelabelType { if n == nil { return nil } return &ast.RelabelType{ Xpr: convertNode(n.Xpr), Arg: convertNode(n.Arg), Resulttype: ast.Oid(n.Resulttype), Resulttypmod: n.Resulttypmod, Resultcollid: ast.Oid(n.Resultcollid), Relabelformat: ast.CoercionForm(n.Relabelformat), Location: int(n.Location), } } func convertRenameStmt(n *pg.RenameStmt) *ast.RenameStmt { if n == nil { return nil } return &ast.RenameStmt{ RenameType: ast.ObjectType(n.RenameType), RelationType: ast.ObjectType(n.RelationType), Relation: convertRangeVar(n.Relation), Object: convertNode(n.Object), Subname: makeString(n.Subname), Newname: makeString(n.Newname), Behavior: ast.DropBehavior(n.Behavior), MissingOk: n.MissingOk, } } func convertReplicaIdentityStmt(n *pg.ReplicaIdentityStmt) *ast.ReplicaIdentityStmt { if n == nil { return nil } return &ast.ReplicaIdentityStmt{ IdentityType: makeByte(n.IdentityType), Name: makeString(n.Name), } } func convertResTarget(n *pg.ResTarget) *ast.ResTarget { if n == nil { return nil } return &ast.ResTarget{ Name: makeString(n.Name), Indirection: convertSlice(n.Indirection), Val: convertNode(n.Val), Location: int(n.Location), } } func convertRoleSpec(n *pg.RoleSpec) *ast.RoleSpec { if n == nil { return nil } return &ast.RoleSpec{ Roletype: ast.RoleSpecType(n.Roletype), Rolename: makeString(n.Rolename), Location: int(n.Location), } } func convertRowCompareExpr(n *pg.RowCompareExpr) *ast.RowCompareExpr { if n == nil { return nil } return &ast.RowCompareExpr{ Xpr: convertNode(n.Xpr), Rctype: ast.RowCompareType(n.Rctype), Opnos: convertSlice(n.Opnos), Opfamilies: convertSlice(n.Opfamilies), Inputcollids: convertSlice(n.Inputcollids), Largs: convertSlice(n.Largs), Rargs: convertSlice(n.Rargs), } } func convertRowExpr(n *pg.RowExpr) *ast.RowExpr { if n == nil { return nil } return &ast.RowExpr{ Xpr: convertNode(n.Xpr), Args: convertSlice(n.Args), RowTypeid: ast.Oid(n.RowTypeid), RowFormat: ast.CoercionForm(n.RowFormat), Colnames: convertSlice(n.Colnames), Location: int(n.Location), } } func convertRowMarkClause(n *pg.RowMarkClause) *ast.RowMarkClause { if n == nil { return nil } return &ast.RowMarkClause{ Rti: ast.Index(n.Rti), Strength: ast.LockClauseStrength(n.Strength), WaitPolicy: ast.LockWaitPolicy(n.WaitPolicy), PushedDown: n.PushedDown, } } func convertRuleStmt(n *pg.RuleStmt) *ast.RuleStmt { if n == nil { return nil } return &ast.RuleStmt{ Relation: convertRangeVar(n.Relation), Rulename: makeString(n.Rulename), WhereClause: convertNode(n.WhereClause), Event: ast.CmdType(n.Event), Instead: n.Instead, Actions: convertSlice(n.Actions), Replace: n.Replace, } } func convertSQLValueFunction(n *pg.SQLValueFunction) *ast.SQLValueFunction { if n == nil { return nil } return &ast.SQLValueFunction{ Xpr: convertNode(n.Xpr), Op: ast.SQLValueFunctionOp(n.Op), Type: ast.Oid(n.Type), Typmod: n.Typmod, Location: int(n.Location), } } func convertScalarArrayOpExpr(n *pg.ScalarArrayOpExpr) *ast.ScalarArrayOpExpr { if n == nil { return nil } return &ast.ScalarArrayOpExpr{ Xpr: convertNode(n.Xpr), Opno: ast.Oid(n.Opno), UseOr: n.UseOr, Inputcollid: ast.Oid(n.Inputcollid), Args: convertSlice(n.Args), Location: int(n.Location), } } func convertSecLabelStmt(n *pg.SecLabelStmt) *ast.SecLabelStmt { if n == nil { return nil } return &ast.SecLabelStmt{ Objtype: ast.ObjectType(n.Objtype), Object: convertNode(n.Object), Provider: makeString(n.Provider), Label: makeString(n.Label), } } func convertSelectStmt(n *pg.SelectStmt) *ast.SelectStmt { if n == nil { return nil } op, err := convertSetOperation(n.Op) if err != nil { panic(err) } return &ast.SelectStmt{ DistinctClause: convertSlice(n.DistinctClause), IntoClause: convertIntoClause(n.IntoClause), TargetList: convertSlice(n.TargetList), FromClause: convertSlice(n.FromClause), WhereClause: convertNode(n.WhereClause), GroupClause: convertSlice(n.GroupClause), HavingClause: convertNode(n.HavingClause), WindowClause: convertSlice(n.WindowClause), ValuesLists: convertSlice(n.ValuesLists), SortClause: convertSlice(n.SortClause), LimitOffset: convertNode(n.LimitOffset), LimitCount: convertNode(n.LimitCount), LockingClause: convertSlice(n.LockingClause), WithClause: convertWithClause(n.WithClause), Op: op, All: n.All, Larg: convertSelectStmt(n.Larg), Rarg: convertSelectStmt(n.Rarg), } } func convertSetOperationStmt(n *pg.SetOperationStmt) *ast.SetOperationStmt { if n == nil { return nil } op, err := convertSetOperation(n.Op) if err != nil { panic(err) } return &ast.SetOperationStmt{ Op: op, All: n.All, Larg: convertNode(n.Larg), Rarg: convertNode(n.Rarg), ColTypes: convertSlice(n.ColTypes), ColTypmods: convertSlice(n.ColTypmods), ColCollations: convertSlice(n.ColCollations), GroupClauses: convertSlice(n.GroupClauses), } } func convertSetToDefault(n *pg.SetToDefault) *ast.SetToDefault { if n == nil { return nil } return &ast.SetToDefault{ Xpr: convertNode(n.Xpr), TypeId: ast.Oid(n.TypeId), TypeMod: n.TypeMod, Collation: ast.Oid(n.Collation), Location: int(n.Location), } } func convertSortBy(n *pg.SortBy) *ast.SortBy { if n == nil { return nil } return &ast.SortBy{ Node: convertNode(n.Node), SortbyDir: ast.SortByDir(n.SortbyDir), SortbyNulls: ast.SortByNulls(n.SortbyNulls), UseOp: convertSlice(n.UseOp), Location: int(n.Location), } } func convertSortGroupClause(n *pg.SortGroupClause) *ast.SortGroupClause { if n == nil { return nil } return &ast.SortGroupClause{ TleSortGroupRef: ast.Index(n.TleSortGroupRef), Eqop: ast.Oid(n.Eqop), Sortop: ast.Oid(n.Sortop), NullsFirst: n.NullsFirst, Hashable: n.Hashable, } } func convertString(n *pg.String) *ast.String { if n == nil { return nil } return &ast.String{ Str: n.Sval, } } func convertSubLink(n *pg.SubLink) *ast.SubLink { if n == nil { return nil } slt, err := convertSubLinkType(n.SubLinkType) if err != nil { panic(err) } return &ast.SubLink{ Xpr: convertNode(n.Xpr), SubLinkType: slt, SubLinkId: int(n.SubLinkId), Testexpr: convertNode(n.Testexpr), OperName: convertSlice(n.OperName), Subselect: convertNode(n.Subselect), Location: int(n.Location), } } func convertSubPlan(n *pg.SubPlan) *ast.SubPlan { if n == nil { return nil } slt, err := convertSubLinkType(n.SubLinkType) if err != nil { panic(err) } return &ast.SubPlan{ Xpr: convertNode(n.Xpr), SubLinkType: slt, Testexpr: convertNode(n.Testexpr), ParamIds: convertSlice(n.ParamIds), PlanId: int(n.PlanId), PlanName: makeString(n.PlanName), FirstColType: ast.Oid(n.FirstColType), FirstColTypmod: n.FirstColTypmod, FirstColCollation: ast.Oid(n.FirstColCollation), UseHashTable: n.UseHashTable, UnknownEqFalse: n.UnknownEqFalse, ParallelSafe: n.ParallelSafe, SetParam: convertSlice(n.SetParam), ParParam: convertSlice(n.ParParam), Args: convertSlice(n.Args), StartupCost: ast.Cost(n.StartupCost), PerCallCost: ast.Cost(n.PerCallCost), } } func convertTableFunc(n *pg.TableFunc) *ast.TableFunc { if n == nil { return nil } return &ast.TableFunc{ NsUris: convertSlice(n.NsUris), NsNames: convertSlice(n.NsNames), Docexpr: convertNode(n.Docexpr), Rowexpr: convertNode(n.Rowexpr), Colnames: convertSlice(n.Colnames), Coltypes: convertSlice(n.Coltypes), Coltypmods: convertSlice(n.Coltypmods), Colcollations: convertSlice(n.Colcollations), Colexprs: convertSlice(n.Colexprs), Coldefexprs: convertSlice(n.Coldefexprs), Notnulls: makeUint32Slice(n.Notnulls), Ordinalitycol: int(n.Ordinalitycol), Location: int(n.Location), } } func convertTableLikeClause(n *pg.TableLikeClause) *ast.TableLikeClause { if n == nil { return nil } return &ast.TableLikeClause{ Relation: convertRangeVar(n.Relation), Options: n.Options, } } func convertTableSampleClause(n *pg.TableSampleClause) *ast.TableSampleClause { if n == nil { return nil } return &ast.TableSampleClause{ Tsmhandler: ast.Oid(n.Tsmhandler), Args: convertSlice(n.Args), Repeatable: convertNode(n.Repeatable), } } func convertTargetEntry(n *pg.TargetEntry) *ast.TargetEntry { if n == nil { return nil } return &ast.TargetEntry{ Xpr: convertNode(n.Xpr), Expr: convertNode(n.Expr), Resno: ast.AttrNumber(n.Resno), Resname: makeString(n.Resname), Ressortgroupref: ast.Index(n.Ressortgroupref), Resorigtbl: ast.Oid(n.Resorigtbl), Resorigcol: ast.AttrNumber(n.Resorigcol), Resjunk: n.Resjunk, } } func convertTransactionStmt(n *pg.TransactionStmt) *ast.TransactionStmt { if n == nil { return nil } return &ast.TransactionStmt{ Kind: ast.TransactionStmtKind(n.Kind), Options: convertSlice(n.Options), Gid: makeString(n.Gid), } } func convertTriggerTransition(n *pg.TriggerTransition) *ast.TriggerTransition { if n == nil { return nil } return &ast.TriggerTransition{ Name: makeString(n.Name), IsNew: n.IsNew, IsTable: n.IsTable, } } func convertTruncateStmt(n *pg.TruncateStmt) *ast.TruncateStmt { if n == nil { return nil } return &ast.TruncateStmt{ Relations: convertSlice(n.Relations), RestartSeqs: n.RestartSeqs, Behavior: ast.DropBehavior(n.Behavior), } } func convertTypeCast(n *pg.TypeCast) *ast.TypeCast { if n == nil { return nil } return &ast.TypeCast{ Arg: convertNode(n.Arg), TypeName: convertTypeName(n.TypeName), Location: int(n.Location), } } func convertTypeName(n *pg.TypeName) *ast.TypeName { if n == nil { return nil } return &ast.TypeName{ Names: convertSlice(n.Names), TypeOid: ast.Oid(n.TypeOid), Setof: n.Setof, PctType: n.PctType, Typmods: convertSlice(n.Typmods), Typemod: n.Typemod, ArrayBounds: convertSlice(n.ArrayBounds), Location: int(n.Location), } } func convertUnlistenStmt(n *pg.UnlistenStmt) *ast.UnlistenStmt { if n == nil { return nil } return &ast.UnlistenStmt{ Conditionname: makeString(n.Conditionname), } } func convertUpdateStmt(n *pg.UpdateStmt) *ast.UpdateStmt { if n == nil { return nil } return &ast.UpdateStmt{ Relations: &ast.List{ Items: []ast.Node{convertRangeVar(n.Relation)}, }, TargetList: convertSlice(n.TargetList), WhereClause: convertNode(n.WhereClause), FromClause: convertSlice(n.FromClause), ReturningList: convertSlice(n.ReturningList), WithClause: convertWithClause(n.WithClause), } } func convertVacuumStmt(n *pg.VacuumStmt) *ast.VacuumStmt { if n == nil { return nil } return &ast.VacuumStmt{ // FIXME: The VacuumStmt node has changed quite a bit // Options: n.Options // Relation: convertRangeVar(n.Relation), // VaCols: convertSlice(n.VaCols), } } func convertVar(n *pg.Var) *ast.Var { if n == nil { return nil } return &ast.Var{ Xpr: convertNode(n.Xpr), Varno: ast.Index(n.Varno), Varattno: ast.AttrNumber(n.Varattno), Vartype: ast.Oid(n.Vartype), Vartypmod: n.Vartypmod, Varcollid: ast.Oid(n.Varcollid), Varlevelsup: ast.Index(n.Varlevelsup), Location: int(n.Location), } } func convertVariableSetStmt(n *pg.VariableSetStmt) *ast.VariableSetStmt { if n == nil { return nil } return &ast.VariableSetStmt{ Kind: ast.VariableSetKind(n.Kind), Name: makeString(n.Name), Args: convertSlice(n.Args), IsLocal: n.IsLocal, } } func convertVariableShowStmt(n *pg.VariableShowStmt) *ast.VariableShowStmt { if n == nil { return nil } return &ast.VariableShowStmt{ Name: makeString(n.Name), } } func convertViewStmt(n *pg.ViewStmt) *ast.ViewStmt { if n == nil { return nil } return &ast.ViewStmt{ View: convertRangeVar(n.View), Aliases: convertSlice(n.Aliases), Query: convertNode(n.Query), Replace: n.Replace, Options: convertSlice(n.Options), WithCheckOption: ast.ViewCheckOption(n.WithCheckOption), } } func convertWindowClause(n *pg.WindowClause) *ast.WindowClause { if n == nil { return nil } return &ast.WindowClause{ Name: makeString(n.Name), Refname: makeString(n.Refname), PartitionClause: convertSlice(n.PartitionClause), OrderClause: convertSlice(n.OrderClause), FrameOptions: int(n.FrameOptions), StartOffset: convertNode(n.StartOffset), EndOffset: convertNode(n.EndOffset), Winref: ast.Index(n.Winref), CopiedOrder: n.CopiedOrder, } } func convertWindowDef(n *pg.WindowDef) *ast.WindowDef { if n == nil { return nil } return &ast.WindowDef{ Name: makeString(n.Name), Refname: makeString(n.Refname), PartitionClause: convertSlice(n.PartitionClause), OrderClause: convertSlice(n.OrderClause), FrameOptions: int(n.FrameOptions), StartOffset: convertNode(n.StartOffset), EndOffset: convertNode(n.EndOffset), Location: int(n.Location), } } func convertWindowFunc(n *pg.WindowFunc) *ast.WindowFunc { if n == nil { return nil } return &ast.WindowFunc{ Xpr: convertNode(n.Xpr), Winfnoid: ast.Oid(n.Winfnoid), Wintype: ast.Oid(n.Wintype), Wincollid: ast.Oid(n.Wincollid), Inputcollid: ast.Oid(n.Inputcollid), Args: convertSlice(n.Args), Aggfilter: convertNode(n.Aggfilter), Winref: ast.Index(n.Winref), Winstar: n.Winstar, Winagg: n.Winagg, Location: int(n.Location), } } func convertWithCheckOption(n *pg.WithCheckOption) *ast.WithCheckOption { if n == nil { return nil } return &ast.WithCheckOption{ Kind: ast.WCOKind(n.Kind), Relname: makeString(n.Relname), Polname: makeString(n.Polname), Qual: convertNode(n.Qual), Cascaded: n.Cascaded, } } func convertWithClause(n *pg.WithClause) *ast.WithClause { if n == nil { return nil } return &ast.WithClause{ Ctes: convertSlice(n.Ctes), Recursive: n.Recursive, Location: int(n.Location), } } func convertXmlExpr(n *pg.XmlExpr) *ast.XmlExpr { if n == nil { return nil } return &ast.XmlExpr{ Xpr: convertNode(n.Xpr), Op: ast.XmlExprOp(n.Op), Name: makeString(n.Name), NamedArgs: convertSlice(n.NamedArgs), ArgNames: convertSlice(n.ArgNames), Args: convertSlice(n.Args), Xmloption: ast.XmlOptionType(n.Xmloption), Type: ast.Oid(n.Type), Typmod: n.Typmod, Location: int(n.Location), } } func convertXmlSerialize(n *pg.XmlSerialize) *ast.XmlSerialize { if n == nil { return nil } return &ast.XmlSerialize{ Xmloption: ast.XmlOptionType(n.Xmloption), Expr: convertNode(n.Expr), TypeName: convertTypeName(n.TypeName), Location: int(n.Location), } } func convertNode(node *pg.Node) ast.Node { if node == nil || node.Node == nil { return &ast.TODO{} } switch n := node.Node.(type) { case *pg.Node_AArrayExpr: return convertA_ArrayExpr(n.AArrayExpr) case *pg.Node_AConst: return convertA_Const(n.AConst) case *pg.Node_AExpr: return convertA_Expr(n.AExpr) case *pg.Node_AIndices: return convertA_Indices(n.AIndices) case *pg.Node_AIndirection: return convertA_Indirection(n.AIndirection) case *pg.Node_AStar: return convertA_Star(n.AStar) case *pg.Node_AccessPriv: return convertAccessPriv(n.AccessPriv) case *pg.Node_Aggref: return convertAggref(n.Aggref) case *pg.Node_Alias: return convertAlias(n.Alias) case *pg.Node_AlterCollationStmt: return convertAlterCollationStmt(n.AlterCollationStmt) case *pg.Node_AlterDatabaseSetStmt: return convertAlterDatabaseSetStmt(n.AlterDatabaseSetStmt) case *pg.Node_AlterDatabaseStmt: return convertAlterDatabaseStmt(n.AlterDatabaseStmt) case *pg.Node_AlterDefaultPrivilegesStmt: return convertAlterDefaultPrivilegesStmt(n.AlterDefaultPrivilegesStmt) case *pg.Node_AlterDomainStmt: return convertAlterDomainStmt(n.AlterDomainStmt) case *pg.Node_AlterEnumStmt: return convertAlterEnumStmt(n.AlterEnumStmt) case *pg.Node_AlterEventTrigStmt: return convertAlterEventTrigStmt(n.AlterEventTrigStmt) case *pg.Node_AlterExtensionContentsStmt: return convertAlterExtensionContentsStmt(n.AlterExtensionContentsStmt) case *pg.Node_AlterExtensionStmt: return convertAlterExtensionStmt(n.AlterExtensionStmt) case *pg.Node_AlterFdwStmt: return convertAlterFdwStmt(n.AlterFdwStmt) case *pg.Node_AlterForeignServerStmt: return convertAlterForeignServerStmt(n.AlterForeignServerStmt) case *pg.Node_AlterFunctionStmt: return convertAlterFunctionStmt(n.AlterFunctionStmt) case *pg.Node_AlterObjectDependsStmt: return convertAlterObjectDependsStmt(n.AlterObjectDependsStmt) case *pg.Node_AlterObjectSchemaStmt: return convertAlterObjectSchemaStmt(n.AlterObjectSchemaStmt) case *pg.Node_AlterOpFamilyStmt: return convertAlterOpFamilyStmt(n.AlterOpFamilyStmt) case *pg.Node_AlterOperatorStmt: return convertAlterOperatorStmt(n.AlterOperatorStmt) case *pg.Node_AlterOwnerStmt: return convertAlterOwnerStmt(n.AlterOwnerStmt) case *pg.Node_AlterPolicyStmt: return convertAlterPolicyStmt(n.AlterPolicyStmt) case *pg.Node_AlterPublicationStmt: return convertAlterPublicationStmt(n.AlterPublicationStmt) case *pg.Node_AlterRoleSetStmt: return convertAlterRoleSetStmt(n.AlterRoleSetStmt) case *pg.Node_AlterRoleStmt: return convertAlterRoleStmt(n.AlterRoleStmt) case *pg.Node_AlterSeqStmt: return convertAlterSeqStmt(n.AlterSeqStmt) case *pg.Node_AlterSubscriptionStmt: return convertAlterSubscriptionStmt(n.AlterSubscriptionStmt) case *pg.Node_AlterSystemStmt: return convertAlterSystemStmt(n.AlterSystemStmt) case *pg.Node_AlterTsconfigurationStmt: return convertAlterTSConfigurationStmt(n.AlterTsconfigurationStmt) case *pg.Node_AlterTsdictionaryStmt: return convertAlterTSDictionaryStmt(n.AlterTsdictionaryStmt) case *pg.Node_AlterTableCmd: return convertAlterTableCmd(n.AlterTableCmd) case *pg.Node_AlterTableMoveAllStmt: return convertAlterTableMoveAllStmt(n.AlterTableMoveAllStmt) case *pg.Node_AlterTableSpaceOptionsStmt: return convertAlterTableSpaceOptionsStmt(n.AlterTableSpaceOptionsStmt) case *pg.Node_AlterTableStmt: return convertAlterTableStmt(n.AlterTableStmt) case *pg.Node_AlterUserMappingStmt: return convertAlterUserMappingStmt(n.AlterUserMappingStmt) case *pg.Node_AlternativeSubPlan: return convertAlternativeSubPlan(n.AlternativeSubPlan) case *pg.Node_ArrayCoerceExpr: return convertArrayCoerceExpr(n.ArrayCoerceExpr) case *pg.Node_ArrayExpr: return convertArrayExpr(n.ArrayExpr) case *pg.Node_BitString: return convertBitString(n.BitString) case *pg.Node_BoolExpr: return convertBoolExpr(n.BoolExpr) case *pg.Node_Boolean: return convertBoolean(n.Boolean) case *pg.Node_BooleanTest: return convertBooleanTest(n.BooleanTest) case *pg.Node_CallStmt: return convertCallStmt(n.CallStmt) case *pg.Node_CaseExpr: return convertCaseExpr(n.CaseExpr) case *pg.Node_CaseTestExpr: return convertCaseTestExpr(n.CaseTestExpr) case *pg.Node_CaseWhen: return convertCaseWhen(n.CaseWhen) case *pg.Node_CheckPointStmt: return convertCheckPointStmt(n.CheckPointStmt) case *pg.Node_ClosePortalStmt: return convertClosePortalStmt(n.ClosePortalStmt) case *pg.Node_ClusterStmt: return convertClusterStmt(n.ClusterStmt) case *pg.Node_CoalesceExpr: return convertCoalesceExpr(n.CoalesceExpr) case *pg.Node_CoerceToDomain: return convertCoerceToDomain(n.CoerceToDomain) case *pg.Node_CoerceToDomainValue: return convertCoerceToDomainValue(n.CoerceToDomainValue) case *pg.Node_CoerceViaIo: return convertCoerceViaIO(n.CoerceViaIo) case *pg.Node_CollateClause: return convertCollateClause(n.CollateClause) case *pg.Node_CollateExpr: return convertCollateExpr(n.CollateExpr) case *pg.Node_ColumnDef: return convertColumnDef(n.ColumnDef) case *pg.Node_ColumnRef: return convertColumnRef(n.ColumnRef) case *pg.Node_CommentStmt: return convertCommentStmt(n.CommentStmt) case *pg.Node_CommonTableExpr: return convertCommonTableExpr(n.CommonTableExpr) case *pg.Node_CompositeTypeStmt: return convertCompositeTypeStmt(n.CompositeTypeStmt) case *pg.Node_Constraint: return convertConstraint(n.Constraint) case *pg.Node_ConstraintsSetStmt: return convertConstraintsSetStmt(n.ConstraintsSetStmt) case *pg.Node_ConvertRowtypeExpr: return convertConvertRowtypeExpr(n.ConvertRowtypeExpr) case *pg.Node_CopyStmt: return convertCopyStmt(n.CopyStmt) case *pg.Node_CreateAmStmt: return convertCreateAmStmt(n.CreateAmStmt) case *pg.Node_CreateCastStmt: return convertCreateCastStmt(n.CreateCastStmt) case *pg.Node_CreateConversionStmt: return convertCreateConversionStmt(n.CreateConversionStmt) case *pg.Node_CreateDomainStmt: return convertCreateDomainStmt(n.CreateDomainStmt) case *pg.Node_CreateEnumStmt: return convertCreateEnumStmt(n.CreateEnumStmt) case *pg.Node_CreateEventTrigStmt: return convertCreateEventTrigStmt(n.CreateEventTrigStmt) case *pg.Node_CreateExtensionStmt: return convertCreateExtensionStmt(n.CreateExtensionStmt) case *pg.Node_CreateFdwStmt: return convertCreateFdwStmt(n.CreateFdwStmt) case *pg.Node_CreateForeignServerStmt: return convertCreateForeignServerStmt(n.CreateForeignServerStmt) case *pg.Node_CreateForeignTableStmt: return convertCreateForeignTableStmt(n.CreateForeignTableStmt) case *pg.Node_CreateFunctionStmt: return convertCreateFunctionStmt(n.CreateFunctionStmt) case *pg.Node_CreateOpClassItem: return convertCreateOpClassItem(n.CreateOpClassItem) case *pg.Node_CreateOpClassStmt: return convertCreateOpClassStmt(n.CreateOpClassStmt) case *pg.Node_CreateOpFamilyStmt: return convertCreateOpFamilyStmt(n.CreateOpFamilyStmt) case *pg.Node_CreatePlangStmt: return convertCreatePLangStmt(n.CreatePlangStmt) case *pg.Node_CreatePolicyStmt: return convertCreatePolicyStmt(n.CreatePolicyStmt) case *pg.Node_CreatePublicationStmt: return convertCreatePublicationStmt(n.CreatePublicationStmt) case *pg.Node_CreateRangeStmt: return convertCreateRangeStmt(n.CreateRangeStmt) case *pg.Node_CreateRoleStmt: return convertCreateRoleStmt(n.CreateRoleStmt) case *pg.Node_CreateSchemaStmt: return convertCreateSchemaStmt(n.CreateSchemaStmt) case *pg.Node_CreateSeqStmt: return convertCreateSeqStmt(n.CreateSeqStmt) case *pg.Node_CreateStatsStmt: return convertCreateStatsStmt(n.CreateStatsStmt) case *pg.Node_CreateStmt: return convertCreateStmt(n.CreateStmt) case *pg.Node_CreateSubscriptionStmt: return convertCreateSubscriptionStmt(n.CreateSubscriptionStmt) case *pg.Node_CreateTableAsStmt: return convertCreateTableAsStmt(n.CreateTableAsStmt) case *pg.Node_CreateTableSpaceStmt: return convertCreateTableSpaceStmt(n.CreateTableSpaceStmt) case *pg.Node_CreateTransformStmt: return convertCreateTransformStmt(n.CreateTransformStmt) case *pg.Node_CreateTrigStmt: return convertCreateTrigStmt(n.CreateTrigStmt) case *pg.Node_CreateUserMappingStmt: return convertCreateUserMappingStmt(n.CreateUserMappingStmt) case *pg.Node_CreatedbStmt: return convertCreatedbStmt(n.CreatedbStmt) case *pg.Node_CurrentOfExpr: return convertCurrentOfExpr(n.CurrentOfExpr) case *pg.Node_DeallocateStmt: return convertDeallocateStmt(n.DeallocateStmt) case *pg.Node_DeclareCursorStmt: return convertDeclareCursorStmt(n.DeclareCursorStmt) case *pg.Node_DefElem: return convertDefElem(n.DefElem) case *pg.Node_DefineStmt: return convertDefineStmt(n.DefineStmt) case *pg.Node_DeleteStmt: return convertDeleteStmt(n.DeleteStmt) case *pg.Node_DiscardStmt: return convertDiscardStmt(n.DiscardStmt) case *pg.Node_DoStmt: return convertDoStmt(n.DoStmt) case *pg.Node_DropOwnedStmt: return convertDropOwnedStmt(n.DropOwnedStmt) case *pg.Node_DropRoleStmt: return convertDropRoleStmt(n.DropRoleStmt) case *pg.Node_DropStmt: return convertDropStmt(n.DropStmt) case *pg.Node_DropSubscriptionStmt: return convertDropSubscriptionStmt(n.DropSubscriptionStmt) case *pg.Node_DropTableSpaceStmt: return convertDropTableSpaceStmt(n.DropTableSpaceStmt) case *pg.Node_DropUserMappingStmt: return convertDropUserMappingStmt(n.DropUserMappingStmt) case *pg.Node_DropdbStmt: return convertDropdbStmt(n.DropdbStmt) case *pg.Node_ExecuteStmt: return convertExecuteStmt(n.ExecuteStmt) case *pg.Node_ExplainStmt: return convertExplainStmt(n.ExplainStmt) case *pg.Node_FetchStmt: return convertFetchStmt(n.FetchStmt) case *pg.Node_FieldSelect: return convertFieldSelect(n.FieldSelect) case *pg.Node_FieldStore: return convertFieldStore(n.FieldStore) case *pg.Node_Float: return convertFloat(n.Float) case *pg.Node_FromExpr: return convertFromExpr(n.FromExpr) case *pg.Node_FuncCall: return convertFuncCall(n.FuncCall) case *pg.Node_FuncExpr: return convertFuncExpr(n.FuncExpr) case *pg.Node_FunctionParameter: return convertFunctionParameter(n.FunctionParameter) case *pg.Node_GrantRoleStmt: return convertGrantRoleStmt(n.GrantRoleStmt) case *pg.Node_GrantStmt: return convertGrantStmt(n.GrantStmt) case *pg.Node_GroupingFunc: return convertGroupingFunc(n.GroupingFunc) case *pg.Node_GroupingSet: return convertGroupingSet(n.GroupingSet) case *pg.Node_ImportForeignSchemaStmt: return convertImportForeignSchemaStmt(n.ImportForeignSchemaStmt) case *pg.Node_IndexElem: return convertIndexElem(n.IndexElem) case *pg.Node_IndexStmt: return convertIndexStmt(n.IndexStmt) case *pg.Node_InferClause: return convertInferClause(n.InferClause) case *pg.Node_InferenceElem: return convertInferenceElem(n.InferenceElem) case *pg.Node_InlineCodeBlock: return convertInlineCodeBlock(n.InlineCodeBlock) case *pg.Node_InsertStmt: return convertInsertStmt(n.InsertStmt) case *pg.Node_Integer: return convertInteger(n.Integer) case *pg.Node_IntoClause: return convertIntoClause(n.IntoClause) case *pg.Node_JoinExpr: return convertJoinExpr(n.JoinExpr) case *pg.Node_List: return convertList(n.List) case *pg.Node_ListenStmt: return convertListenStmt(n.ListenStmt) case *pg.Node_LoadStmt: return convertLoadStmt(n.LoadStmt) case *pg.Node_LockStmt: return convertLockStmt(n.LockStmt) case *pg.Node_LockingClause: return convertLockingClause(n.LockingClause) case *pg.Node_MinMaxExpr: return convertMinMaxExpr(n.MinMaxExpr) case *pg.Node_MultiAssignRef: return convertMultiAssignRef(n.MultiAssignRef) case *pg.Node_NamedArgExpr: return convertNamedArgExpr(n.NamedArgExpr) case *pg.Node_NextValueExpr: return convertNextValueExpr(n.NextValueExpr) case *pg.Node_NotifyStmt: return convertNotifyStmt(n.NotifyStmt) case *pg.Node_NullTest: return convertNullTest(n.NullTest) case *pg.Node_NullIfExpr: return convertNullIfExpr(n.NullIfExpr) case *pg.Node_ObjectWithArgs: return convertObjectWithArgs(n.ObjectWithArgs) case *pg.Node_OnConflictClause: return convertOnConflictClause(n.OnConflictClause) case *pg.Node_OnConflictExpr: return convertOnConflictExpr(n.OnConflictExpr) case *pg.Node_OpExpr: return convertOpExpr(n.OpExpr) case *pg.Node_Param: return convertParam(n.Param) case *pg.Node_ParamRef: return convertParamRef(n.ParamRef) case *pg.Node_PartitionBoundSpec: return convertPartitionBoundSpec(n.PartitionBoundSpec) case *pg.Node_PartitionCmd: return convertPartitionCmd(n.PartitionCmd) case *pg.Node_PartitionElem: return convertPartitionElem(n.PartitionElem) case *pg.Node_PartitionRangeDatum: return convertPartitionRangeDatum(n.PartitionRangeDatum) case *pg.Node_PartitionSpec: return convertPartitionSpec(n.PartitionSpec) case *pg.Node_PrepareStmt: return convertPrepareStmt(n.PrepareStmt) case *pg.Node_Query: return convertQuery(n.Query) case *pg.Node_RangeFunction: return convertRangeFunction(n.RangeFunction) case *pg.Node_RangeSubselect: return convertRangeSubselect(n.RangeSubselect) case *pg.Node_RangeTableFunc: return convertRangeTableFunc(n.RangeTableFunc) case *pg.Node_RangeTableFuncCol: return convertRangeTableFuncCol(n.RangeTableFuncCol) case *pg.Node_RangeTableSample: return convertRangeTableSample(n.RangeTableSample) case *pg.Node_RangeTblEntry: return convertRangeTblEntry(n.RangeTblEntry) case *pg.Node_RangeTblFunction: return convertRangeTblFunction(n.RangeTblFunction) case *pg.Node_RangeTblRef: return convertRangeTblRef(n.RangeTblRef) case *pg.Node_RangeVar: return convertRangeVar(n.RangeVar) case *pg.Node_RawStmt: return convertRawStmt(n.RawStmt) case *pg.Node_ReassignOwnedStmt: return convertReassignOwnedStmt(n.ReassignOwnedStmt) case *pg.Node_RefreshMatViewStmt: return convertRefreshMatViewStmt(n.RefreshMatViewStmt) case *pg.Node_ReindexStmt: return convertReindexStmt(n.ReindexStmt) case *pg.Node_RelabelType: return convertRelabelType(n.RelabelType) case *pg.Node_RenameStmt: return convertRenameStmt(n.RenameStmt) case *pg.Node_ReplicaIdentityStmt: return convertReplicaIdentityStmt(n.ReplicaIdentityStmt) case *pg.Node_ResTarget: return convertResTarget(n.ResTarget) case *pg.Node_RoleSpec: return convertRoleSpec(n.RoleSpec) case *pg.Node_RowCompareExpr: return convertRowCompareExpr(n.RowCompareExpr) case *pg.Node_RowExpr: return convertRowExpr(n.RowExpr) case *pg.Node_RowMarkClause: return convertRowMarkClause(n.RowMarkClause) case *pg.Node_RuleStmt: return convertRuleStmt(n.RuleStmt) case *pg.Node_SqlvalueFunction: return convertSQLValueFunction(n.SqlvalueFunction) case *pg.Node_ScalarArrayOpExpr: return convertScalarArrayOpExpr(n.ScalarArrayOpExpr) case *pg.Node_SecLabelStmt: return convertSecLabelStmt(n.SecLabelStmt) case *pg.Node_SelectStmt: return convertSelectStmt(n.SelectStmt) case *pg.Node_SetOperationStmt: return convertSetOperationStmt(n.SetOperationStmt) case *pg.Node_SetToDefault: return convertSetToDefault(n.SetToDefault) case *pg.Node_SortBy: return convertSortBy(n.SortBy) case *pg.Node_SortGroupClause: return convertSortGroupClause(n.SortGroupClause) case *pg.Node_String_: return convertString(n.String_) case *pg.Node_SubLink: return convertSubLink(n.SubLink) case *pg.Node_SubPlan: return convertSubPlan(n.SubPlan) case *pg.Node_TableFunc: return convertTableFunc(n.TableFunc) case *pg.Node_TableLikeClause: return convertTableLikeClause(n.TableLikeClause) case *pg.Node_TableSampleClause: return convertTableSampleClause(n.TableSampleClause) case *pg.Node_TargetEntry: return convertTargetEntry(n.TargetEntry) case *pg.Node_TransactionStmt: return convertTransactionStmt(n.TransactionStmt) case *pg.Node_TriggerTransition: return convertTriggerTransition(n.TriggerTransition) case *pg.Node_TruncateStmt: return convertTruncateStmt(n.TruncateStmt) case *pg.Node_TypeCast: return convertTypeCast(n.TypeCast) case *pg.Node_TypeName: return convertTypeName(n.TypeName) case *pg.Node_UnlistenStmt: return convertUnlistenStmt(n.UnlistenStmt) case *pg.Node_UpdateStmt: return convertUpdateStmt(n.UpdateStmt) case *pg.Node_VacuumStmt: return convertVacuumStmt(n.VacuumStmt) case *pg.Node_Var: return convertVar(n.Var) case *pg.Node_VariableSetStmt: return convertVariableSetStmt(n.VariableSetStmt) case *pg.Node_VariableShowStmt: return convertVariableShowStmt(n.VariableShowStmt) case *pg.Node_ViewStmt: return convertViewStmt(n.ViewStmt) case *pg.Node_WindowClause: return convertWindowClause(n.WindowClause) case *pg.Node_WindowDef: return convertWindowDef(n.WindowDef) case *pg.Node_WindowFunc: return convertWindowFunc(n.WindowFunc) case *pg.Node_WithCheckOption: return convertWithCheckOption(n.WithCheckOption) case *pg.Node_WithClause: return convertWithClause(n.WithClause) case *pg.Node_XmlExpr: return convertXmlExpr(n.XmlExpr) case *pg.Node_XmlSerialize: return convertXmlSerialize(n.XmlSerialize) default: return &ast.TODO{} } } ================================================ FILE: internal/engine/postgresql/extension.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package postgresql import ( "github.com/sqlc-dev/sqlc/internal/engine/postgresql/contrib" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) func loadExtension(name string) *catalog.Schema { switch name { case "adminpack": return contrib.Adminpack() case "amcheck": return contrib.Amcheck() case "btree_gin": return contrib.BtreeGin() case "btree_gist": return contrib.BtreeGist() case "citext": return contrib.Citext() case "cube": return contrib.Cube() case "dblink": return contrib.Dblink() case "earthdistance": return contrib.Earthdistance() case "file_fdw": return contrib.FileFdw() case "fuzzystrmatch": return contrib.Fuzzystrmatch() case "hstore": return contrib.Hstore() case "intagg": return contrib.Intagg() case "intarray": return contrib.Intarray() case "isn": return contrib.Isn() case "lo": return contrib.Lo() case "ltree": return contrib.Ltree() case "pageinspect": return contrib.Pageinspect() case "pg_buffercache": return contrib.PgBuffercache() case "pg_freespacemap": return contrib.PgFreespacemap() case "pg_prewarm": return contrib.PgPrewarm() case "pg_stat_statements": return contrib.PgStatStatements() case "pg_trgm": return contrib.PgTrgm() case "pg_visibility": return contrib.PgVisibility() case "pgcrypto": return contrib.Pgcrypto() case "pgrowlocks": return contrib.Pgrowlocks() case "pgstattuple": return contrib.Pgstattuple() case "postgres_fdw": return contrib.PostgresFdw() case "seg": return contrib.Seg() case "sslinfo": return contrib.Sslinfo() case "tablefunc": return contrib.Tablefunc() case "tcn": return contrib.Tcn() case "unaccent": return contrib.Unaccent() case "uuid-ossp": return contrib.UuidOssp() case "xml2": return contrib.Xml2() } return nil } ================================================ FILE: internal/engine/postgresql/information_schema.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package postgresql import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsgenInformationSchema = []*catalog.Function{} func genInformationSchema() *catalog.Schema { s := &catalog.Schema{Name: "information_schema"} s.Funcs = funcsgenInformationSchema s.Tables = []*catalog.Table{ { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "_pg_foreign_data_wrappers", }, Columns: []*catalog.Column{ { Name: "oid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "fdwowner", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "fdwoptions", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "foreign_data_wrapper_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_data_wrapper_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "authorization_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_data_wrapper_language", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "_pg_foreign_servers", }, Columns: []*catalog.Column{ { Name: "oid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "srvoptions", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "foreign_server_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_server_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_data_wrapper_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_data_wrapper_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_server_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "foreign_server_version", Type: ast.TypeName{Name: "character_data"}, }, { Name: "authorization_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "_pg_foreign_table_columns", }, Columns: []*catalog.Column{ { Name: "nspname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "attname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "attfdwoptions", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "_pg_foreign_tables", }, Columns: []*catalog.Column{ { Name: "foreign_table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "ftoptions", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "foreign_server_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_server_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "authorization_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "_pg_user_mappings", }, Columns: []*catalog.Column{ { Name: "oid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "umoptions", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "umuser", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "authorization_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_server_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_server_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "srvowner", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "administrable_role_authorizations", }, Columns: []*catalog.Column{ { Name: "grantee", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "role_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "is_grantable", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "applicable_roles", }, Columns: []*catalog.Column{ { Name: "grantee", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "role_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "is_grantable", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "attributes", }, Columns: []*catalog.Column{ { Name: "udt_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "attribute_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "ordinal_position", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "attribute_default", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_nullable", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "data_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "character_maximum_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "character_octet_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "character_set_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "numeric_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_precision_radix", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_scale", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "datetime_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "interval_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "interval_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "attribute_udt_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "attribute_udt_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "attribute_udt_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "maximum_cardinality", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "dtd_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "is_derived_reference_attribute", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "character_sets", }, Columns: []*catalog.Column{ { Name: "character_set_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_repertoire", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "form_of_use", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "default_collate_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "default_collate_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "default_collate_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "check_constraint_routine_usage", }, Columns: []*catalog.Column{ { Name: "constraint_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "check_constraints", }, Columns: []*catalog.Column{ { Name: "constraint_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "check_clause", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "collation_character_set_applicability", }, Columns: []*catalog.Column{ { Name: "collation_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "collations", }, Columns: []*catalog.Column{ { Name: "collation_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "pad_attribute", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "column_column_usage", }, Columns: []*catalog.Column{ { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "column_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "dependent_column", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "column_domain_usage", }, Columns: []*catalog.Column{ { Name: "domain_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "domain_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "domain_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "column_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "column_options", }, Columns: []*catalog.Column{ { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "column_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "option_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "option_value", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "column_privileges", }, Columns: []*catalog.Column{ { Name: "grantor", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "grantee", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "column_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "privilege_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_grantable", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "column_udt_usage", }, Columns: []*catalog.Column{ { Name: "udt_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "column_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "columns", }, Columns: []*catalog.Column{ { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "column_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "ordinal_position", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "column_default", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_nullable", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "data_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "character_maximum_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "character_octet_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_precision_radix", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_scale", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "datetime_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "interval_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "interval_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "character_set_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "domain_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "domain_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "domain_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "maximum_cardinality", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "dtd_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "is_self_referencing", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "is_identity", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "identity_generation", Type: ast.TypeName{Name: "character_data"}, }, { Name: "identity_start", Type: ast.TypeName{Name: "character_data"}, }, { Name: "identity_increment", Type: ast.TypeName{Name: "character_data"}, }, { Name: "identity_maximum", Type: ast.TypeName{Name: "character_data"}, }, { Name: "identity_minimum", Type: ast.TypeName{Name: "character_data"}, }, { Name: "identity_cycle", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "is_generated", Type: ast.TypeName{Name: "character_data"}, }, { Name: "generation_expression", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_updatable", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "constraint_column_usage", }, Columns: []*catalog.Column{ { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "column_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "constraint_table_usage", }, Columns: []*catalog.Column{ { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "data_type_privileges", }, Columns: []*catalog.Column{ { Name: "object_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "object_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "object_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "object_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "dtd_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "domain_constraints", }, Columns: []*catalog.Column{ { Name: "constraint_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "domain_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "domain_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "domain_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "is_deferrable", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "initially_deferred", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "domain_udt_usage", }, Columns: []*catalog.Column{ { Name: "udt_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "domain_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "domain_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "domain_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "domains", }, Columns: []*catalog.Column{ { Name: "domain_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "domain_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "domain_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "data_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "character_maximum_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "character_octet_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "character_set_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "numeric_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_precision_radix", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_scale", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "datetime_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "interval_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "interval_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "domain_default", Type: ast.TypeName{Name: "character_data"}, }, { Name: "udt_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "maximum_cardinality", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "dtd_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "element_types", }, Columns: []*catalog.Column{ { Name: "object_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "object_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "object_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "object_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "collection_type_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "data_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "character_maximum_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "character_octet_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "character_set_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "numeric_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_precision_radix", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_scale", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "datetime_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "interval_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "interval_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "domain_default", Type: ast.TypeName{Name: "character_data"}, }, { Name: "udt_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "maximum_cardinality", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "dtd_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "enabled_roles", }, Columns: []*catalog.Column{ { Name: "role_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "foreign_data_wrapper_options", }, Columns: []*catalog.Column{ { Name: "foreign_data_wrapper_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_data_wrapper_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "option_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "option_value", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "foreign_data_wrappers", }, Columns: []*catalog.Column{ { Name: "foreign_data_wrapper_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_data_wrapper_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "authorization_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "library_name", Type: ast.TypeName{Name: "character_data"}, }, { Name: "foreign_data_wrapper_language", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "foreign_server_options", }, Columns: []*catalog.Column{ { Name: "foreign_server_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_server_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "option_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "option_value", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "foreign_servers", }, Columns: []*catalog.Column{ { Name: "foreign_server_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_server_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_data_wrapper_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_data_wrapper_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_server_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "foreign_server_version", Type: ast.TypeName{Name: "character_data"}, }, { Name: "authorization_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "foreign_table_options", }, Columns: []*catalog.Column{ { Name: "foreign_table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "option_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "option_value", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "foreign_tables", }, Columns: []*catalog.Column{ { Name: "foreign_table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_server_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_server_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "information_schema_catalog_name", }, Columns: []*catalog.Column{ { Name: "catalog_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "key_column_usage", }, Columns: []*catalog.Column{ { Name: "constraint_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "column_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "ordinal_position", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "position_in_unique_constraint", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "parameters", }, Columns: []*catalog.Column{ { Name: "specific_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "ordinal_position", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "parameter_mode", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_result", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "as_locator", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "parameter_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "data_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "character_maximum_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "character_octet_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "character_set_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "numeric_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_precision_radix", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_scale", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "datetime_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "interval_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "interval_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "udt_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "maximum_cardinality", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "dtd_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "parameter_default", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "referential_constraints", }, Columns: []*catalog.Column{ { Name: "constraint_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "unique_constraint_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "unique_constraint_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "unique_constraint_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "match_option", Type: ast.TypeName{Name: "character_data"}, }, { Name: "update_rule", Type: ast.TypeName{Name: "character_data"}, }, { Name: "delete_rule", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "role_column_grants", }, Columns: []*catalog.Column{ { Name: "grantor", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "grantee", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "column_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "privilege_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_grantable", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "role_routine_grants", }, Columns: []*catalog.Column{ { Name: "grantor", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "grantee", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "privilege_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_grantable", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "role_table_grants", }, Columns: []*catalog.Column{ { Name: "grantor", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "grantee", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "privilege_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_grantable", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "with_hierarchy", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "role_udt_grants", }, Columns: []*catalog.Column{ { Name: "grantor", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "grantee", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "privilege_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_grantable", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "role_usage_grants", }, Columns: []*catalog.Column{ { Name: "grantor", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "grantee", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "object_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "object_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "object_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "object_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "privilege_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_grantable", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "routine_column_usage", }, Columns: []*catalog.Column{ { Name: "specific_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "column_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "routine_privileges", }, Columns: []*catalog.Column{ { Name: "grantor", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "grantee", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "privilege_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_grantable", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "routine_routine_usage", }, Columns: []*catalog.Column{ { Name: "specific_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "routine_sequence_usage", }, Columns: []*catalog.Column{ { Name: "specific_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "sequence_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "sequence_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "sequence_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "routine_table_usage", }, Columns: []*catalog.Column{ { Name: "specific_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "routines", }, Columns: []*catalog.Column{ { Name: "specific_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "module_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "module_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "module_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "data_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "character_maximum_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "character_octet_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "character_set_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "numeric_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_precision_radix", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_scale", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "datetime_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "interval_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "interval_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "type_udt_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "type_udt_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "type_udt_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "scope_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "maximum_cardinality", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "dtd_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "routine_body", Type: ast.TypeName{Name: "character_data"}, }, { Name: "routine_definition", Type: ast.TypeName{Name: "character_data"}, }, { Name: "external_name", Type: ast.TypeName{Name: "character_data"}, }, { Name: "external_language", Type: ast.TypeName{Name: "character_data"}, }, { Name: "parameter_style", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_deterministic", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "sql_data_access", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_null_call", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "sql_path", Type: ast.TypeName{Name: "character_data"}, }, { Name: "schema_level_routine", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "max_dynamic_result_sets", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "is_user_defined_cast", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "is_implicitly_invocable", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "security_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "to_sql_specific_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "to_sql_specific_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "to_sql_specific_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "as_locator", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "created", Type: ast.TypeName{Name: "time_stamp"}, Length: toPointer(8), }, { Name: "last_altered", Type: ast.TypeName{Name: "time_stamp"}, Length: toPointer(8), }, { Name: "new_savepoint_level", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "is_udt_dependent", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "result_cast_from_data_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "result_cast_as_locator", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "result_cast_char_max_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "result_cast_char_octet_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "result_cast_char_set_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "result_cast_char_set_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "result_cast_char_set_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "result_cast_collation_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "result_cast_collation_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "result_cast_collation_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "result_cast_numeric_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "result_cast_numeric_precision_radix", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "result_cast_numeric_scale", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "result_cast_datetime_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "result_cast_interval_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "result_cast_interval_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "result_cast_type_udt_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "result_cast_type_udt_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "result_cast_type_udt_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "result_cast_scope_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "result_cast_scope_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "result_cast_scope_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "result_cast_maximum_cardinality", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "result_cast_dtd_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "schemata", }, Columns: []*catalog.Column{ { Name: "catalog_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "schema_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "schema_owner", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "default_character_set_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "default_character_set_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "default_character_set_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "sql_path", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "sequences", }, Columns: []*catalog.Column{ { Name: "sequence_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "sequence_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "sequence_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "data_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "numeric_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_precision_radix", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_scale", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "start_value", Type: ast.TypeName{Name: "character_data"}, }, { Name: "minimum_value", Type: ast.TypeName{Name: "character_data"}, }, { Name: "maximum_value", Type: ast.TypeName{Name: "character_data"}, }, { Name: "increment", Type: ast.TypeName{Name: "character_data"}, }, { Name: "cycle_option", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "sql_features", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "feature_id", Type: ast.TypeName{Name: "character_data"}, }, { Name: "feature_name", Type: ast.TypeName{Name: "character_data"}, }, { Name: "sub_feature_id", Type: ast.TypeName{Name: "character_data"}, }, { Name: "sub_feature_name", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_supported", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "is_verified_by", Type: ast.TypeName{Name: "character_data"}, }, { Name: "comments", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "sql_implementation_info", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "implementation_info_id", Type: ast.TypeName{Name: "character_data"}, }, { Name: "implementation_info_name", Type: ast.TypeName{Name: "character_data"}, }, { Name: "integer_value", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "character_value", Type: ast.TypeName{Name: "character_data"}, }, { Name: "comments", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "sql_parts", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "feature_id", Type: ast.TypeName{Name: "character_data"}, }, { Name: "feature_name", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_supported", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "is_verified_by", Type: ast.TypeName{Name: "character_data"}, }, { Name: "comments", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "sql_sizing", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "sizing_id", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "sizing_name", Type: ast.TypeName{Name: "character_data"}, }, { Name: "supported_value", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "comments", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "table_constraints", }, Columns: []*catalog.Column{ { Name: "constraint_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "constraint_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_deferrable", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "initially_deferred", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "enforced", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "nulls_distinct", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "table_privileges", }, Columns: []*catalog.Column{ { Name: "grantor", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "grantee", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "privilege_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_grantable", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "with_hierarchy", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "tables", }, Columns: []*catalog.Column{ { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "self_referencing_column_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "reference_generation", Type: ast.TypeName{Name: "character_data"}, }, { Name: "user_defined_type_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "user_defined_type_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "user_defined_type_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "is_insertable_into", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "is_typed", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "commit_action", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "transforms", }, Columns: []*catalog.Column{ { Name: "udt_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "group_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "transform_type", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "triggered_update_columns", }, Columns: []*catalog.Column{ { Name: "trigger_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "trigger_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "trigger_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "event_object_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "event_object_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "event_object_table", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "event_object_column", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "triggers", }, Columns: []*catalog.Column{ { Name: "trigger_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "trigger_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "trigger_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "event_manipulation", Type: ast.TypeName{Name: "character_data"}, }, { Name: "event_object_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "event_object_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "event_object_table", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "action_order", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "action_condition", Type: ast.TypeName{Name: "character_data"}, }, { Name: "action_statement", Type: ast.TypeName{Name: "character_data"}, }, { Name: "action_orientation", Type: ast.TypeName{Name: "character_data"}, }, { Name: "action_timing", Type: ast.TypeName{Name: "character_data"}, }, { Name: "action_reference_old_table", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "action_reference_new_table", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "action_reference_old_row", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "action_reference_new_row", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "created", Type: ast.TypeName{Name: "time_stamp"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "udt_privileges", }, Columns: []*catalog.Column{ { Name: "grantor", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "grantee", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "udt_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "privilege_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_grantable", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "usage_privileges", }, Columns: []*catalog.Column{ { Name: "grantor", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "grantee", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "object_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "object_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "object_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "object_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "privilege_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_grantable", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "user_defined_types", }, Columns: []*catalog.Column{ { Name: "user_defined_type_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "user_defined_type_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "user_defined_type_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "user_defined_type_category", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_instantiable", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "is_final", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "ordering_form", Type: ast.TypeName{Name: "character_data"}, }, { Name: "ordering_category", Type: ast.TypeName{Name: "character_data"}, }, { Name: "ordering_routine_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "ordering_routine_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "ordering_routine_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "reference_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "data_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "character_maximum_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "character_octet_length", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "character_set_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "character_set_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "collation_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "numeric_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_precision_radix", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "numeric_scale", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "datetime_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "interval_type", Type: ast.TypeName{Name: "character_data"}, }, { Name: "interval_precision", Type: ast.TypeName{Name: "cardinal_number"}, Length: toPointer(4), }, { Name: "source_dtd_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "ref_dtd_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "user_mapping_options", }, Columns: []*catalog.Column{ { Name: "authorization_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_server_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_server_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "option_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "option_value", Type: ast.TypeName{Name: "character_data"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "user_mappings", }, Columns: []*catalog.Column{ { Name: "authorization_identifier", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_server_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "foreign_server_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "view_column_usage", }, Columns: []*catalog.Column{ { Name: "view_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "view_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "view_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "column_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "view_routine_usage", }, Columns: []*catalog.Column{ { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "specific_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "view_table_usage", }, Columns: []*catalog.Column{ { Name: "view_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "view_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "view_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "information_schema", Name: "views", }, Columns: []*catalog.Column{ { Name: "table_catalog", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_schema", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "table_name", Type: ast.TypeName{Name: "sql_identifier"}, Length: toPointer(64), }, { Name: "view_definition", Type: ast.TypeName{Name: "character_data"}, }, { Name: "check_option", Type: ast.TypeName{Name: "character_data"}, }, { Name: "is_updatable", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "is_insertable_into", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "is_trigger_updatable", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "is_trigger_deletable", Type: ast.TypeName{Name: "yes_or_no"}, }, { Name: "is_trigger_insertable_into", Type: ast.TypeName{Name: "yes_or_no"}, }, }, }, } return s } ================================================ FILE: internal/engine/postgresql/parse.go ================================================ package postgresql import ( "errors" "fmt" "io" "strings" 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" ) func stringSlice(list *nodes.List) []string { items := []string{} for _, item := range list.Items { if n, ok := item.Node.(*nodes.Node_String_); ok { items = append(items, n.String_.Sval) } } return items } func stringSliceFromNodes(s []*nodes.Node) []string { var items []string for _, item := range s { if n, ok := item.Node.(*nodes.Node_String_); ok { items = append(items, n.String_.Sval) } } return items } type relation struct { Catalog string Schema string Name string } func (r relation) TableName() *ast.TableName { return &ast.TableName{ Catalog: r.Catalog, Schema: r.Schema, Name: r.Name, } } func (r relation) TypeName() *ast.TypeName { return &ast.TypeName{ Catalog: r.Catalog, Schema: r.Schema, Name: r.Name, } } func (r relation) FuncName() *ast.FuncName { return &ast.FuncName{ Catalog: r.Catalog, Schema: r.Schema, Name: r.Name, } } func parseRelationFromNodes(list []*nodes.Node) (*relation, error) { parts := stringSliceFromNodes(list) switch len(parts) { case 1: return &relation{ Name: parts[0], }, nil case 2: return &relation{ Schema: parts[0], Name: parts[1], }, nil case 3: return &relation{ Catalog: parts[0], Schema: parts[1], Name: parts[2], }, nil default: return nil, fmt.Errorf("invalid name: %s", joinNodes(list, ".")) } } func parseRelationFromRangeVar(rv *nodes.RangeVar) *relation { return &relation{ Catalog: rv.Catalogname, Schema: rv.Schemaname, Name: rv.Relname, } } func parseRelation(in *nodes.Node) (*relation, error) { switch n := in.Node.(type) { case *nodes.Node_List: return parseRelationFromNodes(n.List.Items) case *nodes.Node_RangeVar: return parseRelationFromRangeVar(n.RangeVar), nil case *nodes.Node_TypeName: return parseRelationFromNodes(n.TypeName.Names) default: return nil, fmt.Errorf("unexpected node type: %T", n) } } func parseColName(node *nodes.Node) (*ast.ColumnRef, *ast.TableName, error) { switch n := node.Node.(type) { case *nodes.Node_List: parts := stringSlice(n.List) var tbl *ast.TableName var ref *ast.ColumnRef switch len(parts) { case 2: tbl = &ast.TableName{Name: parts[0]} ref = &ast.ColumnRef{Name: parts[1]} case 3: tbl = &ast.TableName{Schema: parts[0], Name: parts[1]} ref = &ast.ColumnRef{Name: parts[2]} case 4: tbl = &ast.TableName{Catalog: parts[0], Schema: parts[1], Name: parts[2]} ref = &ast.ColumnRef{Name: parts[3]} default: return nil, nil, fmt.Errorf("column specifier %q is not the proper format, expected '[catalog.][schema.]colname.tablename'", strings.Join(parts, ".")) } return ref, tbl, nil default: return nil, nil, fmt.Errorf("parseColName: unexpected node type: %T", n) } } func joinNodes(list []*nodes.Node, sep string) string { return strings.Join(stringSliceFromNodes(list), sep) } func NewParser() *Parser { return &Parser{} } type Parser struct { } var errSkip = errors.New("skip stmt") func (p *Parser) Parse(r io.Reader) ([]ast.Statement, error) { contents, err := io.ReadAll(r) if err != nil { return nil, err } tree, err := Parse(string(contents)) if err != nil { pErr := normalizeErr(err) return nil, pErr } var stmts []ast.Statement for _, raw := range tree.Stmts { n, err := translate(raw.Stmt) if err == errSkip { continue } if err != nil { return nil, err } if n == nil { return nil, fmt.Errorf("unexpected nil node") } stmts = append(stmts, ast.Statement{ Raw: &ast.RawStmt{ Stmt: n, StmtLocation: int(raw.StmtLocation), StmtLen: int(raw.StmtLen), }, }) } return stmts, nil } func normalizeErr(err error) error { //TODO: errors.As complains that *parser.Error does not implement error if pErr, ok := err.(*parser.Error); ok { sErr := &sqlerr.Error{ Message: pErr.Message, //Err: pErr, Line: pErr.Lineno, Location: pErr.Cursorpos, } return sErr } return err } // 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, } } func translate(node *nodes.Node) (ast.Node, error) { switch inner := node.Node.(type) { case *nodes.Node_AlterEnumStmt: n := inner.AlterEnumStmt rel, err := parseRelationFromNodes(n.TypeName) if err != nil { return nil, err } if n.OldVal != "" { return &ast.AlterTypeRenameValueStmt{ Type: rel.TypeName(), OldValue: makeString(n.OldVal), NewValue: makeString(n.NewVal), }, nil } else { return &ast.AlterTypeAddValueStmt{ Type: rel.TypeName(), NewValue: makeString(n.NewVal), NewValHasNeighbor: len(n.NewValNeighbor) > 0, NewValNeighbor: makeString(n.NewValNeighbor), NewValIsAfter: n.NewValIsAfter, SkipIfNewValExists: n.SkipIfNewValExists, }, nil } case *nodes.Node_AlterObjectSchemaStmt: n := inner.AlterObjectSchemaStmt switch n.ObjectType { case nodes.ObjectType_OBJECT_TABLE, nodes.ObjectType_OBJECT_VIEW, nodes.ObjectType_OBJECT_MATVIEW: rel := parseRelationFromRangeVar(n.Relation) return &ast.AlterTableSetSchemaStmt{ Table: rel.TableName(), NewSchema: makeString(n.Newschema), MissingOk: n.MissingOk, }, nil case nodes.ObjectType_OBJECT_TYPE: rel, err := parseRelation(n.Object) if err != nil { return nil, err } return &ast.AlterTypeSetSchemaStmt{ Type: rel.TypeName(), NewSchema: makeString(n.Newschema), }, nil } return nil, errSkip case *nodes.Node_AlterTableStmt: n := inner.AlterTableStmt rel := parseRelationFromRangeVar(n.Relation) at := &ast.AlterTableStmt{ Table: rel.TableName(), Cmds: &ast.List{}, MissingOk: n.MissingOk, } for _, cmd := range n.Cmds { switch cmdOneOf := cmd.Node.(type) { case *nodes.Node_AlterTableCmd: altercmd := cmdOneOf.AlterTableCmd item := &ast.AlterTableCmd{Name: &altercmd.Name, MissingOk: altercmd.MissingOk} switch altercmd.Subtype { case nodes.AlterTableType_AT_AddColumn: d, ok := altercmd.Def.Node.(*nodes.Node_ColumnDef) if !ok { return nil, fmt.Errorf("expected alter table definition to be a ColumnDef") } rel, err := parseRelationFromNodes(d.ColumnDef.TypeName.Names) if err != nil { return nil, err } item.Subtype = ast.AT_AddColumn item.Def = &ast.ColumnDef{ Colname: d.ColumnDef.Colname, TypeName: rel.TypeName(), IsNotNull: isNotNull(d.ColumnDef), IsArray: isArray(d.ColumnDef.TypeName), ArrayDims: len(d.ColumnDef.TypeName.ArrayBounds), } case nodes.AlterTableType_AT_AlterColumnType: d, ok := altercmd.Def.Node.(*nodes.Node_ColumnDef) if !ok { return nil, fmt.Errorf("expected alter table definition to be a ColumnDef") } col := "" if altercmd.Name != "" { col = altercmd.Name } else if d.ColumnDef.Colname != "" { col = d.ColumnDef.Colname } else { return nil, fmt.Errorf("unknown name for alter column type") } rel, err := parseRelationFromNodes(d.ColumnDef.TypeName.Names) if err != nil { return nil, err } item.Subtype = ast.AT_AlterColumnType item.Def = &ast.ColumnDef{ Colname: col, TypeName: rel.TypeName(), IsNotNull: isNotNull(d.ColumnDef), IsArray: isArray(d.ColumnDef.TypeName), ArrayDims: len(d.ColumnDef.TypeName.ArrayBounds), } case nodes.AlterTableType_AT_DropColumn: item.Subtype = ast.AT_DropColumn case nodes.AlterTableType_AT_DropNotNull: item.Subtype = ast.AT_DropNotNull case nodes.AlterTableType_AT_SetNotNull: item.Subtype = ast.AT_SetNotNull default: continue } at.Cmds.Items = append(at.Cmds.Items, item) } } return at, nil case *nodes.Node_CommentStmt: n := inner.CommentStmt switch n.Objtype { case nodes.ObjectType_OBJECT_COLUMN: col, tbl, err := parseColName(n.Object) if err != nil { return nil, fmt.Errorf("COMMENT ON COLUMN: %w", err) } return &ast.CommentOnColumnStmt{ Col: col, Table: tbl, Comment: makeString(n.Comment), }, nil case nodes.ObjectType_OBJECT_SCHEMA: o, ok := n.Object.Node.(*nodes.Node_String_) if !ok { return nil, fmt.Errorf("COMMENT ON SCHEMA: unexpected node type: %T", n.Object) } return &ast.CommentOnSchemaStmt{ Schema: &ast.String{Str: o.String_.Sval}, Comment: makeString(n.Comment), }, nil case nodes.ObjectType_OBJECT_TABLE: rel, err := parseRelation(n.Object) if err != nil { return nil, fmt.Errorf("COMMENT ON TABLE: %w", err) } return &ast.CommentOnTableStmt{ Table: rel.TableName(), Comment: makeString(n.Comment), }, nil case nodes.ObjectType_OBJECT_TYPE: rel, err := parseRelation(n.Object) if err != nil { return nil, err } return &ast.CommentOnTypeStmt{ Type: rel.TypeName(), Comment: makeString(n.Comment), }, nil case nodes.ObjectType_OBJECT_VIEW: rel, err := parseRelation(n.Object) if err != nil { return nil, fmt.Errorf("COMMENT ON VIEW: %w", err) } return &ast.CommentOnViewStmt{ View: rel.TableName(), Comment: makeString(n.Comment), }, nil } return nil, errSkip case *nodes.Node_CompositeTypeStmt: n := inner.CompositeTypeStmt rel := parseRelationFromRangeVar(n.Typevar) return &ast.CompositeTypeStmt{ TypeName: rel.TypeName(), }, nil case *nodes.Node_CreateStmt: n := inner.CreateStmt rel := parseRelationFromRangeVar(n.Relation) create := &ast.CreateTableStmt{ Name: rel.TableName(), IfNotExists: n.IfNotExists, } for _, node := range n.InhRelations { switch item := node.Node.(type) { case *nodes.Node_RangeVar: if item.RangeVar.Inh { rel := parseRelationFromRangeVar(item.RangeVar) create.Inherits = append(create.Inherits, rel.TableName()) } } } primaryKey := make(map[string]bool) for _, elt := range n.TableElts { switch item := elt.Node.(type) { case *nodes.Node_Constraint: if item.Constraint.Contype == nodes.ConstrType_CONSTR_PRIMARY { for _, key := range item.Constraint.Keys { // FIXME: Possible nil pointer dereference primaryKey[key.Node.(*nodes.Node_String_).String_.Sval] = true } } case *nodes.Node_TableLikeClause: rel := parseRelationFromRangeVar(item.TableLikeClause.Relation) create.ReferTable = rel.TableName() } } for _, elt := range n.TableElts { switch item := elt.Node.(type) { case *nodes.Node_ColumnDef: rel, err := parseRelationFromNodes(item.ColumnDef.TypeName.Names) if err != nil { return nil, err } primary := false for _, con := range item.ColumnDef.Constraints { if constraint, ok := con.Node.(*nodes.Node_Constraint); ok { primary = constraint.Constraint.Contype == nodes.ConstrType_CONSTR_PRIMARY } } create.Cols = append(create.Cols, &ast.ColumnDef{ Colname: item.ColumnDef.Colname, TypeName: rel.TypeName(), IsNotNull: isNotNull(item.ColumnDef) || primaryKey[item.ColumnDef.Colname], IsArray: isArray(item.ColumnDef.TypeName), ArrayDims: len(item.ColumnDef.TypeName.ArrayBounds), PrimaryKey: primary, }) } } return create, nil case *nodes.Node_CreateEnumStmt: n := inner.CreateEnumStmt rel, err := parseRelationFromNodes(n.TypeName) if err != nil { return nil, err } stmt := &ast.CreateEnumStmt{ TypeName: rel.TypeName(), Vals: &ast.List{}, } for _, val := range n.Vals { switch v := val.Node.(type) { case *nodes.Node_String_: stmt.Vals.Items = append(stmt.Vals.Items, &ast.String{ Str: v.String_.Sval, }) } } return stmt, nil case *nodes.Node_CreateFunctionStmt: n := inner.CreateFunctionStmt fn, err := parseRelationFromNodes(n.Funcname) if err != nil { return nil, err } var rt *ast.TypeName if n.ReturnType != nil { rel, err := parseRelationFromNodes(n.ReturnType.Names) if err != nil { return nil, err } rt = rel.TypeName() } stmt := &ast.CreateFunctionStmt{ Func: fn.FuncName(), ReturnType: rt, Replace: n.Replace, Params: &ast.List{}, Options: convertSlice(n.Options), } for _, item := range n.Parameters { arg := item.Node.(*nodes.Node_FunctionParameter).FunctionParameter rel, err := parseRelationFromNodes(arg.ArgType.Names) if err != nil { return nil, err } mode, err := convertFuncParamMode(arg.Mode) if err != nil { return nil, err } fp := &ast.FuncParam{ Name: &arg.Name, Type: rel.TypeName(), Mode: mode, } if arg.Defexpr != nil { fp.DefExpr = &ast.TODO{} } stmt.Params.Items = append(stmt.Params.Items, fp) } return stmt, nil case *nodes.Node_CreateSchemaStmt: n := inner.CreateSchemaStmt return &ast.CreateSchemaStmt{ Name: makeString(n.Schemaname), IfNotExists: n.IfNotExists, }, nil case *nodes.Node_DropStmt: n := inner.DropStmt switch n.RemoveType { case nodes.ObjectType_OBJECT_FUNCTION: drop := &ast.DropFunctionStmt{ MissingOk: n.MissingOk, } for _, obj := range n.Objects { nowa, ok := obj.Node.(*nodes.Node_ObjectWithArgs) if !ok { return nil, fmt.Errorf("nodes.DropStmt: FUNCTION: unknown type in objects list: %T", obj) } owa := nowa.ObjectWithArgs fn, err := parseRelationFromNodes(owa.Objname) if err != nil { return nil, fmt.Errorf("nodes.DropStmt: FUNCTION: %w", err) } args := make([]*ast.TypeName, len(owa.Objargs)) for i, objarg := range owa.Objargs { tn, ok := objarg.Node.(*nodes.Node_TypeName) if !ok { return nil, fmt.Errorf("nodes.DropStmt: FUNCTION: unknown type in objargs list: %T", objarg) } at, err := parseRelationFromNodes(tn.TypeName.Names) if err != nil { return nil, fmt.Errorf("nodes.DropStmt: FUNCTION: %w", err) } args[i] = at.TypeName() } drop.Funcs = append(drop.Funcs, &ast.FuncSpec{ Name: fn.FuncName(), Args: args, HasArgs: !owa.ArgsUnspecified, }) } return drop, nil case nodes.ObjectType_OBJECT_SCHEMA: drop := &ast.DropSchemaStmt{ MissingOk: n.MissingOk, } for _, obj := range n.Objects { val, ok := obj.Node.(*nodes.Node_String_) if !ok { return nil, fmt.Errorf("nodes.DropStmt: SCHEMA: unknown type in objects list: %T", obj) } drop.Schemas = append(drop.Schemas, &ast.String{Str: val.String_.Sval}) } return drop, nil case nodes.ObjectType_OBJECT_TABLE, nodes.ObjectType_OBJECT_VIEW, nodes.ObjectType_OBJECT_MATVIEW: drop := &ast.DropTableStmt{ IfExists: n.MissingOk, } for _, obj := range n.Objects { name, err := parseRelation(obj) if err != nil { return nil, fmt.Errorf("nodes.DropStmt: TABLE: %w", err) } drop.Tables = append(drop.Tables, name.TableName()) } return drop, nil case nodes.ObjectType_OBJECT_TYPE: drop := &ast.DropTypeStmt{ IfExists: n.MissingOk, } for _, obj := range n.Objects { name, err := parseRelation(obj) if err != nil { return nil, fmt.Errorf("nodes.DropStmt: TYPE: %w", err) } drop.Types = append(drop.Types, name.TypeName()) } return drop, nil } return nil, errSkip case *nodes.Node_RenameStmt: n := inner.RenameStmt switch n.RenameType { case nodes.ObjectType_OBJECT_COLUMN: rel := parseRelationFromRangeVar(n.Relation) return &ast.RenameColumnStmt{ Table: rel.TableName(), Col: &ast.ColumnRef{Name: n.Subname}, NewName: makeString(n.Newname), MissingOk: n.MissingOk, }, nil case nodes.ObjectType_OBJECT_TABLE, nodes.ObjectType_OBJECT_MATVIEW, nodes.ObjectType_OBJECT_VIEW: rel := parseRelationFromRangeVar(n.Relation) return &ast.RenameTableStmt{ Table: rel.TableName(), NewName: makeString(n.Newname), MissingOk: n.MissingOk, }, nil case nodes.ObjectType_OBJECT_TYPE: rel, err := parseRelation(n.Object) if err != nil { return nil, fmt.Errorf("nodes.RenameStmt: TYPE: %w", err) } return &ast.RenameTypeStmt{ Type: rel.TypeName(), NewName: makeString(n.Newname), }, nil } return nil, errSkip default: return convert(node) } } ================================================ FILE: internal/engine/postgresql/parse_default.go ================================================ //go:build !windows && cgo package postgresql import ( nodes "github.com/pganalyze/pg_query_go/v6" ) var Parse = nodes.Parse var Fingerprint = nodes.Fingerprint ================================================ FILE: internal/engine/postgresql/parse_wasi.go ================================================ //go:build windows || !cgo package postgresql import ( nodes "github.com/wasilibs/go-pgquery" ) var Parse = nodes.Parse var Fingerprint = nodes.Fingerprint ================================================ FILE: internal/engine/postgresql/parser/parser_default.go ================================================ //go:build !windows && cgo package parser import "github.com/pganalyze/pg_query_go/v6/parser" type Error = parser.Error ================================================ FILE: internal/engine/postgresql/parser/parser_wasi.go ================================================ //go:build windows || !cgo package parser import "github.com/wasilibs/go-pgquery/parser" type Error = parser.Error ================================================ FILE: internal/engine/postgresql/pg_catalog.go ================================================ // Code generated by sqlc-pg-gen. DO NOT EDIT. package postgresql import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcsgenPGCatalog = []*catalog.Function{ { Name: "RI_FKey_cascade_del", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "RI_FKey_cascade_upd", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "RI_FKey_check_ins", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "RI_FKey_check_upd", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "RI_FKey_noaction_del", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "RI_FKey_noaction_upd", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "RI_FKey_restrict_del", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "RI_FKey_restrict_upd", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "RI_FKey_setdefault_del", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "RI_FKey_setdefault_upd", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "RI_FKey_setnull_del", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "RI_FKey_setnull_upd", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "abbrev", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cidr"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "abbrev", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "abs", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "abs", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "abs", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "abs", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "abs", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "abs", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "aclcontains", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "aclitem[]"}, }, { Type: &ast.TypeName{Name: "aclitem"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "acldefault", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "char"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "aclitem[]"}, }, { Name: "aclexplode", Args: []*catalog.Argument{ { Name: "acl", Type: &ast.TypeName{Name: "aclitem[]"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "aclinsert", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "aclitem[]"}, }, { Type: &ast.TypeName{Name: "aclitem"}, }, }, ReturnType: &ast.TypeName{Name: "aclitem[]"}, }, { Name: "aclitemeq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "aclitem"}, }, { Type: &ast.TypeName{Name: "aclitem"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "aclitemin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "aclitem"}, }, { Name: "aclitemout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "aclitem"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "aclremove", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "aclitem[]"}, }, { Type: &ast.TypeName{Name: "aclitem"}, }, }, ReturnType: &ast.TypeName{Name: "aclitem[]"}, }, { Name: "acos", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "acosd", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "acosh", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "age", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "age", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "age", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "age", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "age", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "amvalidate", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "any_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "any_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "anyarray_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "anyarray_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "anyarray_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "anycompatible_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "anycompatible"}, }, { Name: "anycompatible_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatible"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "anycompatiblearray_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "anycompatiblearray"}, }, { Name: "anycompatiblearray_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatiblearray"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "anycompatiblearray_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatiblearray"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "anycompatiblemultirange_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "anycompatiblemultirange"}, }, { Name: "anycompatiblemultirange_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatiblemultirange"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "anycompatiblenonarray_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "anycompatiblenonarray"}, }, { Name: "anycompatiblenonarray_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatiblenonarray"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "anycompatiblerange_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "anycompatiblerange"}, }, { Name: "anycompatiblerange_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatiblerange"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "anyelement_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "anyelement_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "anyenum_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "anyenum"}, }, { Name: "anyenum_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "anymultirange_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "anymultirange"}, }, { Name: "anymultirange_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "anynonarray_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "anynonarray"}, }, { Name: "anynonarray_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anynonarray"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "anyrange_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "anyrange"}, }, { Name: "anyrange_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "anytextcat", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anynonarray"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "area", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "area", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "area", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "array_agg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "array_agg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anynonarray"}, }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "array_append", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatiblearray"}, }, { Type: &ast.TypeName{Name: "anycompatible"}, }, }, ReturnType: &ast.TypeName{Name: "anycompatiblearray"}, }, { Name: "array_cat", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatiblearray"}, }, { Type: &ast.TypeName{Name: "anycompatiblearray"}, }, }, ReturnType: &ast.TypeName{Name: "anycompatiblearray"}, }, { Name: "array_dims", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "array_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "array_fill", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "array_fill", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, { Type: &ast.TypeName{Name: "integer[]"}, }, { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "array_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "array_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "array_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "array_larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "array_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "array_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "array_lower", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "array_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "array_ndims", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "array_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "array_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "array_position", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatiblearray"}, }, { Type: &ast.TypeName{Name: "anycompatible"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "array_position", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatiblearray"}, }, { Type: &ast.TypeName{Name: "anycompatible"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "array_positions", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatiblearray"}, }, { Type: &ast.TypeName{Name: "anycompatible"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "array_prepend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatible"}, }, { Type: &ast.TypeName{Name: "anycompatiblearray"}, }, }, ReturnType: &ast.TypeName{Name: "anycompatiblearray"}, }, { Name: "array_remove", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatiblearray"}, }, { Type: &ast.TypeName{Name: "anycompatible"}, }, }, ReturnType: &ast.TypeName{Name: "anycompatiblearray"}, }, { Name: "array_replace", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatiblearray"}, }, { Type: &ast.TypeName{Name: "anycompatible"}, }, { Type: &ast.TypeName{Name: "anycompatible"}, }, }, ReturnType: &ast.TypeName{Name: "anycompatiblearray"}, }, { Name: "array_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "array_smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "array_to_json", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "array_to_json", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "array_to_string", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "array_to_string", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "array_to_tsvector", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "array_upper", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "arraycontained", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "arraycontains", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "arrayoverlap", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ascii", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "asin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "asind", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "asinh", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "atan", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "atan2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "atan2d", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "atand", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "atanh", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "avg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "avg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "avg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "avg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "avg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "avg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "avg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "binary_upgrade_create_empty_extension", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "oid[]"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "binary_upgrade_set_missing_value", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "binary_upgrade_set_next_array_pg_type_oid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "binary_upgrade_set_next_heap_pg_class_oid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "binary_upgrade_set_next_heap_relfilenode", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "binary_upgrade_set_next_index_pg_class_oid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "binary_upgrade_set_next_index_relfilenode", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "binary_upgrade_set_next_multirange_array_pg_type_oid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "binary_upgrade_set_next_multirange_pg_type_oid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "binary_upgrade_set_next_pg_authid_oid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "binary_upgrade_set_next_pg_enum_oid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "binary_upgrade_set_next_pg_tablespace_oid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "binary_upgrade_set_next_pg_type_oid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "binary_upgrade_set_next_toast_pg_class_oid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "binary_upgrade_set_next_toast_relfilenode", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "binary_upgrade_set_record_init_privs", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "bit", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bit", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bit", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bit_and", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "bit_and", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bit_and", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "bit_and", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "bit_count", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "bit_count", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "bit_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bit_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "bit_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "bit_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "bit_or", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "bit_or", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bit_or", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "bit_or", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "bit_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "bit_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "bit_xor", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "bit_xor", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bit_xor", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "bit_xor", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "bitand", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bitcat", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit varying"}, }, { Type: &ast.TypeName{Name: "bit varying"}, }, }, ReturnType: &ast.TypeName{Name: "bit varying"}, }, { Name: "bitcmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "biteq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bitge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bitgt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bitle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bitlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bitne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bitnot", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bitor", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bitshiftleft", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bitshiftright", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bittypmodin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "bittypmodout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "bitxor", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "bool", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bool", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bool_and", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bool_or", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "booland_statefunc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "booleq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "boolge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "boolgt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "boolin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "boolle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "boollt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "boolne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "boolor_statefunc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "boolout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "boolsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "bound_box", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "box"}, }, { Name: "box", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "box"}, }, { Name: "box", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "box"}, }, { Name: "box", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "box"}, }, { Name: "box", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "box"}, }, { Name: "box_above", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_above_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_add", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "box"}, }, { Name: "box_below", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_below_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_center", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "box_contain", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_contain_pt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_contained", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_distance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "box_div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "box"}, }, { Name: "box_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "box"}, }, { Name: "box_intersect", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "box"}, }, { Name: "box_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_left", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "box"}, }, { Name: "box_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "box_overabove", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_overbelow", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_overlap", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_overleft", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_overright", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_right", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_same", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "box_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "box_sub", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "box"}, }, { Name: "bpchar", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "character"}, }, { Name: "bpchar", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "character"}, }, { Name: "bpchar", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "character"}, }, { Name: "bpchar_larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "character"}, }, { Name: "bpchar_pattern_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpchar_pattern_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpchar_pattern_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpchar_pattern_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpchar_smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "character"}, }, { Name: "bpcharcmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "bpchareq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpcharge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpchargt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpchariclike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpcharicnlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpcharicregexeq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpcharicregexne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpcharin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "character"}, }, { Name: "bpcharle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpcharlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpcharlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpcharne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpcharnlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpcharout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "bpcharregexeq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpcharregexne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bpcharsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "bpchartypmodin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "bpchartypmodout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "brin_bloom_summary_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "pg_brin_bloom_summary"}, }, { Name: "brin_bloom_summary_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_brin_bloom_summary"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "brin_bloom_summary_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_brin_bloom_summary"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "brin_desummarize_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "brin_minmax_multi_summary_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "pg_brin_minmax_multi_summary"}, }, { Name: "brin_minmax_multi_summary_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_brin_minmax_multi_summary"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "brin_minmax_multi_summary_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_brin_minmax_multi_summary"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "brin_summarize_new_values", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "brin_summarize_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "broadcast", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "btarraycmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btboolcmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btbpchar_pattern_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btcharcmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "char"}, }, { Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btequalimage", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "btfloat48cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btfloat4cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btfloat84cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btfloat8cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btint24cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btint28cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btint2cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btint42cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btint48cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btint4cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btint82cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btint84cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btint8cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btnamecmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btnametextcmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btoidcmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btoidvectorcmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oidvector"}, }, { Type: &ast.TypeName{Name: "oidvector"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btrecordcmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btrecordimagecmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btrim", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "btrim", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "btrim", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "bttext_pattern_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "bttextcmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "bttextnamecmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "bttidcmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tid"}, }, { Type: &ast.TypeName{Name: "tid"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "btvarstrequalimage", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "byteacat", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "byteacmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "byteaeq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "byteage", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "byteagt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "byteain", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "byteale", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bytealike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "bytealt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "byteane", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "byteanlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "byteaout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "byteasend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "cardinality", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "cash_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "cash_div_cash", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "cash_div_flt4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "cash_div_flt8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "cash_div_int2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "cash_div_int4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "cash_div_int8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "cash_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cash_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cash_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cash_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "cash_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cash_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cash_mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "cash_mul_flt4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "cash_mul_flt8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "cash_mul_int2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "cash_mul_int4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "cash_mul_int8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "cash_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cash_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "cash_pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "cash_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "cash_words", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "cashlarger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "cashsmaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "cbrt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ceil", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ceil", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "ceiling", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ceiling", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "center", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "center", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "char", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "char"}, }, { Name: "char", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "char"}, }, { Name: "char_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "char_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "character_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "character_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "chareq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "char"}, }, { Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "charge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "char"}, }, { Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "chargt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "char"}, }, { Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "charin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "char"}, }, { Name: "charle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "char"}, }, { Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "charlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "char"}, }, { Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "charne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "char"}, }, { Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "charout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "charsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "chr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "cideq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cid"}, }, { Type: &ast.TypeName{Name: "cid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "cidin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "cid"}, }, { Name: "cidout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cid"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "cidr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "cidr"}, }, { Name: "cidr_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "cidr"}, }, { Name: "cidr_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cidr"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "cidr_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cidr"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "cidsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cid"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "circle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "circle"}, }, { Name: "circle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "circle"}, }, { Name: "circle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "circle"}, }, { Name: "circle_above", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_add_pt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "circle"}, }, { Name: "circle_below", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_center", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "circle_contain", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_contain_pt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_contained", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_distance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "circle_div_pt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "circle"}, }, { Name: "circle_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "circle"}, }, { Name: "circle_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_left", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_mul_pt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "circle"}, }, { Name: "circle_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "circle_overabove", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_overbelow", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_overlap", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_overleft", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_overright", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_right", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_same", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "circle_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "circle_sub_pt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "circle"}, }, { Name: "clock_timestamp", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "close_ls", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "close_lseg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "close_pb", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "close_pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "close_ps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "close_sb", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "col_description", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "concat_ws", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "convert", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "convert_from", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "convert_to", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "corr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "cos", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "cosd", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "cosh", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "cot", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "cotd", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "count", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "count", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "covar_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "covar_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "cstring_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "cstring_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "cstring_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "cume_dist", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "cume_dist", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "current_database", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "name"}, }, { Name: "current_query", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "current_schema", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "name"}, }, { Name: "current_schemas", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "name[]"}, }, { Name: "current_setting", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "current_setting", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "current_user", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "name"}, }, { Name: "currtid2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "tid"}, }, }, ReturnType: &ast.TypeName{Name: "tid"}, }, { Name: "currval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "cursor_to_xml", Args: []*catalog.Argument{ { Name: "cursor", Type: &ast.TypeName{Name: "refcursor"}, }, { Name: "count", Type: &ast.TypeName{Name: "integer"}, }, { Name: "nulls", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "tableforest", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "targetns", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "cursor_to_xmlschema", Args: []*catalog.Argument{ { Name: "cursor", Type: &ast.TypeName{Name: "refcursor"}, }, { Name: "nulls", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "tableforest", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "targetns", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "database_to_xml", Args: []*catalog.Argument{ { Name: "nulls", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "tableforest", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "targetns", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "database_to_xml_and_xmlschema", Args: []*catalog.Argument{ { Name: "nulls", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "tableforest", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "targetns", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "database_to_xmlschema", Args: []*catalog.Argument{ { Name: "nulls", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "tableforest", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "targetns", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "date_bin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "date_bin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "date_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "date_cmp_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "date_cmp_timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "date_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_eq_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_eq_timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_ge_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_ge_timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_gt_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_gt_timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "date_larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "date_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_le_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_le_timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_lt_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_lt_timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "date_mi_interval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "date_mii", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "date_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_ne_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_ne_timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "date_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "date_part", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "date_part", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "date_part", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "date_part", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "date_part", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "date_part", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "date_pl_interval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "date_pli", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "date_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "date_smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "date_trunc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "date_trunc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "date_trunc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "date_trunc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "datemultirange", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "datemultirange"}, }, { Name: "datemultirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "daterange"}, }, }, ReturnType: &ast.TypeName{Name: "datemultirange"}, }, { Name: "datemultirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "daterange[]"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "datemultirange"}, }, { Name: "daterange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "daterange"}, }, { Name: "daterange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "daterange"}, }, { Name: "daterange_canonical", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "daterange"}, }, }, ReturnType: &ast.TypeName{Name: "daterange"}, }, { Name: "daterange_subdiff", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "datetime_pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "datetimetz_pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "dcbrt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "decode", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "degrees", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dense_rank", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "dense_rank", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "dexp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "diagonal", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "lseg"}, }, { Name: "diameter", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_bp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_bs", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_cpoint", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_cpoly", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_lp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_ls", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_pathp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_pb", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_pc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_polyc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_polyp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_ppath", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_ppoly", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_ps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_sb", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_sl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dist_sp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "dlog1", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dlog10", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "domain_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, }, { Name: "dpow", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dround", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dsqrt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "dtrunc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "elem_contained_by_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "elem_contained_by_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "encode", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "enum_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "enum_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "enum_first", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "anyenum"}, }, { Name: "enum_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "enum_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "enum_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "anyenum"}, }, { Name: "enum_larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "anyenum"}, }, { Name: "enum_last", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "anyenum"}, }, { Name: "enum_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "enum_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "enum_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "enum_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "enum_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "enum_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "enum_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "enum_smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "anyenum"}, }, { Name: "event_trigger_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "event_trigger"}, }, { Name: "event_trigger_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "event_trigger"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "every", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "exp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "exp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "extract", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "extract", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "extract", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "extract", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "extract", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "extract", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "factorial", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "family", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "fdw_handler_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "fdw_handler"}, }, { Name: "fdw_handler_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "fdw_handler"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "first_value", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "float4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float48div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float48eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float48ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float48gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float48le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float48lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float48mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float48mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float48ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float48pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float4_accum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "double precision[]"}, }, { Name: "float4abs", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float4div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float4eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float4ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float4gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float4in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float4larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float4le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float4lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float4mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float4mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float4ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float4out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "float4pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float4send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "float4smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float4um", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float4up", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "float8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float84div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float84eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float84ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float84gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float84le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float84lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float84mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float84mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float84ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float84pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_accum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision[]"}, }, { Name: "float8_avg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_combine", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision[]"}, }, { Name: "float8_corr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_covar_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_covar_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_regr_accum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision[]"}, }, { Name: "float8_regr_avgx", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_regr_avgy", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_regr_combine", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision[]"}, }, { Name: "float8_regr_intercept", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_regr_r2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_regr_slope", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_regr_sxx", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_regr_sxy", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_regr_syy", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_stddev_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_stddev_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_var_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8_var_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8abs", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float8ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float8gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float8in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float8lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float8mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "float8out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "float8pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "float8smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8um", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "float8up", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "floor", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "floor", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "flt4_mul_cash", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "flt8_mul_cash", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "fmgr_c_validator", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "fmgr_internal_validator", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "fmgr_sql_validator", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "format", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "format", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "format_type", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "gcd", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "gcd", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "gcd", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "gen_random_uuid", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "uuid"}, }, { Name: "generate_series", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "generate_series", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "generate_series", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "generate_series", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "generate_series", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "generate_series", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "generate_series", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "generate_series", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "generate_subscripts", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "generate_subscripts", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "get_bit", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "get_bit", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "get_byte", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "get_current_ts_config", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "regconfig"}, }, { Name: "getdatabaseencoding", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "name"}, }, { Name: "getpgusername", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "name"}, }, { Name: "gin_clean_pending_list", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "gin_cmp_tslexeme", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "gin_compare_jsonb", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "gtsvectorin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "gtsvector"}, }, { Name: "gtsvectorout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "gtsvector"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "has_any_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_any_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_any_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_any_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_any_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_any_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_column_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_database_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_database_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_database_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_database_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_database_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_database_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_foreign_data_wrapper_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_foreign_data_wrapper_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_foreign_data_wrapper_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_foreign_data_wrapper_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_foreign_data_wrapper_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_foreign_data_wrapper_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_function_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_function_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_function_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_function_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_function_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_function_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_language_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_language_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_language_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_language_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_language_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_language_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_parameter_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_parameter_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_parameter_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_schema_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_schema_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_schema_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_schema_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_schema_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_schema_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_sequence_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_sequence_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_sequence_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_sequence_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_sequence_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_sequence_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_server_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_server_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_server_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_server_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_server_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_server_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_table_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_table_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_table_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_table_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_table_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_table_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_tablespace_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_tablespace_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_tablespace_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_tablespace_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_tablespace_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_tablespace_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_type_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_type_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_type_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_type_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_type_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "has_type_privilege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "hash_aclitem", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "aclitem"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hash_aclitem_extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "aclitem"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hash_array", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hash_array_extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hash_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hash_multirange_extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hash_numeric", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hash_numeric_extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hash_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hash_range_extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hash_record", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hash_record_extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashbpchar", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashbpcharextended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashchar", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashcharextended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "char"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashenum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashenumextended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashfloat4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashfloat4extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashfloat8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashfloat8extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashinet", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashinetextended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashint2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashint2extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashint4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashint4extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashint8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashint8extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashmacaddr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashmacaddr8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashmacaddr8extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashmacaddrextended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashname", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashnameextended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashoid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashoidextended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashoidvector", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oidvector"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashoidvectorextended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oidvector"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashtext", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashtextextended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "hashtid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tid"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "hashtidextended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tid"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "height", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "host", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "hostmask", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "in_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "index_am_handler_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "index_am_handler"}, }, { Name: "index_am_handler_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "index_am_handler"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "inet_client_addr", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "inet_client_port", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "inet_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "inet_merge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "cidr"}, }, { Name: "inet_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "inet_same_family", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "inet_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "inet_server_addr", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "inet_server_port", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "inetand", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "inetmi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "inetmi_int8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "inetnot", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "inetor", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "inetpl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "initcap", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "int2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int24div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int24eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int24ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int24gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int24le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int24lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int24mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int24mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int24ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int24pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int28div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int28eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int28ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int28gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int28le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int28lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int28mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int28mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int28ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int28pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int2_avg_accum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint[]"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint[]"}, }, { Name: "int2_avg_accum_inv", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint[]"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint[]"}, }, { Name: "int2_mul_cash", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "int2_sum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int2abs", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2and", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int2ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int2gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int2in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2int4_sum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint[]"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int2larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int2lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int2mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2mod", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int2not", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2or", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "int2pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "int2shl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2shr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2um", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2up", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int2vectorin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "int2vector"}, }, { Name: "int2vectorout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int2vector"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "int2vectorsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int2vector"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "int2xor", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "int4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int42div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int42eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int42ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int42gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int42le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int42lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int42mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int42mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int42ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int42pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int48div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int48eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int48ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int48gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int48le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int48lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int48mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int48mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int48ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int48pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int4_avg_accum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint[]"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bigint[]"}, }, { Name: "int4_avg_accum_inv", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint[]"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bigint[]"}, }, { Name: "int4_avg_combine", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint[]"}, }, { Type: &ast.TypeName{Name: "bigint[]"}, }, }, ReturnType: &ast.TypeName{Name: "bigint[]"}, }, { Name: "int4_mul_cash", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "int4_sum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int4abs", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4and", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int4ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int4gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int4in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4inc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int4lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int4mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4mod", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4multirange", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "int4multirange"}, }, { Name: "int4multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int4range"}, }, }, ReturnType: &ast.TypeName{Name: "int4multirange"}, }, { Name: "int4multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int4range[]"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "int4multirange"}, }, { Name: "int4ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int4not", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4or", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "int4pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "int4range"}, }, { Name: "int4range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int4range"}, }, { Name: "int4range_canonical", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int4range"}, }, }, ReturnType: &ast.TypeName{Name: "int4range"}, }, { Name: "int4range_subdiff", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "int4send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "int4shl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4shr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4um", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4up", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int4xor", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "int8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int82div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int82eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int82ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int82gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int82le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int82lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int82mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int82mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int82ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int82pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int84div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int84eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int84ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int84gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int84le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int84lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int84mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int84mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int84ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int84pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8_avg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint[]"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "int8_mul_cash", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "int8_sum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "int8abs", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8and", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8dec", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8dec_any", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int8ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int8gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int8in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8inc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8inc_any", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8inc_float8_float8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int8lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int8mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8mod", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8multirange", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "int8multirange"}, }, { Name: "int8multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int8range"}, }, }, ReturnType: &ast.TypeName{Name: "int8multirange"}, }, { Name: "int8multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int8range[]"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "int8multirange"}, }, { Name: "int8ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "int8not", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8or", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "int8pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8pl_inet", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "int8range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "int8range"}, }, { Name: "int8range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "int8range"}, }, { Name: "int8range_canonical", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int8range"}, }, }, ReturnType: &ast.TypeName{Name: "int8range"}, }, { Name: "int8range_subdiff", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "int8send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "int8shl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8shr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8um", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8up", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "int8xor", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "integer_pl_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "inter_lb", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "inter_sb", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "inter_sl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "interval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "interval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "interval_accum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval[]"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval[]"}, }, { Name: "interval_accum_inv", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval[]"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval[]"}, }, { Name: "interval_avg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval[]"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "interval_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "interval_combine", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval[]"}, }, { Type: &ast.TypeName{Name: "interval[]"}, }, }, ReturnType: &ast.TypeName{Name: "interval[]"}, }, { Name: "interval_div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "interval_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "interval_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "interval_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "interval_hash", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "interval_hash_extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "interval_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "interval_larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "interval_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "interval_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "interval_mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "interval_mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "interval_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "interval_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "interval_pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "interval_pl_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "interval_pl_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { Name: "interval_pl_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "interval_pl_timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "interval_pl_timetz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time with time zone"}, }, { Name: "interval_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "interval_smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "interval_um", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "intervaltypmodin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "intervaltypmodout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "is_normalized", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isclosed", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isempty", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isempty", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isfinite", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isfinite", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isfinite", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isfinite", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ishorizontal", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ishorizontal", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ishorizontal", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isopen", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isparallel", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isparallel", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isperp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isperp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isvertical", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isvertical", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "isvertical", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "json_agg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "json_array_element", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "json"}, }, { Name: "element_index", Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "json_array_element_text", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "json"}, }, { Name: "element_index", Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "json_array_elements", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "json"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "json_array_elements_text", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "json"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "json_array_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "json"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "json_build_array", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "json_build_array", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "json_build_object", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "json_build_object", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "json_each", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "json"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "json_each_text", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "json"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "json_extract_path", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "json"}, }, { Name: "path_elems", Type: &ast.TypeName{Name: "text[]"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "json_extract_path_text", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "json"}, }, { Name: "path_elems", Type: &ast.TypeName{Name: "text[]"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "json_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "json_object", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "json_object", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text[]"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "json_object_agg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "json_object_field", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "json"}, }, { Name: "field_name", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "json_object_field_text", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "json"}, }, { Name: "field_name", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "json_object_keys", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "json"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "json_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "json"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "json_populate_record", Args: []*catalog.Argument{ { Name: "base", Type: &ast.TypeName{Name: "anyelement"}, }, { Name: "from_json", Type: &ast.TypeName{Name: "json"}, }, { Name: "use_json_as_text", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "json_populate_recordset", Args: []*catalog.Argument{ { Name: "base", Type: &ast.TypeName{Name: "anyelement"}, }, { Name: "from_json", Type: &ast.TypeName{Name: "json"}, }, { Name: "use_json_as_text", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "json_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "json"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "json_strip_nulls", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "json"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "json_to_record", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "json"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "json_to_recordset", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "json"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "json_to_tsvector", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "json"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "json_to_tsvector", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, { Type: &ast.TypeName{Name: "json"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "json_typeof", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "json"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "jsonb_agg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_array_element", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "element_index", Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_array_element_text", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "element_index", Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "jsonb_array_elements", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_array_elements_text", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "jsonb_array_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "jsonb_build_array", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_build_array", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_build_object", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_build_object", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "jsonb_concat", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_contained", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_contains", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_delete", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_delete", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_delete", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path_elems", Type: &ast.TypeName{Name: "text[]"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_delete_path", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_each", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "jsonb_each_text", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "jsonb_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_exists", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_exists_all", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_exists_any", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_extract_path", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path_elems", Type: &ast.TypeName{Name: "text[]"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_extract_path_text", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path_elems", Type: &ast.TypeName{Name: "text[]"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "jsonb_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_hash", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "jsonb_hash_extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "jsonb_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_insert", Args: []*catalog.Argument{ { Name: "jsonb_in", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path", Type: &ast.TypeName{Name: "text[]"}, }, { Name: "replacement", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "insert_after", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_object", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_object", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text[]"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_object_agg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_object_field", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "field_name", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_object_field_text", Args: []*catalog.Argument{ { Name: "from_json", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "field_name", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "jsonb_object_keys", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "jsonb_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "jsonb_path_exists", Args: []*catalog.Argument{ { Name: "target", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path", Type: &ast.TypeName{Name: "jsonpath"}, }, { Name: "vars", HasDefault: true, Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "silent", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_path_exists_opr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "jsonpath"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_path_exists_tz", Args: []*catalog.Argument{ { Name: "target", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path", Type: &ast.TypeName{Name: "jsonpath"}, }, { Name: "vars", HasDefault: true, Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "silent", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_path_match", Args: []*catalog.Argument{ { Name: "target", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path", Type: &ast.TypeName{Name: "jsonpath"}, }, { Name: "vars", HasDefault: true, Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "silent", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_path_match_opr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "jsonpath"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_path_match_tz", Args: []*catalog.Argument{ { Name: "target", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path", Type: &ast.TypeName{Name: "jsonpath"}, }, { Name: "vars", HasDefault: true, Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "silent", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "jsonb_path_query", Args: []*catalog.Argument{ { Name: "target", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path", Type: &ast.TypeName{Name: "jsonpath"}, }, { Name: "vars", HasDefault: true, Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "silent", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_path_query_array", Args: []*catalog.Argument{ { Name: "target", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path", Type: &ast.TypeName{Name: "jsonpath"}, }, { Name: "vars", HasDefault: true, Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "silent", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_path_query_array_tz", Args: []*catalog.Argument{ { Name: "target", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path", Type: &ast.TypeName{Name: "jsonpath"}, }, { Name: "vars", HasDefault: true, Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "silent", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_path_query_first", Args: []*catalog.Argument{ { Name: "target", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path", Type: &ast.TypeName{Name: "jsonpath"}, }, { Name: "vars", HasDefault: true, Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "silent", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_path_query_first_tz", Args: []*catalog.Argument{ { Name: "target", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path", Type: &ast.TypeName{Name: "jsonpath"}, }, { Name: "vars", HasDefault: true, Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "silent", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_path_query_tz", Args: []*catalog.Argument{ { Name: "target", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path", Type: &ast.TypeName{Name: "jsonpath"}, }, { Name: "vars", HasDefault: true, Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "silent", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_populate_record", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "jsonb_populate_recordset", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "jsonb_pretty", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "jsonb_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "jsonb_set", Args: []*catalog.Argument{ { Name: "jsonb_in", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path", Type: &ast.TypeName{Name: "text[]"}, }, { Name: "replacement", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "create_if_missing", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_set_lax", Args: []*catalog.Argument{ { Name: "jsonb_in", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "path", Type: &ast.TypeName{Name: "text[]"}, }, { Name: "replacement", Type: &ast.TypeName{Name: "jsonb"}, }, { Name: "create_if_missing", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, { Name: "null_value_treatment", HasDefault: true, Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_strip_nulls", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "jsonb_to_record", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "jsonb_to_recordset", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "jsonb_to_tsvector", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "jsonb_to_tsvector", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "jsonb_typeof", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "jsonpath_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "jsonpath"}, }, { Name: "jsonpath_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonpath"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "jsonpath_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonpath"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "justify_days", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "justify_hours", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "justify_interval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "lag", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatible"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "anycompatible"}, }, }, ReturnType: &ast.TypeName{Name: "anycompatible"}, }, { Name: "lag", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "lag", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "language_handler_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "language_handler"}, }, { Name: "language_handler_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "language_handler"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "last_value", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "lastval", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "lcm", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "lcm", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "lcm", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "lead", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatible"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "anycompatible"}, }, }, ReturnType: &ast.TypeName{Name: "anycompatible"}, }, { Name: "lead", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "lead", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "left", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "like", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "like", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "like", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "like_escape", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "like_escape", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "line", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "line"}, }, { Name: "line_distance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "line_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "line_horizontal", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "line_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "line"}, }, { Name: "line_interpt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "line_intersect", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "line_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "line_parallel", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "line_perp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "line_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "line_vertical", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ln", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "ln", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "lo_close", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "lo_creat", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "lo_create", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "lo_export", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "lo_from_bytea", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "lo_get", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "lo_get", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "lo_import", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "lo_import", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "lo_lseek", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "lo_lseek64", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "lo_open", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "lo_put", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "lo_tell", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "lo_tell64", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "lo_truncate", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "lo_truncate64", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "lo_unlink", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "log", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "log", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "log", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "log10", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "log10", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "loread", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "lower", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "lower", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "lower", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "lower_inc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "lower_inc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "lower_inf", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "lower_inf", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "lowrite", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "lpad", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "lpad", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "lseg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "lseg"}, }, { Name: "lseg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "lseg"}, }, { Name: "lseg_center", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "lseg_distance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "lseg_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "lseg_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "lseg_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "lseg_horizontal", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "lseg_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "lseg"}, }, { Name: "lseg_interpt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "lseg_intersect", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "lseg_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "lseg_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "lseg_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "lseg_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "lseg_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "lseg_parallel", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "lseg_perp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "lseg_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "lseg_vertical", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ltrim", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "ltrim", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ltrim", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "macaddr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "macaddr"}, }, { Name: "macaddr8", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, }, ReturnType: &ast.TypeName{Name: "macaddr8"}, }, { Name: "macaddr8_and", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "macaddr8"}, }, { Name: "macaddr8_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "macaddr8_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "macaddr8_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "macaddr8_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "macaddr8_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "macaddr8"}, }, { Name: "macaddr8_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "macaddr8_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "macaddr8_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "macaddr8_not", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "macaddr8"}, }, { Name: "macaddr8_or", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "macaddr8"}, }, { Name: "macaddr8_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "macaddr8_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "macaddr8_set7bit", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "macaddr8"}, }, { Name: "macaddr_and", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, { Type: &ast.TypeName{Name: "macaddr"}, }, }, ReturnType: &ast.TypeName{Name: "macaddr"}, }, { Name: "macaddr_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, { Type: &ast.TypeName{Name: "macaddr"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "macaddr_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, { Type: &ast.TypeName{Name: "macaddr"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "macaddr_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, { Type: &ast.TypeName{Name: "macaddr"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "macaddr_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, { Type: &ast.TypeName{Name: "macaddr"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "macaddr_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "macaddr"}, }, { Name: "macaddr_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, { Type: &ast.TypeName{Name: "macaddr"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "macaddr_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, { Type: &ast.TypeName{Name: "macaddr"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "macaddr_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, { Type: &ast.TypeName{Name: "macaddr"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "macaddr_not", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, }, ReturnType: &ast.TypeName{Name: "macaddr"}, }, { Name: "macaddr_or", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, { Type: &ast.TypeName{Name: "macaddr"}, }, }, ReturnType: &ast.TypeName{Name: "macaddr"}, }, { Name: "macaddr_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "macaddr_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "make_date", Args: []*catalog.Argument{ { Name: "year", Type: &ast.TypeName{Name: "integer"}, }, { Name: "month", Type: &ast.TypeName{Name: "integer"}, }, { Name: "day", Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "make_interval", Args: []*catalog.Argument{ { Name: "years", HasDefault: true, Type: &ast.TypeName{Name: "integer"}, }, { Name: "months", HasDefault: true, Type: &ast.TypeName{Name: "integer"}, }, { Name: "weeks", HasDefault: true, Type: &ast.TypeName{Name: "integer"}, }, { Name: "days", HasDefault: true, Type: &ast.TypeName{Name: "integer"}, }, { Name: "hours", HasDefault: true, Type: &ast.TypeName{Name: "integer"}, }, { Name: "mins", HasDefault: true, Type: &ast.TypeName{Name: "integer"}, }, { Name: "secs", HasDefault: true, Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "make_time", Args: []*catalog.Argument{ { Name: "hour", Type: &ast.TypeName{Name: "integer"}, }, { Name: "min", Type: &ast.TypeName{Name: "integer"}, }, { Name: "sec", Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { Name: "make_timestamp", Args: []*catalog.Argument{ { Name: "year", Type: &ast.TypeName{Name: "integer"}, }, { Name: "month", Type: &ast.TypeName{Name: "integer"}, }, { Name: "mday", Type: &ast.TypeName{Name: "integer"}, }, { Name: "hour", Type: &ast.TypeName{Name: "integer"}, }, { Name: "min", Type: &ast.TypeName{Name: "integer"}, }, { Name: "sec", Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "make_timestamptz", Args: []*catalog.Argument{ { Name: "year", Type: &ast.TypeName{Name: "integer"}, }, { Name: "month", Type: &ast.TypeName{Name: "integer"}, }, { Name: "mday", Type: &ast.TypeName{Name: "integer"}, }, { Name: "hour", Type: &ast.TypeName{Name: "integer"}, }, { Name: "min", Type: &ast.TypeName{Name: "integer"}, }, { Name: "sec", Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "make_timestamptz", Args: []*catalog.Argument{ { Name: "year", Type: &ast.TypeName{Name: "integer"}, }, { Name: "month", Type: &ast.TypeName{Name: "integer"}, }, { Name: "mday", Type: &ast.TypeName{Name: "integer"}, }, { Name: "hour", Type: &ast.TypeName{Name: "integer"}, }, { Name: "min", Type: &ast.TypeName{Name: "integer"}, }, { Name: "sec", Type: &ast.TypeName{Name: "double precision"}, }, { Name: "timezone", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "makeaclitem", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "aclitem"}, }, { Name: "masklen", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "anyenum"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "character"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tid"}, }, }, ReturnType: &ast.TypeName{Name: "tid"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time with time zone"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "max", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "xid8"}, }, { Name: "md5", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "md5", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyenum"}, }, }, ReturnType: &ast.TypeName{Name: "anyenum"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "character"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tid"}, }, }, ReturnType: &ast.TypeName{Name: "tid"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time with time zone"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "min", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "xid8"}, }, { Name: "min_scale", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "mod", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "mod", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "mod", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "mod", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "smallint"}, }, { Name: "mode", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "money", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "money", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "money", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "mul_d_interval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "anymultirange"}, }, { Name: "multirange_adjacent_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_adjacent_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_after_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_after_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_before_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_before_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "multirange_contained_by_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_contained_by_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_contains_elem", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anyelement"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_contains_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_contains_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "anymultirange"}, }, { Name: "multirange_intersect", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "anymultirange"}, }, { Name: "multirange_intersect_agg_transfn", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "anymultirange"}, }, { Name: "multirange_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_minus", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "anymultirange"}, }, { Name: "multirange_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "multirange_overlaps_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_overlaps_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_overleft_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_overleft_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_overright_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_overright_range", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "multirange_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "multirange_union", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "anymultirange"}, }, { Name: "mxid_age", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "name", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "name"}, }, { Name: "name", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character varying"}, }, }, ReturnType: &ast.TypeName{Name: "name"}, }, { Name: "name", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "name"}, }, { Name: "nameconcatoid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "name"}, }, { Name: "nameeq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "nameeqtext", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "namege", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "namegetext", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "namegt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "namegttext", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "nameiclike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "nameicnlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "nameicregexeq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "nameicregexne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "namein", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "name"}, }, { Name: "namele", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "nameletext", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "namelike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "namelt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "namelttext", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "namene", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "namenetext", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "namenlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "nameout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "nameregexeq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "nameregexne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "namesend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "netmask", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "network", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "cidr"}, }, { Name: "network_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "network_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "network_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "network_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "network_larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "network_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "network_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "network_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "network_overlap", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "network_smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "network_sub", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "network_subeq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "network_sup", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "network_supeq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "nextval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "normalize", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "notlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "notlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "notlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "now", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "npoints", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "npoints", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "nth_value", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "ntile", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "num_nonnulls", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "num_nulls", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "numeric", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_abs", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_add", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "numeric_div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_div_trunc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "numeric_exp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "numeric_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "numeric_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_inc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "numeric_ln", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_log", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "numeric_mod", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "numeric_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "numeric_pl_pg_lsn", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "numeric_power", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "numeric_smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_sqrt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_sub", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_uminus", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numeric_uplus", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "numerictypmodin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "numerictypmodout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "nummultirange", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "nummultirange"}, }, { Name: "nummultirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numrange"}, }, }, ReturnType: &ast.TypeName{Name: "nummultirange"}, }, { Name: "nummultirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numrange[]"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "nummultirange"}, }, { Name: "numnode", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "numrange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numrange"}, }, { Name: "numrange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "numrange"}, }, { Name: "numrange_subdiff", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "obj_description", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "obj_description", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "octet_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "octet_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "octet_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "octet_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "oid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "oideq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "oidge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "oidgt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "oidin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "oidlarger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "oidle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "oidlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "oidne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "oidout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "oidsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "oidsmaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "oidvectoreq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oidvector"}, }, { Type: &ast.TypeName{Name: "oidvector"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "oidvectorge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oidvector"}, }, { Type: &ast.TypeName{Name: "oidvector"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "oidvectorgt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oidvector"}, }, { Type: &ast.TypeName{Name: "oidvector"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "oidvectorin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "oidvector"}, }, { Name: "oidvectorle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oidvector"}, }, { Type: &ast.TypeName{Name: "oidvector"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "oidvectorlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oidvector"}, }, { Type: &ast.TypeName{Name: "oidvector"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "oidvectorne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oidvector"}, }, { Type: &ast.TypeName{Name: "oidvector"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "oidvectorout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oidvector"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "oidvectorsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oidvector"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "oidvectortypes", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oidvector"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "on_pb", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "on_pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "on_ppath", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "on_ps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "on_sb", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "on_sl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, { Type: &ast.TypeName{Name: "line"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "overlaps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "overlaps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "overlaps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "overlaps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "overlaps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "overlaps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "overlaps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "overlaps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "overlaps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "overlaps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "overlaps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "overlaps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "overlaps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "overlay", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "overlay", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "overlay", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "overlay", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "overlay", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "overlay", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "parse_ident", Args: []*catalog.Argument{ { Name: "str", Type: &ast.TypeName{Name: "text"}, }, { Name: "strict", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "path", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "path"}, }, { Name: "path_add", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "path"}, }, { Name: "path_add_pt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "path"}, }, { Name: "path_contain_pt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "path_distance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "path_div_pt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "path"}, }, { Name: "path_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "path"}, }, { Name: "path_inter", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "path_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "path_mul_pt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "path"}, }, { Name: "path_n_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "path_n_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "path_n_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "path_n_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "path_n_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "path_npoints", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "path_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "path_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "path_sub_pt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "path"}, }, { Name: "pclose", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "path"}, }, { Name: "percent_rank", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "percent_rank", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "percentile_cont", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "percentile_cont", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "double precision[]"}, }, { Name: "percentile_cont", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "percentile_cont", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "interval[]"}, }, { Name: "percentile_disc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision[]"}, }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "percentile_disc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "pg_advisory_lock", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_advisory_lock", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_advisory_lock_shared", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_advisory_lock_shared", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_advisory_unlock", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_advisory_unlock", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_advisory_unlock_all", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_advisory_unlock_shared", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_advisory_unlock_shared", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_advisory_xact_lock", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_advisory_xact_lock", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_advisory_xact_lock_shared", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_advisory_xact_lock_shared", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_available_extension_versions", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_available_extensions", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_backend_pid", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "pg_backup_start", Args: []*catalog.Argument{ { Name: "label", Type: &ast.TypeName{Name: "text"}, }, { Name: "fast", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_backup_stop", Args: []*catalog.Argument{ { Name: "wait_for_archive", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_blocking_pids", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "pg_cancel_backend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_char_to_encoding", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "pg_client_encoding", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "name"}, }, { Name: "pg_collation_actual_version", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_collation_for", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_collation_is_visible", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_column_compression", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_column_is_updatable", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, { Type: &ast.TypeName{Name: "smallint"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_column_size", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "pg_conf_load_time", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "pg_config", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_control_checkpoint", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_control_init", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_control_recovery", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_control_system", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_conversion_is_visible", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_copy_logical_replication_slot", Args: []*catalog.Argument{ { Name: "src_slot_name", Type: &ast.TypeName{Name: "name"}, }, { Name: "dst_slot_name", Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_copy_logical_replication_slot", Args: []*catalog.Argument{ { Name: "src_slot_name", Type: &ast.TypeName{Name: "name"}, }, { Name: "dst_slot_name", Type: &ast.TypeName{Name: "name"}, }, { Name: "temporary", Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_copy_logical_replication_slot", Args: []*catalog.Argument{ { Name: "src_slot_name", Type: &ast.TypeName{Name: "name"}, }, { Name: "dst_slot_name", Type: &ast.TypeName{Name: "name"}, }, { Name: "temporary", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "plugin", Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_copy_physical_replication_slot", Args: []*catalog.Argument{ { Name: "src_slot_name", Type: &ast.TypeName{Name: "name"}, }, { Name: "dst_slot_name", Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_copy_physical_replication_slot", Args: []*catalog.Argument{ { Name: "src_slot_name", Type: &ast.TypeName{Name: "name"}, }, { Name: "dst_slot_name", Type: &ast.TypeName{Name: "name"}, }, { Name: "temporary", Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_create_logical_replication_slot", Args: []*catalog.Argument{ { Name: "slot_name", Type: &ast.TypeName{Name: "name"}, }, { Name: "plugin", Type: &ast.TypeName{Name: "name"}, }, { Name: "temporary", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, { Name: "twophase", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_create_physical_replication_slot", Args: []*catalog.Argument{ { Name: "slot_name", Type: &ast.TypeName{Name: "name"}, }, { Name: "immediately_reserve", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, { Name: "temporary", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_create_restore_point", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_current_logfile", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_current_logfile", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_current_snapshot", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "pg_snapshot"}, }, { Name: "pg_current_wal_flush_lsn", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_current_wal_insert_lsn", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_current_wal_lsn", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_current_xact_id", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "xid8"}, }, { Name: "pg_current_xact_id_if_assigned", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "xid8"}, }, { Name: "pg_cursor", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_database_collation_actual_version", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_database_size", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_database_size", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_ddl_command_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "pg_ddl_command"}, }, { Name: "pg_ddl_command_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_ddl_command"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "pg_ddl_command_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_ddl_command"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pg_dependencies_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "pg_dependencies"}, }, { Name: "pg_dependencies_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_dependencies"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "pg_dependencies_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_dependencies"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pg_describe_object", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_drop_replication_slot", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_encoding_max_length", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "pg_encoding_to_char", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "name"}, }, { Name: "pg_event_trigger_ddl_commands", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_event_trigger_dropped_objects", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_event_trigger_table_rewrite_oid", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "pg_event_trigger_table_rewrite_reason", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "pg_export_snapshot", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_extension_config_dump", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_extension_update_paths", Args: []*catalog.Argument{ { Name: "name", Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_filenode_relation", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "regclass"}, }, { Name: "pg_function_is_visible", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_get_backend_memory_contexts", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_get_catalog_foreign_keys", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_get_constraintdef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_constraintdef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_expr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_node_tree"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_expr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_node_tree"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_function_arg_default", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_function_arguments", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_function_identity_arguments", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_function_result", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_function_sqlbody", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_functiondef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_indexdef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_indexdef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_keywords", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_get_multixact_members", Args: []*catalog.Argument{ { Name: "multixid", Type: &ast.TypeName{Name: "xid"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_get_object_address", Args: []*catalog.Argument{ { Name: "type", Type: &ast.TypeName{Name: "text"}, }, { Name: "object_names", Type: &ast.TypeName{Name: "text[]"}, }, { Name: "object_args", Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_get_partition_constraintdef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_partkeydef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_publication_tables", Args: []*catalog.Argument{ { Name: "pubname", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_get_replica_identity_index", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "regclass"}, }, { Name: "pg_get_replication_slots", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_get_ruledef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_ruledef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_serial_sequence", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_shmem_allocations", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_get_statisticsobjdef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_statisticsobjdef_columns", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_statisticsobjdef_expressions", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "pg_get_triggerdef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_triggerdef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_userbyid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "name"}, }, { Name: "pg_get_viewdef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_viewdef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_viewdef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_viewdef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_viewdef", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_wal_replay_pause_state", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_get_wal_resource_managers", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_has_role", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_has_role", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_has_role", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_has_role", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_has_role", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_has_role", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_hba_file_rules", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_ident_file_mappings", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_identify_object", Args: []*catalog.Argument{ { Name: "classid", Type: &ast.TypeName{Name: "oid"}, }, { Name: "objid", Type: &ast.TypeName{Name: "oid"}, }, { Name: "objsubid", Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_identify_object_as_address", Args: []*catalog.Argument{ { Name: "classid", Type: &ast.TypeName{Name: "oid"}, }, { Name: "objid", Type: &ast.TypeName{Name: "oid"}, }, { Name: "objsubid", Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_import_system_collations", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regnamespace"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "pg_index_column_has_property", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_index_has_property", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_indexam_has_property", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_indexam_progress_phasename", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_indexes_size", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_is_in_recovery", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_is_other_temp_schema", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_is_wal_replay_paused", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_isolation_test_session_is_blocked", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_jit_available", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_last_committed_xact", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_last_wal_receive_lsn", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_last_wal_replay_lsn", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_last_xact_replay_timestamp", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "pg_listening_channels", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_lock_status", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_log_backend_memory_contexts", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_logical_emit_message", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_logical_emit_message", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_logical_slot_get_binary_changes", Args: []*catalog.Argument{ { Name: "slot_name", Type: &ast.TypeName{Name: "name"}, }, { Name: "upto_lsn", Type: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "upto_nchanges", Type: &ast.TypeName{Name: "integer"}, }, { Name: "options", HasDefault: true, Type: &ast.TypeName{Name: "text[]"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_logical_slot_get_changes", Args: []*catalog.Argument{ { Name: "slot_name", Type: &ast.TypeName{Name: "name"}, }, { Name: "upto_lsn", Type: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "upto_nchanges", Type: &ast.TypeName{Name: "integer"}, }, { Name: "options", HasDefault: true, Type: &ast.TypeName{Name: "text[]"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_logical_slot_peek_binary_changes", Args: []*catalog.Argument{ { Name: "slot_name", Type: &ast.TypeName{Name: "name"}, }, { Name: "upto_lsn", Type: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "upto_nchanges", Type: &ast.TypeName{Name: "integer"}, }, { Name: "options", HasDefault: true, Type: &ast.TypeName{Name: "text[]"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_logical_slot_peek_changes", Args: []*catalog.Argument{ { Name: "slot_name", Type: &ast.TypeName{Name: "name"}, }, { Name: "upto_lsn", Type: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "upto_nchanges", Type: &ast.TypeName{Name: "integer"}, }, { Name: "options", HasDefault: true, Type: &ast.TypeName{Name: "text[]"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_ls_archive_statusdir", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_ls_dir", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_ls_dir", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_ls_logdir", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_ls_logicalmapdir", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_ls_logicalsnapdir", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_ls_replslotdir", Args: []*catalog.Argument{ { Name: "slot_name", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_ls_tmpdir", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_ls_tmpdir", Args: []*catalog.Argument{ { Name: "tablespace", Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_ls_waldir", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_lsn", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_lsn_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "pg_lsn_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_lsn_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_lsn_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_lsn_hash", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "pg_lsn_hash_extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_lsn_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_lsn_larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_lsn_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_lsn_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_lsn_mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "pg_lsn_mii", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_lsn_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_lsn_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "pg_lsn_pli", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_lsn_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pg_lsn_smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_mcv_list_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "pg_mcv_list"}, }, { Name: "pg_mcv_list_items", Args: []*catalog.Argument{ { Name: "mcv_list", Type: &ast.TypeName{Name: "pg_mcv_list"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_mcv_list_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_mcv_list"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "pg_mcv_list_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_mcv_list"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pg_my_temp_schema", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "pg_ndistinct_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "pg_ndistinct"}, }, { Name: "pg_ndistinct_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_ndistinct"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "pg_ndistinct_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_ndistinct"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pg_nextoid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, { Type: &ast.TypeName{Name: "name"}, }, { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "pg_node_tree_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "pg_node_tree"}, }, { Name: "pg_node_tree_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_node_tree"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "pg_node_tree_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_node_tree"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pg_notification_queue_usage", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "pg_notify", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_opclass_is_visible", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_operator_is_visible", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_opfamily_is_visible", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_options_to_table", Args: []*catalog.Argument{ { Name: "options_array", Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_partition_ancestors", Args: []*catalog.Argument{ { Name: "partitionid", Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "regclass"}, }, { Name: "pg_partition_root", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "regclass"}, }, { Name: "pg_partition_tree", Args: []*catalog.Argument{ { Name: "rootrelid", Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_postmaster_start_time", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "pg_prepared_statement", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_prepared_xact", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_promote", Args: []*catalog.Argument{ { Name: "wait", HasDefault: true, Type: &ast.TypeName{Name: "boolean"}, }, { Name: "wait_seconds", HasDefault: true, Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_read_binary_file", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pg_read_binary_file", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pg_read_binary_file", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pg_read_file", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_read_file", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_read_file", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_read_file_old", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_relation_filenode", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "pg_relation_filepath", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_relation_is_publishable", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_relation_is_updatable", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "pg_relation_size", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_relation_size", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_reload_conf", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_replication_origin_advance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_replication_origin_create", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "pg_replication_origin_drop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_replication_origin_oid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "pg_replication_origin_progress", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_replication_origin_session_is_setup", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_replication_origin_session_progress", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_replication_origin_session_reset", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_replication_origin_session_setup", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_replication_origin_xact_reset", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_replication_origin_xact_setup", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_replication_slot_advance", Args: []*catalog.Argument{ { Name: "slot_name", Type: &ast.TypeName{Name: "name"}, }, { Name: "upto_lsn", Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_rotate_logfile", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_rotate_logfile_old", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_safe_snapshot_blocking_pids", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer[]"}, }, { Name: "pg_sequence_last_value", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_sequence_parameters", Args: []*catalog.Argument{ { Name: "sequence_oid", Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_settings_get_flags", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "pg_show_all_file_settings", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_show_all_settings", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_show_replication_origin_status", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_size_bytes", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_size_pretty", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_size_pretty", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_sleep", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_sleep_for", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_sleep_until", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_snapshot_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "pg_snapshot"}, }, { Name: "pg_snapshot_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_snapshot"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "pg_snapshot_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_snapshot"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "pg_snapshot_xip", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_snapshot"}, }, }, ReturnType: &ast.TypeName{Name: "xid8"}, }, { Name: "pg_snapshot_xmax", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_snapshot"}, }, }, ReturnType: &ast.TypeName{Name: "xid8"}, }, { Name: "pg_snapshot_xmin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_snapshot"}, }, }, ReturnType: &ast.TypeName{Name: "xid8"}, }, { Name: "pg_stat_clear_snapshot", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_stat_file", Args: []*catalog.Argument{ { Name: "filename", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_stat_file", Args: []*catalog.Argument{ { Name: "filename", Type: &ast.TypeName{Name: "text"}, }, { Name: "missing_ok", Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_stat_force_next_flush", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_stat_get_activity", Args: []*catalog.Argument{ { Name: "pid", Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_stat_get_analyze_count", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_archiver", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_stat_get_autoanalyze_count", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_autovacuum_count", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_backend_activity", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_stat_get_backend_activity_start", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "pg_stat_get_backend_client_addr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "pg_stat_get_backend_client_port", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "pg_stat_get_backend_dbid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "pg_stat_get_backend_idset", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "pg_stat_get_backend_pid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "pg_stat_get_backend_start", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "pg_stat_get_backend_userid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "pg_stat_get_backend_wait_event", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_stat_get_backend_wait_event_type", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_stat_get_backend_xact_start", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "pg_stat_get_bgwriter_buf_written_checkpoints", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_bgwriter_buf_written_clean", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_bgwriter_maxwritten_clean", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_bgwriter_requested_checkpoints", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_bgwriter_stat_reset_time", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "pg_stat_get_bgwriter_timed_checkpoints", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_blocks_fetched", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_blocks_hit", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_buf_alloc", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_buf_fsync_backend", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_buf_written_backend", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_checkpoint_sync_time", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "pg_stat_get_checkpoint_write_time", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "pg_stat_get_db_active_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "pg_stat_get_db_blk_read_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "pg_stat_get_db_blk_write_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "pg_stat_get_db_blocks_fetched", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_blocks_hit", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_checksum_failures", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_checksum_last_failure", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "pg_stat_get_db_conflict_all", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_conflict_bufferpin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_conflict_lock", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_conflict_snapshot", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_conflict_startup_deadlock", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_conflict_tablespace", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_deadlocks", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_idle_in_transaction_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "pg_stat_get_db_numbackends", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "pg_stat_get_db_session_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "pg_stat_get_db_sessions", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_sessions_abandoned", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_sessions_fatal", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_sessions_killed", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_stat_reset_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "pg_stat_get_db_temp_bytes", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_temp_files", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_tuples_deleted", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_tuples_fetched", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_tuples_inserted", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_tuples_returned", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_tuples_updated", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_xact_commit", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_db_xact_rollback", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_dead_tuples", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_function_calls", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_function_self_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "pg_stat_get_function_total_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "pg_stat_get_ins_since_vacuum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_last_analyze_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "pg_stat_get_last_autoanalyze_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "pg_stat_get_last_autovacuum_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "pg_stat_get_last_vacuum_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "pg_stat_get_live_tuples", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_mod_since_analyze", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_numscans", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_progress_info", Args: []*catalog.Argument{ { Name: "cmdtype", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_stat_get_recovery_prefetch", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_stat_get_replication_slot", Args: []*catalog.Argument{ { Name: "slot_name", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_stat_get_slru", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_stat_get_snapshot_timestamp", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "pg_stat_get_subscription", Args: []*catalog.Argument{ { Name: "subid", Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_stat_get_subscription_stats", Args: []*catalog.Argument{ { Name: "subid", Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_stat_get_tuples_deleted", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_tuples_fetched", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_tuples_hot_updated", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_tuples_inserted", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_tuples_returned", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_tuples_updated", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_vacuum_count", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_wal", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_stat_get_wal_receiver", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_stat_get_wal_senders", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_stat_get_xact_blocks_fetched", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_xact_blocks_hit", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_xact_function_calls", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_xact_function_self_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "pg_stat_get_xact_function_total_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "pg_stat_get_xact_numscans", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_xact_tuples_deleted", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_xact_tuples_fetched", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_xact_tuples_hot_updated", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_xact_tuples_inserted", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_xact_tuples_returned", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_get_xact_tuples_updated", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_stat_have_stats", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_stat_reset", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_stat_reset_replication_slot", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_stat_reset_shared", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_stat_reset_single_function_counters", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_stat_reset_single_table_counters", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_stat_reset_slru", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_stat_reset_subscription_stats", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_statistics_obj_is_visible", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_stop_making_pinned_objects", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_switch_wal", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "pg_lsn"}, }, { Name: "pg_table_is_visible", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_table_size", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_tablespace_databases", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "oid"}, }, { Name: "pg_tablespace_location", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_tablespace_size", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_tablespace_size", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_terminate_backend", Args: []*catalog.Argument{ { Name: "pid", Type: &ast.TypeName{Name: "integer"}, }, { Name: "timeout", HasDefault: true, Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_timezone_abbrevs", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_timezone_names", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_total_relation_size", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "pg_trigger_depth", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "pg_try_advisory_lock", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_try_advisory_lock", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_try_advisory_lock_shared", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_try_advisory_lock_shared", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_try_advisory_xact_lock", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_try_advisory_xact_lock", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_try_advisory_xact_lock_shared", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_try_advisory_xact_lock_shared", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_ts_config_is_visible", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_ts_dict_is_visible", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_ts_parser_is_visible", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_ts_template_is_visible", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_type_is_visible", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_typeof", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "regtype"}, }, { Name: "pg_visible_in_snapshot", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, { Type: &ast.TypeName{Name: "pg_snapshot"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pg_wal_lsn_diff", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "pg_wal_replay_pause", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_wal_replay_resume", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "pg_walfile_name", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "pg_walfile_name_offset", Args: []*catalog.Argument{ { Name: "lsn", Type: &ast.TypeName{Name: "pg_lsn"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_xact_commit_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "pg_xact_commit_timestamp_origin", Args: []*catalog.Argument{ { Name: "xid", Type: &ast.TypeName{Name: "xid"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "pg_xact_status", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "phraseto_tsquery", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "phraseto_tsquery", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "pi", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "plainto_tsquery", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "plainto_tsquery", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "plpgsql_call_handler", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "language_handler"}, }, { Name: "plpgsql_validator", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "point", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "point", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "point", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "point", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "lseg"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "point", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "point_above", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "point_add", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "point_below", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "point_distance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "point_div", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "point_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "point_horiz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "point_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "point_left", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "point_mul", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "point_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "point_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "point_right", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "point_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "point_sub", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "point_vert", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "poly_above", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "poly_below", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "poly_center", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "point"}, }, { Name: "poly_contain", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "poly_contain_pt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "poly_contained", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "poly_distance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "poly_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "polygon"}, }, { Name: "poly_left", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "poly_npoints", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "poly_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "poly_overabove", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "poly_overbelow", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "poly_overlap", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "poly_overleft", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "poly_overright", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "poly_right", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "poly_same", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "poly_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "polygon", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "polygon"}, }, { Name: "polygon", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "polygon"}, }, { Name: "polygon", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "polygon"}, }, { Name: "polygon", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "polygon"}, }, { Name: "popen", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "path"}, }, }, ReturnType: &ast.TypeName{Name: "path"}, }, { Name: "position", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "bit"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "position", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "position", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "postgresql_fdw_validator", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text[]"}, }, { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pow", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "pow", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "power", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "power", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "pt_contained_circle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "pt_contained_poly", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "query_to_xml", Args: []*catalog.Argument{ { Name: "query", Type: &ast.TypeName{Name: "text"}, }, { Name: "nulls", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "tableforest", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "targetns", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "query_to_xml_and_xmlschema", Args: []*catalog.Argument{ { Name: "query", Type: &ast.TypeName{Name: "text"}, }, { Name: "nulls", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "tableforest", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "targetns", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "query_to_xmlschema", Args: []*catalog.Argument{ { Name: "query", Type: &ast.TypeName{Name: "text"}, }, { Name: "nulls", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "tableforest", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "targetns", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "querytree", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "quote_ident", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "quote_literal", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "quote_literal", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "quote_nullable", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "quote_nullable", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "radians", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "radius", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "circle"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "random", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "range_adjacent", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_adjacent_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_after", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_after_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_agg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "anymultirange"}, }, { Name: "range_agg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "anymultirange"}, }, { Name: "range_before", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_before_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "range_contained_by", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_contained_by_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_contains", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_contains_elem", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyelement"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_contains_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "anyrange"}, }, { Name: "range_intersect", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "anyrange"}, }, { Name: "range_intersect_agg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "anymultirange"}, }, { Name: "range_intersect_agg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "anyrange"}, }, { Name: "range_intersect_agg_transfn", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "anyrange"}, }, { Name: "range_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_merge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "anyrange"}, }, { Name: "range_merge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "anyrange"}, }, { Name: "range_minus", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "anyrange"}, }, { Name: "range_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "range_overlaps", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_overlaps_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_overleft", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_overleft_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_overright", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_overright_multirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "range_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "range_union", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "anyrange"}, }, { Name: "rank", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "rank", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "record_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "record_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "record_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "record_image_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "record_image_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "record_image_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "record_image_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "record_image_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "record_image_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "record_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "record_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "record_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "record_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "record_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "record_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "regclass", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "regclass"}, }, { Name: "regclassin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "regclass"}, }, { Name: "regclassout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "regclasssend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "regcollationin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "regcollation"}, }, { Name: "regcollationout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regcollation"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "regcollationsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regcollation"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "regconfigin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "regconfig"}, }, { Name: "regconfigout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "regconfigsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "regdictionaryin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "regdictionary"}, }, { Name: "regdictionaryout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regdictionary"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "regdictionarysend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regdictionary"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "regexp_count", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "regexp_count", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "regexp_count", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "regexp_instr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "regexp_instr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "regexp_instr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "regexp_instr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "regexp_instr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "regexp_instr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "regexp_like", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "regexp_like", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "regexp_match", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "regexp_match", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "regexp_matches", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "regexp_matches", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "regexp_replace", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "regexp_replace", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "regexp_replace", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "regexp_replace", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "regexp_replace", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "regexp_split_to_array", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "regexp_split_to_array", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "regexp_split_to_table", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "regexp_split_to_table", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "regexp_substr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "regexp_substr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "regexp_substr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "regexp_substr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "regexp_substr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "regnamespacein", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "regnamespace"}, }, { Name: "regnamespaceout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regnamespace"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "regnamespacesend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regnamespace"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "regoperatorin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "regoperator"}, }, { Name: "regoperatorout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regoperator"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "regoperatorsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regoperator"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "regoperin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "regoper"}, }, { Name: "regoperout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regoper"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "regopersend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regoper"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "regprocedurein", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "regprocedure"}, }, { Name: "regprocedureout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regprocedure"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "regproceduresend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regprocedure"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "regprocin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "regproc"}, }, { Name: "regprocout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regproc"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "regprocsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regproc"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "regr_avgx", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "regr_avgy", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "regr_count", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "regr_intercept", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "regr_r2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "regr_slope", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "regr_sxx", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "regr_sxy", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "regr_syy", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "regrolein", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "regrole"}, }, { Name: "regroleout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regrole"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "regrolesend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regrole"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "regtypein", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "regtype"}, }, { Name: "regtypeout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regtype"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "regtypesend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regtype"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "repeat", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "replace", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "reverse", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "right", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "round", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "round", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "round", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "row_number", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "row_security_active", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "row_security_active", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "row_to_json", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "row_to_json", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "record"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "rpad", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "rpad", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "rtrim", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "rtrim", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "rtrim", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "satisfies_hash_partition", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "scale", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "schema_to_xml", Args: []*catalog.Argument{ { Name: "schema", Type: &ast.TypeName{Name: "name"}, }, { Name: "nulls", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "tableforest", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "targetns", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "schema_to_xml_and_xmlschema", Args: []*catalog.Argument{ { Name: "schema", Type: &ast.TypeName{Name: "name"}, }, { Name: "nulls", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "tableforest", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "targetns", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "schema_to_xmlschema", Args: []*catalog.Argument{ { Name: "schema", Type: &ast.TypeName{Name: "name"}, }, { Name: "nulls", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "tableforest", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "targetns", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "session_user", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "name"}, }, { Name: "set_bit", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "set_bit", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "set_byte", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "set_config", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "set_masklen", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cidr"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "cidr"}, }, { Name: "set_masklen", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "inet"}, }, { Name: "setseed", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "setval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "setval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regclass"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "setweight", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "setweight", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "char"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "sha224", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "sha256", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "sha384", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "sha512", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "shell_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "shell_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "void"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "shobj_description", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "sign", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "sign", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "similar_escape", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "similar_to_escape", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "similar_to_escape", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "sin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "sind", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "sinh", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "slope", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "point"}, }, { Type: &ast.TypeName{Name: "point"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "spg_poly_quad_compress", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "polygon"}, }, }, ReturnType: &ast.TypeName{Name: "box"}, }, { Name: "split_part", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "sqrt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "sqrt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "starts_with", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "statement_timestamp", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "stddev", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "stddev", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "stddev", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "stddev", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "stddev", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "stddev", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "stddev_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "stddev_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "stddev_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "stddev_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "stddev_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "stddev_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "stddev_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "stddev_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "stddev_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "stddev_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "stddev_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "stddev_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "string_agg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "bytea"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "string_agg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "string_to_array", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "string_to_array", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "string_to_table", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "string_to_table", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "strip", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "strpos", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "substr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "substr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "substr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "substr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "substring", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "substring", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bit"}, }, { Name: "substring", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "substring", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bytea"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "substring", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "substring", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "substring", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "substring", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "sum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "sum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "sum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "sum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "sum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "money"}, }, }, ReturnType: &ast.TypeName{Name: "money"}, }, { Name: "sum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "sum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "sum", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "suppress_redundant_updates_trigger", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "table_am_handler_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "table_am_handler"}, }, { Name: "table_am_handler_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "table_am_handler"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "table_to_xml", Args: []*catalog.Argument{ { Name: "tbl", Type: &ast.TypeName{Name: "regclass"}, }, { Name: "nulls", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "tableforest", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "targetns", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "table_to_xml_and_xmlschema", Args: []*catalog.Argument{ { Name: "tbl", Type: &ast.TypeName{Name: "regclass"}, }, { Name: "nulls", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "tableforest", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "targetns", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "table_to_xmlschema", Args: []*catalog.Argument{ { Name: "tbl", Type: &ast.TypeName{Name: "regclass"}, }, { Name: "nulls", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "tableforest", Type: &ast.TypeName{Name: "boolean"}, }, { Name: "targetns", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "tan", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "tand", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "tanh", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "text", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "char"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "text", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "text", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "text", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "inet"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "text", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "text", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xml"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "text_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "text_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "text_larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "text_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "text_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "text_pattern_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "text_pattern_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "text_pattern_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "text_pattern_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "text_smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "textanycat", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "anynonarray"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "textcat", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "texteq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "texteqname", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "textgename", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "textgtname", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "texticlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "texticnlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "texticregexeq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "texticregexne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "textin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "textlen", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "textlename", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "textlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "textltname", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "textne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "textnename", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "textnlike", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "textout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "textregexeq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "textregexne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "textsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "tideq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tid"}, }, { Type: &ast.TypeName{Name: "tid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tidge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tid"}, }, { Type: &ast.TypeName{Name: "tid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tidgt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tid"}, }, { Type: &ast.TypeName{Name: "tid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tidin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "tid"}, }, { Name: "tidlarger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tid"}, }, { Type: &ast.TypeName{Name: "tid"}, }, }, ReturnType: &ast.TypeName{Name: "tid"}, }, { Name: "tidle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tid"}, }, { Type: &ast.TypeName{Name: "tid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tidlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tid"}, }, { Type: &ast.TypeName{Name: "tid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tidne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tid"}, }, { Type: &ast.TypeName{Name: "tid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tidout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tid"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "tidsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tid"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "tidsmaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tid"}, }, { Type: &ast.TypeName{Name: "tid"}, }, }, ReturnType: &ast.TypeName{Name: "tid"}, }, { Name: "time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { Name: "time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { Name: "time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { Name: "time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { Name: "time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { Name: "time_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "time_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "time_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "time_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "time_hash", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "time_hash_extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "time_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { Name: "time_larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { Name: "time_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "time_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "time_mi_interval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { Name: "time_mi_time", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "time_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "time_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "time_pl_interval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { Name: "time_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "time_smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time without time zone"}, }, { Name: "timedate_pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "timeofday", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "timestamp_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "timestamp_cmp_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "timestamp_cmp_timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "timestamp_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_eq_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_eq_timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_ge_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_ge_timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_gt_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_gt_timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_hash", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "timestamp_hash_extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "timestamp_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "timestamp_larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "timestamp_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_le_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_le_timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_lt_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_lt_timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "timestamp_mi_interval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "timestamp_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_ne_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_ne_timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamp_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "timestamp_pl_interval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "timestamp_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "timestamp_smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "timestamptypmodin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "timestamptypmodout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "date"}, }, { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "timestamptz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "timestamptz_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "timestamptz_cmp_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "timestamptz_cmp_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "timestamptz_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_eq_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_eq_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_ge_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_ge_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_gt_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_gt_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "timestamptz_larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "timestamptz_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_le_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_le_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_lt_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_lt_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_mi", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "interval"}, }, { Name: "timestamptz_mi_interval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "timestamptz_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_ne_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_ne_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timestamptz_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "timestamptz_pl_interval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "timestamptz_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "timestamptz_smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "timestamptztypmodin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "timestamptztypmodout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "timetypmodin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "timetypmodout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "timetz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "time with time zone"}, }, { Name: "timetz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time with time zone"}, }, { Name: "timetz", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time with time zone"}, }, { Name: "timetz_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "timetz_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timetz_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timetz_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timetz_hash", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "timetz_hash_extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "timetz_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "time with time zone"}, }, { Name: "timetz_larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time with time zone"}, }, { Name: "timetz_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timetz_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timetz_mi_interval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "time with time zone"}, }, { Name: "timetz_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "timetz_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "timetz_pl_interval", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "interval"}, }, }, ReturnType: &ast.TypeName{Name: "time with time zone"}, }, { Name: "timetz_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "timetz_smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time with time zone"}, }, { Name: "timetzdate_pl", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "time with time zone"}, }, { Type: &ast.TypeName{Name: "date"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "timetztypmodin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "timetztypmodout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "timezone", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time with time zone"}, }, { Name: "timezone", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "time with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "time with time zone"}, }, { Name: "timezone", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "timezone", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "timezone", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "timezone", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp without time zone"}, }, { Name: "to_ascii", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "to_ascii", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "to_ascii", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "to_char", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "to_char", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "to_char", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "to_char", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "interval"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "to_char", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "to_char", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "to_char", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "to_char", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "to_date", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "date"}, }, { Name: "to_hex", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "to_hex", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "to_json", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "to_jsonb", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyelement"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "to_number", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "to_regclass", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "regclass"}, }, { Name: "to_regcollation", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "regcollation"}, }, { Name: "to_regnamespace", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "regnamespace"}, }, { Name: "to_regoper", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "regoper"}, }, { Name: "to_regoperator", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "regoperator"}, }, { Name: "to_regproc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "regproc"}, }, { Name: "to_regprocedure", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "regprocedure"}, }, { Name: "to_regrole", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "regrole"}, }, { Name: "to_regtype", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "regtype"}, }, { Name: "to_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "to_timestamp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "to_tsquery", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "to_tsquery", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "to_tsvector", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "json"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "to_tsvector", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "to_tsvector", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, { Type: &ast.TypeName{Name: "json"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "to_tsvector", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "to_tsvector", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "to_tsvector", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "transaction_timestamp", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "timestamp with time zone"}, }, { Name: "translate", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "trigger_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "trigger_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "trigger"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "trim_array", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "anyarray"}, }, { Name: "trim_scale", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "trunc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "trunc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr"}, }, }, ReturnType: &ast.TypeName{Name: "macaddr"}, }, { Name: "trunc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "macaddr8"}, }, }, ReturnType: &ast.TypeName{Name: "macaddr8"}, }, { Name: "trunc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "trunc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "ts_debug", Args: []*catalog.Argument{ { Name: "config", Type: &ast.TypeName{Name: "regconfig"}, }, { Name: "document", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "ts_debug", Args: []*catalog.Argument{ { Name: "document", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "ts_delete", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "ts_delete", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "ts_filter", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "char[]"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "json"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "json"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, { Type: &ast.TypeName{Name: "json"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, { Type: &ast.TypeName{Name: "json"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "json"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, { Type: &ast.TypeName{Name: "jsonb"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "jsonb"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ts_headline", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ts_lexize", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regdictionary"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "ts_match_qv", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ts_match_tq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ts_match_tt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ts_match_vq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "ts_parse", Args: []*catalog.Argument{ { Name: "parser_oid", Type: &ast.TypeName{Name: "oid"}, }, { Name: "txt", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "ts_parse", Args: []*catalog.Argument{ { Name: "parser_name", Type: &ast.TypeName{Name: "text"}, }, { Name: "txt", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "ts_rank", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real[]"}, }, { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ts_rank", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real[]"}, }, { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ts_rank", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ts_rank", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ts_rank_cd", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real[]"}, }, { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ts_rank_cd", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real[]"}, }, { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ts_rank_cd", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ts_rank_cd", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ts_rewrite", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "ts_rewrite", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "ts_stat", Args: []*catalog.Argument{ { Name: "query", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "ts_stat", Args: []*catalog.Argument{ { Name: "query", Type: &ast.TypeName{Name: "text"}, }, { Name: "weights", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "ts_token_type", Args: []*catalog.Argument{ { Name: "parser_oid", Type: &ast.TypeName{Name: "oid"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "ts_token_type", Args: []*catalog.Argument{ { Name: "parser_name", Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "tsm_handler_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "tsm_handler"}, }, { Name: "tsm_handler_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsm_handler"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "tsmultirange", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "tsmultirange"}, }, { Name: "tsmultirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsrange"}, }, }, ReturnType: &ast.TypeName{Name: "tsmultirange"}, }, { Name: "tsmultirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsrange[]"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "tsmultirange"}, }, { Name: "tsq_mcontained", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tsq_mcontains", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tsquery_and", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "tsquery_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "tsquery_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tsquery_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tsquery_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tsquery_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tsquery_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tsquery_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tsquery_not", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "tsquery_or", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "tsquery_phrase", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "tsquery_phrase", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "tsquery"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "tsqueryin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "tsqueryout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "tsquerysend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsquery"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "tsrange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "tsrange"}, }, { Name: "tsrange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tsrange"}, }, { Name: "tsrange_subdiff", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, { Type: &ast.TypeName{Name: "timestamp without time zone"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "tstzmultirange", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "tstzmultirange"}, }, { Name: "tstzmultirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tstzrange"}, }, }, ReturnType: &ast.TypeName{Name: "tstzmultirange"}, }, { Name: "tstzmultirange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tstzrange[]"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "tstzmultirange"}, }, { Name: "tstzrange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "tstzrange"}, }, { Name: "tstzrange", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tstzrange"}, }, { Name: "tstzrange_subdiff", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, { Type: &ast.TypeName{Name: "timestamp with time zone"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "tsvector_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "tsvector_concat", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "tsvector_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tsvector_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tsvector_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tsvector_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tsvector_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tsvector_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, { Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "tsvector_to_array", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "text[]"}, }, { Name: "tsvector_update_trigger", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "tsvector_update_trigger_column", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "tsvectorin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "tsvector"}, }, { Name: "tsvectorout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "tsvectorsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "txid_current", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "txid_current_if_assigned", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "txid_current_snapshot", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "txid_snapshot"}, }, { Name: "txid_snapshot_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "txid_snapshot"}, }, { Name: "txid_snapshot_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "txid_snapshot"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "txid_snapshot_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "txid_snapshot"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "txid_snapshot_xip", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "txid_snapshot"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "txid_snapshot_xmax", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "txid_snapshot"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "txid_snapshot_xmin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "txid_snapshot"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "txid_status", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "txid_visible_in_snapshot", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, { Type: &ast.TypeName{Name: "txid_snapshot"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "unique_key_recheck", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "trigger"}, }, { Name: "unistr", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "unknownin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "unknown"}, }, { Name: "unknownout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "unknown"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "unknownsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "unknown"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "unnest", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyarray"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "unnest", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "anyrange"}, }, { Name: "unnest", Args: []*catalog.Argument{ { Name: "tsvector", Type: &ast.TypeName{Name: "tsvector"}, }, }, ReturnType: &ast.TypeName{Name: "record"}, }, { Name: "upper", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "upper", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "anyelement"}, }, { Name: "upper", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "upper_inc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "upper_inc", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "upper_inf", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anymultirange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "upper_inf", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anyrange"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "uuid_cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "uuid"}, }, { Type: &ast.TypeName{Name: "uuid"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "uuid_eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "uuid"}, }, { Type: &ast.TypeName{Name: "uuid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "uuid_ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "uuid"}, }, { Type: &ast.TypeName{Name: "uuid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "uuid_gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "uuid"}, }, { Type: &ast.TypeName{Name: "uuid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "uuid_hash", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "uuid"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "uuid_hash_extended", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "uuid"}, }, { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "bigint"}, }, { Name: "uuid_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "uuid"}, }, { Name: "uuid_le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "uuid"}, }, { Type: &ast.TypeName{Name: "uuid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "uuid_lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "uuid"}, }, { Type: &ast.TypeName{Name: "uuid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "uuid_ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "uuid"}, }, { Type: &ast.TypeName{Name: "uuid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "uuid_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "uuid"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "uuid_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "uuid"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "var_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "var_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "var_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "var_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "var_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "var_pop", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "var_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "var_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "var_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "var_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "var_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "var_samp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "varbit", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit varying"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "bit varying"}, }, { Name: "varbit_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "bit varying"}, }, { Name: "varbit_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit varying"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "varbit_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit varying"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "varbitcmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit varying"}, }, { Type: &ast.TypeName{Name: "bit varying"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "varbiteq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit varying"}, }, { Type: &ast.TypeName{Name: "bit varying"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "varbitge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit varying"}, }, { Type: &ast.TypeName{Name: "bit varying"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "varbitgt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit varying"}, }, { Type: &ast.TypeName{Name: "bit varying"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "varbitle", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit varying"}, }, { Type: &ast.TypeName{Name: "bit varying"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "varbitlt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit varying"}, }, { Type: &ast.TypeName{Name: "bit varying"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "varbitne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bit varying"}, }, { Type: &ast.TypeName{Name: "bit varying"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "varbittypmodin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "varbittypmodout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "varchar", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character varying"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "boolean"}, }, }, ReturnType: &ast.TypeName{Name: "character varying"}, }, { Name: "varchar", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "name"}, }, }, ReturnType: &ast.TypeName{Name: "character varying"}, }, { Name: "varcharin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, { Type: &ast.TypeName{Name: "oid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "character varying"}, }, { Name: "varcharout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character varying"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "varcharsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "character varying"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "varchartypmodin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring[]"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "varchartypmodout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "variance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "variance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "variance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "bigint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "variance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "variance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "variance", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "smallint"}, }, }, ReturnType: &ast.TypeName{Name: "numeric"}, }, { Name: "version", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "void_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "void"}, }, { Name: "void_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "void"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "void_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "void"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "websearch_to_tsquery", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "regconfig"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "websearch_to_tsquery", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "tsquery"}, }, { Name: "width", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "box"}, }, }, ReturnType: &ast.TypeName{Name: "double precision"}, }, { Name: "width_bucket", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "anycompatible"}, }, { Type: &ast.TypeName{Name: "anycompatiblearray"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "width_bucket", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "double precision"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "width_bucket", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "numeric"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "xid", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "xid"}, }, { Name: "xid8_larger", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, { Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "xid8"}, }, { Name: "xid8_smaller", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, { Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "xid8"}, }, { Name: "xid8cmp", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, { Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "xid8eq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, { Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xid8ge", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, { Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xid8gt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, { Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xid8in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "xid8"}, }, { Name: "xid8le", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, { Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xid8lt", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, { Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xid8ne", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, { Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xid8out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "xid8send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid8"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "xideq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid"}, }, { Type: &ast.TypeName{Name: "xid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xideqint4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xidin", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "xid"}, }, { Name: "xidneq", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid"}, }, { Type: &ast.TypeName{Name: "xid"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xidneqint4", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xidout", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "xidsend", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xid"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "xml", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "xml_in", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "cstring"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "xml_is_well_formed", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xml_is_well_formed_content", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xml_is_well_formed_document", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xml_out", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xml"}, }, }, ReturnType: &ast.TypeName{Name: "cstring"}, }, { Name: "xml_send", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xml"}, }, }, ReturnType: &ast.TypeName{Name: "bytea"}, }, { Name: "xmlagg", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xml"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "xmlcomment", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "xmlconcat2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xml"}, }, { Type: &ast.TypeName{Name: "xml"}, }, }, ReturnType: &ast.TypeName{Name: "xml"}, }, { Name: "xmlexists", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "xml"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xmlvalidate", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "xml"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xpath", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "xml"}, }, }, ReturnType: &ast.TypeName{Name: "xml[]"}, }, { Name: "xpath", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "xml"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "xml[]"}, }, { Name: "xpath_exists", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "xml"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, { Name: "xpath_exists", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "xml"}, }, { Type: &ast.TypeName{Name: "text[]"}, }, }, ReturnType: &ast.TypeName{Name: "boolean"}, }, } func genPGCatalog() *catalog.Schema { s := &catalog.Schema{Name: "pg_catalog"} s.Funcs = funcsgenPGCatalog s.Tables = []*catalog.Table{ { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_aggregate", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "aggfnoid", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "aggkind", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "aggnumdirectargs", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "aggtransfn", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "aggfinalfn", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "aggcombinefn", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "aggserialfn", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "aggdeserialfn", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "aggmtransfn", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "aggminvtransfn", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "aggmfinalfn", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "aggfinalextra", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "aggmfinalextra", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "aggfinalmodify", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "aggmfinalmodify", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "aggsortop", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "aggtranstype", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "aggtransspace", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "aggmtranstype", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "aggmtransspace", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "agginitval", Type: ast.TypeName{Name: "text"}, }, { Name: "aggminitval", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_am", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "amname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "amhandler", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "amtype", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_amop", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "amopfamily", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "amoplefttype", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "amoprighttype", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "amopstrategy", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "amoppurpose", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "amopopr", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "amopmethod", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "amopsortfamily", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_amproc", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "amprocfamily", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "amproclefttype", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "amprocrighttype", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "amprocnum", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "amproc", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_attrdef", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "adrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "adnum", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "adbin", Type: ast.TypeName{Name: "pg_node_tree"}, IsNotNull: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_attribute", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "attrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "attname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "atttypid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "attstattarget", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "attlen", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "attnum", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "attndims", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "attcacheoff", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "atttypmod", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "attbyval", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "attalign", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "attstorage", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "attcompression", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "attnotnull", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "atthasdef", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "atthasmissing", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "attidentity", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "attgenerated", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "attisdropped", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "attislocal", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "attinhcount", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "attcollation", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "attacl", Type: ast.TypeName{Name: "_aclitem"}, IsArray: true, }, { Name: "attoptions", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "attfdwoptions", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "attmissingval", Type: ast.TypeName{Name: "anyarray"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_auth_members", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "roleid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "member", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "grantor", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "admin_option", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_authid", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "rolname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "rolsuper", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "rolinherit", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "rolcreaterole", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "rolcreatedb", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "rolcanlogin", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "rolreplication", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "rolbypassrls", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "rolconnlimit", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "rolpassword", Type: ast.TypeName{Name: "text"}, }, { Name: "rolvaliduntil", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_available_extension_versions", }, Columns: []*catalog.Column{ { Name: "name", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "version", Type: ast.TypeName{Name: "text"}, }, { Name: "installed", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "superuser", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "trusted", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "relocatable", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "schema", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "requires", Type: ast.TypeName{Name: "_name"}, IsArray: true, }, { Name: "comment", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_available_extensions", }, Columns: []*catalog.Column{ { Name: "name", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "default_version", Type: ast.TypeName{Name: "text"}, }, { Name: "installed_version", Type: ast.TypeName{Name: "text"}, }, { Name: "comment", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_backend_memory_contexts", }, Columns: []*catalog.Column{ { Name: "name", Type: ast.TypeName{Name: "text"}, }, { Name: "ident", Type: ast.TypeName{Name: "text"}, }, { Name: "parent", Type: ast.TypeName{Name: "text"}, }, { Name: "level", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "total_bytes", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "total_nblocks", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "free_bytes", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "free_chunks", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "used_bytes", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_cast", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "castsource", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "casttarget", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "castfunc", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "castcontext", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "castmethod", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_class", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "relnamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "reltype", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "reloftype", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "relowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "relam", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "relfilenode", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "reltablespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "relpages", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "reltuples", Type: ast.TypeName{Name: "float4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "relallvisible", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "reltoastrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "relhasindex", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "relisshared", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "relpersistence", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "relkind", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "relnatts", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "relchecks", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "relhasrules", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "relhastriggers", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "relhassubclass", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "relrowsecurity", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "relforcerowsecurity", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "relispopulated", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "relreplident", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "relispartition", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "relrewrite", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "relfrozenxid", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "relminmxid", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "relacl", Type: ast.TypeName{Name: "_aclitem"}, IsArray: true, }, { Name: "reloptions", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "relpartbound", Type: ast.TypeName{Name: "pg_node_tree"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_collation", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "collname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "collnamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "collowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "collprovider", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "collisdeterministic", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "collencoding", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "collcollate", Type: ast.TypeName{Name: "text"}, }, { Name: "collctype", Type: ast.TypeName{Name: "text"}, }, { Name: "colliculocale", Type: ast.TypeName{Name: "text"}, }, { Name: "collversion", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_config", }, Columns: []*catalog.Column{ { Name: "name", Type: ast.TypeName{Name: "text"}, }, { Name: "setting", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_constraint", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "conname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "connamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "contype", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "condeferrable", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "condeferred", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "convalidated", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "conrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "contypid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "conindid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "conparentid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "confrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "confupdtype", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "confdeltype", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "confmatchtype", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "conislocal", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "coninhcount", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "connoinherit", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "conkey", Type: ast.TypeName{Name: "_int2"}, IsArray: true, }, { Name: "confkey", Type: ast.TypeName{Name: "_int2"}, IsArray: true, }, { Name: "conpfeqop", Type: ast.TypeName{Name: "_oid"}, IsArray: true, }, { Name: "conppeqop", Type: ast.TypeName{Name: "_oid"}, IsArray: true, }, { Name: "conffeqop", Type: ast.TypeName{Name: "_oid"}, IsArray: true, }, { Name: "confdelsetcols", Type: ast.TypeName{Name: "_int2"}, IsArray: true, }, { Name: "conexclop", Type: ast.TypeName{Name: "_oid"}, IsArray: true, }, { Name: "conbin", Type: ast.TypeName{Name: "pg_node_tree"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_conversion", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "conname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "connamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "conowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "conforencoding", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "contoencoding", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "conproc", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "condefault", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_cursors", }, Columns: []*catalog.Column{ { Name: "name", Type: ast.TypeName{Name: "text"}, }, { Name: "statement", Type: ast.TypeName{Name: "text"}, }, { Name: "is_holdable", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "is_binary", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "is_scrollable", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "creation_time", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_database", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "datname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "datdba", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "encoding", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "datlocprovider", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "datistemplate", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "datallowconn", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "datconnlimit", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "datfrozenxid", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "datminmxid", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "dattablespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "datcollate", Type: ast.TypeName{Name: "text"}, IsNotNull: true, }, { Name: "datctype", Type: ast.TypeName{Name: "text"}, IsNotNull: true, }, { Name: "daticulocale", Type: ast.TypeName{Name: "text"}, }, { Name: "datcollversion", Type: ast.TypeName{Name: "text"}, }, { Name: "datacl", Type: ast.TypeName{Name: "_aclitem"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_db_role_setting", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "setdatabase", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "setrole", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "setconfig", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_default_acl", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "defaclrole", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "defaclnamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "defaclobjtype", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "defaclacl", Type: ast.TypeName{Name: "_aclitem"}, IsNotNull: true, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_depend", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "classid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "objid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "objsubid", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "refclassid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "refobjid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "refobjsubid", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "deptype", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_description", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "objoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "classoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "objsubid", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "description", Type: ast.TypeName{Name: "text"}, IsNotNull: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_enum", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "enumtypid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "enumsortorder", Type: ast.TypeName{Name: "float4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "enumlabel", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_event_trigger", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "evtname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "evtevent", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "evtowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "evtfoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "evtenabled", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "evttags", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_extension", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "extname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "extowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "extnamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "extrelocatable", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "extversion", Type: ast.TypeName{Name: "text"}, IsNotNull: true, }, { Name: "extconfig", Type: ast.TypeName{Name: "_oid"}, IsArray: true, }, { Name: "extcondition", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_file_settings", }, Columns: []*catalog.Column{ { Name: "sourcefile", Type: ast.TypeName{Name: "text"}, }, { Name: "sourceline", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "seqno", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "name", Type: ast.TypeName{Name: "text"}, }, { Name: "setting", Type: ast.TypeName{Name: "text"}, }, { Name: "applied", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "error", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_foreign_data_wrapper", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "fdwname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "fdwowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "fdwhandler", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "fdwvalidator", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "fdwacl", Type: ast.TypeName{Name: "_aclitem"}, IsArray: true, }, { Name: "fdwoptions", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_foreign_server", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "srvname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "srvowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "srvfdw", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "srvtype", Type: ast.TypeName{Name: "text"}, }, { Name: "srvversion", Type: ast.TypeName{Name: "text"}, }, { Name: "srvacl", Type: ast.TypeName{Name: "_aclitem"}, IsArray: true, }, { Name: "srvoptions", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_foreign_table", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "ftrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ftserver", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ftoptions", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_group", }, Columns: []*catalog.Column{ { Name: "groname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "grosysid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "grolist", Type: ast.TypeName{Name: "_oid"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_hba_file_rules", }, Columns: []*catalog.Column{ { Name: "line_number", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "type", Type: ast.TypeName{Name: "text"}, }, { Name: "database", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "user_name", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "address", Type: ast.TypeName{Name: "text"}, }, { Name: "netmask", Type: ast.TypeName{Name: "text"}, }, { Name: "auth_method", Type: ast.TypeName{Name: "text"}, }, { Name: "options", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "error", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_ident_file_mappings", }, Columns: []*catalog.Column{ { Name: "line_number", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "map_name", Type: ast.TypeName{Name: "text"}, }, { Name: "sys_name", Type: ast.TypeName{Name: "text"}, }, { Name: "pg_username", Type: ast.TypeName{Name: "text"}, }, { Name: "error", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_index", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "indexrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "indrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "indnatts", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "indnkeyatts", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "indisunique", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "indnullsnotdistinct", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "indisprimary", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "indisexclusion", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "indimmediate", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "indisclustered", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "indisvalid", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "indcheckxmin", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "indisready", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "indislive", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "indisreplident", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "indkey", Type: ast.TypeName{Name: "int2vector"}, IsNotNull: true, IsArray: true, }, { Name: "indcollation", Type: ast.TypeName{Name: "oidvector"}, IsNotNull: true, IsArray: true, }, { Name: "indclass", Type: ast.TypeName{Name: "oidvector"}, IsNotNull: true, IsArray: true, }, { Name: "indoption", Type: ast.TypeName{Name: "int2vector"}, IsNotNull: true, IsArray: true, }, { Name: "indexprs", Type: ast.TypeName{Name: "pg_node_tree"}, }, { Name: "indpred", Type: ast.TypeName{Name: "pg_node_tree"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_indexes", }, Columns: []*catalog.Column{ { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "tablename", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "indexname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "tablespace", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "indexdef", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_inherits", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "inhrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "inhparent", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "inhseqno", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "inhdetachpending", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_init_privs", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "objoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "classoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "objsubid", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "privtype", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "initprivs", Type: ast.TypeName{Name: "_aclitem"}, IsNotNull: true, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_language", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "lanname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "lanowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "lanispl", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "lanpltrusted", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "lanplcallfoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "laninline", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "lanvalidator", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "lanacl", Type: ast.TypeName{Name: "_aclitem"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_largeobject", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "loid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "pageno", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "data", Type: ast.TypeName{Name: "bytea"}, IsNotNull: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_largeobject_metadata", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "lomowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "lomacl", Type: ast.TypeName{Name: "_aclitem"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_locks", }, Columns: []*catalog.Column{ { Name: "locktype", Type: ast.TypeName{Name: "text"}, }, { Name: "database", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "relation", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "page", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "tuple", Type: ast.TypeName{Name: "int2"}, Length: toPointer(2), }, { Name: "virtualxid", Type: ast.TypeName{Name: "text"}, }, { Name: "transactionid", Type: ast.TypeName{Name: "xid"}, Length: toPointer(4), }, { Name: "classid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "objid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "objsubid", Type: ast.TypeName{Name: "int2"}, Length: toPointer(2), }, { Name: "virtualtransaction", Type: ast.TypeName{Name: "text"}, }, { Name: "pid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "mode", Type: ast.TypeName{Name: "text"}, }, { Name: "granted", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "fastpath", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "waitstart", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_matviews", }, Columns: []*catalog.Column{ { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "matviewname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "matviewowner", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "tablespace", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "hasindexes", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "ispopulated", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "definition", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_namespace", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "nspname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "nspowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "nspacl", Type: ast.TypeName{Name: "_aclitem"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_opclass", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "opcmethod", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "opcname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "opcnamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "opcowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "opcfamily", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "opcintype", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "opcdefault", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "opckeytype", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_operator", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "oprname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "oprnamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "oprowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "oprkind", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "oprcanmerge", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "oprcanhash", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "oprleft", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "oprright", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "oprresult", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "oprcom", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "oprnegate", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "oprcode", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "oprrest", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "oprjoin", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_opfamily", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "opfmethod", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "opfname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "opfnamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "opfowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_parameter_acl", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "parname", Type: ast.TypeName{Name: "text"}, IsNotNull: true, }, { Name: "paracl", Type: ast.TypeName{Name: "_aclitem"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_partitioned_table", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "partrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "partstrat", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "partnatts", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "partdefid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "partattrs", Type: ast.TypeName{Name: "int2vector"}, IsNotNull: true, IsArray: true, }, { Name: "partclass", Type: ast.TypeName{Name: "oidvector"}, IsNotNull: true, IsArray: true, }, { Name: "partcollation", Type: ast.TypeName{Name: "oidvector"}, IsNotNull: true, IsArray: true, }, { Name: "partexprs", Type: ast.TypeName{Name: "pg_node_tree"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_policies", }, Columns: []*catalog.Column{ { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "tablename", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "policyname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "permissive", Type: ast.TypeName{Name: "text"}, }, { Name: "roles", Type: ast.TypeName{Name: "_name"}, IsArray: true, }, { Name: "cmd", Type: ast.TypeName{Name: "text"}, }, { Name: "qual", Type: ast.TypeName{Name: "text"}, }, { Name: "with_check", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_policy", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "polname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "polrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "polcmd", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "polpermissive", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "polroles", Type: ast.TypeName{Name: "_oid"}, IsNotNull: true, IsArray: true, }, { Name: "polqual", Type: ast.TypeName{Name: "pg_node_tree"}, }, { Name: "polwithcheck", Type: ast.TypeName{Name: "pg_node_tree"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_prepared_statements", }, Columns: []*catalog.Column{ { Name: "name", Type: ast.TypeName{Name: "text"}, }, { Name: "statement", Type: ast.TypeName{Name: "text"}, }, { Name: "prepare_time", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "parameter_types", Type: ast.TypeName{Name: "_regtype"}, IsArray: true, }, { Name: "from_sql", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "generic_plans", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "custom_plans", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_prepared_xacts", }, Columns: []*catalog.Column{ { Name: "transaction", Type: ast.TypeName{Name: "xid"}, Length: toPointer(4), }, { Name: "gid", Type: ast.TypeName{Name: "text"}, }, { Name: "prepared", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "owner", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "database", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_proc", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "proname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "pronamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "proowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "prolang", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "procost", Type: ast.TypeName{Name: "float4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "prorows", Type: ast.TypeName{Name: "float4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "provariadic", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "prosupport", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "prokind", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "prosecdef", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "proleakproof", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "proisstrict", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "proretset", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "provolatile", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "proparallel", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "pronargs", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "pronargdefaults", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "prorettype", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "proargtypes", Type: ast.TypeName{Name: "oidvector"}, IsNotNull: true, IsArray: true, }, { Name: "proallargtypes", Type: ast.TypeName{Name: "_oid"}, IsArray: true, }, { Name: "proargmodes", Type: ast.TypeName{Name: "_char"}, IsArray: true, }, { Name: "proargnames", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "proargdefaults", Type: ast.TypeName{Name: "pg_node_tree"}, }, { Name: "protrftypes", Type: ast.TypeName{Name: "_oid"}, IsArray: true, }, { Name: "prosrc", Type: ast.TypeName{Name: "text"}, IsNotNull: true, }, { Name: "probin", Type: ast.TypeName{Name: "text"}, }, { Name: "prosqlbody", Type: ast.TypeName{Name: "pg_node_tree"}, }, { Name: "proconfig", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "proacl", Type: ast.TypeName{Name: "_aclitem"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_publication", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "pubname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "pubowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "puballtables", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "pubinsert", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "pubupdate", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "pubdelete", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "pubtruncate", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "pubviaroot", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_publication_namespace", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "pnpubid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "pnnspid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_publication_rel", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "prpubid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "prrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "prqual", Type: ast.TypeName{Name: "pg_node_tree"}, }, { Name: "prattrs", Type: ast.TypeName{Name: "int2vector"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_publication_tables", }, Columns: []*catalog.Column{ { Name: "pubname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "tablename", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "attnames", Type: ast.TypeName{Name: "_name"}, IsArray: true, }, { Name: "rowfilter", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_range", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "rngtypid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "rngsubtype", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "rngmultitypid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "rngcollation", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "rngsubopc", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "rngcanonical", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "rngsubdiff", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_replication_origin", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "roident", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "roname", Type: ast.TypeName{Name: "text"}, IsNotNull: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_replication_origin_status", }, Columns: []*catalog.Column{ { Name: "local_id", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "external_id", Type: ast.TypeName{Name: "text"}, }, { Name: "remote_lsn", Type: ast.TypeName{Name: "pg_lsn"}, Length: toPointer(8), }, { Name: "local_lsn", Type: ast.TypeName{Name: "pg_lsn"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_replication_slots", }, Columns: []*catalog.Column{ { Name: "slot_name", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "plugin", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "slot_type", Type: ast.TypeName{Name: "text"}, }, { Name: "datoid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "database", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "temporary", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "active", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "active_pid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, Length: toPointer(4), }, { Name: "catalog_xmin", Type: ast.TypeName{Name: "xid"}, Length: toPointer(4), }, { Name: "restart_lsn", Type: ast.TypeName{Name: "pg_lsn"}, Length: toPointer(8), }, { Name: "confirmed_flush_lsn", Type: ast.TypeName{Name: "pg_lsn"}, Length: toPointer(8), }, { Name: "wal_status", Type: ast.TypeName{Name: "text"}, }, { Name: "safe_wal_size", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "two_phase", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_rewrite", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "rulename", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "ev_class", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ev_type", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "ev_enabled", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "is_instead", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "ev_qual", Type: ast.TypeName{Name: "pg_node_tree"}, IsNotNull: true, }, { Name: "ev_action", Type: ast.TypeName{Name: "pg_node_tree"}, IsNotNull: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_roles", }, Columns: []*catalog.Column{ { Name: "rolname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "rolsuper", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "rolinherit", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "rolcreaterole", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "rolcreatedb", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "rolcanlogin", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "rolreplication", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "rolconnlimit", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "rolpassword", Type: ast.TypeName{Name: "text"}, }, { Name: "rolvaliduntil", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "rolbypassrls", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "rolconfig", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_rules", }, Columns: []*catalog.Column{ { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "tablename", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "rulename", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "definition", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_seclabel", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "objoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "classoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "objsubid", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "provider", Type: ast.TypeName{Name: "text"}, IsNotNull: true, }, { Name: "label", Type: ast.TypeName{Name: "text"}, IsNotNull: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_seclabels", }, Columns: []*catalog.Column{ { Name: "objoid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "classoid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "objsubid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "objtype", Type: ast.TypeName{Name: "text"}, }, { Name: "objnamespace", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "objname", Type: ast.TypeName{Name: "text"}, }, { Name: "provider", Type: ast.TypeName{Name: "text"}, }, { Name: "label", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_sequence", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "seqrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "seqtypid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "seqstart", Type: ast.TypeName{Name: "int8"}, IsNotNull: true, Length: toPointer(8), }, { Name: "seqincrement", Type: ast.TypeName{Name: "int8"}, IsNotNull: true, Length: toPointer(8), }, { Name: "seqmax", Type: ast.TypeName{Name: "int8"}, IsNotNull: true, Length: toPointer(8), }, { Name: "seqmin", Type: ast.TypeName{Name: "int8"}, IsNotNull: true, Length: toPointer(8), }, { Name: "seqcache", Type: ast.TypeName{Name: "int8"}, IsNotNull: true, Length: toPointer(8), }, { Name: "seqcycle", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_sequences", }, Columns: []*catalog.Column{ { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "sequencename", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "sequenceowner", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "data_type", Type: ast.TypeName{Name: "regtype"}, Length: toPointer(4), }, { Name: "start_value", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "min_value", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "max_value", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "increment_by", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "cycle", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "cache_size", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "last_value", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_settings", }, Columns: []*catalog.Column{ { Name: "name", Type: ast.TypeName{Name: "text"}, }, { Name: "setting", Type: ast.TypeName{Name: "text"}, }, { Name: "unit", Type: ast.TypeName{Name: "text"}, }, { Name: "category", Type: ast.TypeName{Name: "text"}, }, { Name: "short_desc", Type: ast.TypeName{Name: "text"}, }, { Name: "extra_desc", Type: ast.TypeName{Name: "text"}, }, { Name: "context", Type: ast.TypeName{Name: "text"}, }, { Name: "vartype", Type: ast.TypeName{Name: "text"}, }, { Name: "source", Type: ast.TypeName{Name: "text"}, }, { Name: "min_val", Type: ast.TypeName{Name: "text"}, }, { Name: "max_val", Type: ast.TypeName{Name: "text"}, }, { Name: "enumvals", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "boot_val", Type: ast.TypeName{Name: "text"}, }, { Name: "reset_val", Type: ast.TypeName{Name: "text"}, }, { Name: "sourcefile", Type: ast.TypeName{Name: "text"}, }, { Name: "sourceline", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "pending_restart", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_shadow", }, Columns: []*catalog.Column{ { Name: "usename", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "usesysid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "usecreatedb", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "usesuper", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "userepl", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "usebypassrls", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "passwd", Type: ast.TypeName{Name: "text"}, }, { Name: "valuntil", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "useconfig", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_shdepend", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "dbid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "classid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "objid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "objsubid", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "refclassid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "refobjid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "deptype", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_shdescription", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "objoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "classoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "description", Type: ast.TypeName{Name: "text"}, IsNotNull: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_shmem_allocations", }, Columns: []*catalog.Column{ { Name: "name", Type: ast.TypeName{Name: "text"}, }, { Name: "off", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "size", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "allocated_size", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_shseclabel", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "objoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "classoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "provider", Type: ast.TypeName{Name: "text"}, IsNotNull: true, }, { Name: "label", Type: ast.TypeName{Name: "text"}, IsNotNull: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_activity", }, Columns: []*catalog.Column{ { Name: "datid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "datname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "pid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "leader_pid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "usesysid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "usename", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "application_name", Type: ast.TypeName{Name: "text"}, }, { Name: "client_addr", Type: ast.TypeName{Name: "inet"}, }, { Name: "client_hostname", Type: ast.TypeName{Name: "text"}, }, { Name: "client_port", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "backend_start", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "xact_start", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "query_start", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "state_change", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "wait_event_type", Type: ast.TypeName{Name: "text"}, }, { Name: "wait_event", Type: ast.TypeName{Name: "text"}, }, { Name: "state", Type: ast.TypeName{Name: "text"}, }, { Name: "backend_xid", Type: ast.TypeName{Name: "xid"}, Length: toPointer(4), }, { Name: "backend_xmin", Type: ast.TypeName{Name: "xid"}, Length: toPointer(4), }, { Name: "query_id", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "query", Type: ast.TypeName{Name: "text"}, }, { Name: "backend_type", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_all_indexes", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "indexrelid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "indexrelname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "idx_scan", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_tup_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_tup_fetch", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_all_tables", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "seq_scan", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "seq_tup_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_scan", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_tup_fetch", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_ins", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_upd", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_del", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_hot_upd", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_live_tup", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_dead_tup", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_mod_since_analyze", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_ins_since_vacuum", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "last_vacuum", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "last_autovacuum", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "last_analyze", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "last_autoanalyze", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "vacuum_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "autovacuum_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "analyze_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "autoanalyze_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_archiver", }, Columns: []*catalog.Column{ { Name: "archived_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "last_archived_wal", Type: ast.TypeName{Name: "text"}, }, { Name: "last_archived_time", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "failed_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "last_failed_wal", Type: ast.TypeName{Name: "text"}, }, { Name: "last_failed_time", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "stats_reset", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_bgwriter", }, Columns: []*catalog.Column{ { Name: "checkpoints_timed", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "checkpoints_req", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "checkpoint_write_time", Type: ast.TypeName{Name: "float8"}, Length: toPointer(8), }, { Name: "checkpoint_sync_time", Type: ast.TypeName{Name: "float8"}, Length: toPointer(8), }, { Name: "buffers_checkpoint", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "buffers_clean", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "maxwritten_clean", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "buffers_backend", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "buffers_backend_fsync", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "buffers_alloc", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "stats_reset", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_database", }, Columns: []*catalog.Column{ { Name: "datid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "datname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "numbackends", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "xact_commit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "xact_rollback", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tup_returned", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tup_fetched", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tup_inserted", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tup_updated", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tup_deleted", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "conflicts", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "temp_files", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "temp_bytes", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "deadlocks", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "checksum_failures", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "checksum_last_failure", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "blk_read_time", Type: ast.TypeName{Name: "float8"}, Length: toPointer(8), }, { Name: "blk_write_time", Type: ast.TypeName{Name: "float8"}, Length: toPointer(8), }, { Name: "session_time", Type: ast.TypeName{Name: "float8"}, Length: toPointer(8), }, { Name: "active_time", Type: ast.TypeName{Name: "float8"}, Length: toPointer(8), }, { Name: "idle_in_transaction_time", Type: ast.TypeName{Name: "float8"}, Length: toPointer(8), }, { Name: "sessions", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "sessions_abandoned", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "sessions_fatal", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "sessions_killed", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "stats_reset", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_database_conflicts", }, Columns: []*catalog.Column{ { Name: "datid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "datname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "confl_tablespace", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "confl_lock", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "confl_snapshot", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "confl_bufferpin", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "confl_deadlock", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_gssapi", }, Columns: []*catalog.Column{ { Name: "pid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "gss_authenticated", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "principal", Type: ast.TypeName{Name: "text"}, }, { Name: "encrypted", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_progress_analyze", }, Columns: []*catalog.Column{ { Name: "pid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "datid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "datname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "phase", Type: ast.TypeName{Name: "text"}, }, { Name: "sample_blks_total", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "sample_blks_scanned", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "ext_stats_total", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "ext_stats_computed", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "child_tables_total", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "child_tables_done", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "current_child_table_relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_progress_basebackup", }, Columns: []*catalog.Column{ { Name: "pid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "phase", Type: ast.TypeName{Name: "text"}, }, { Name: "backup_total", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "backup_streamed", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tablespaces_total", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tablespaces_streamed", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_progress_cluster", }, Columns: []*catalog.Column{ { Name: "pid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "datid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "datname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "command", Type: ast.TypeName{Name: "text"}, }, { Name: "phase", Type: ast.TypeName{Name: "text"}, }, { Name: "cluster_index_relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "heap_tuples_scanned", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "heap_tuples_written", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "heap_blks_total", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "heap_blks_scanned", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "index_rebuild_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_progress_copy", }, Columns: []*catalog.Column{ { Name: "pid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "datid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "datname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "command", Type: ast.TypeName{Name: "text"}, }, { Name: "type", Type: ast.TypeName{Name: "text"}, }, { Name: "bytes_processed", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "bytes_total", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tuples_processed", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tuples_excluded", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_progress_create_index", }, Columns: []*catalog.Column{ { Name: "pid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "datid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "datname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "index_relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "command", Type: ast.TypeName{Name: "text"}, }, { Name: "phase", Type: ast.TypeName{Name: "text"}, }, { Name: "lockers_total", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "lockers_done", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "current_locker_pid", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "blocks_total", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "blocks_done", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tuples_total", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tuples_done", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "partitions_total", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "partitions_done", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_progress_vacuum", }, Columns: []*catalog.Column{ { Name: "pid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "datid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "datname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "phase", Type: ast.TypeName{Name: "text"}, }, { Name: "heap_blks_total", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "heap_blks_scanned", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "heap_blks_vacuumed", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "index_vacuum_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "max_dead_tuples", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "num_dead_tuples", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_recovery_prefetch", }, Columns: []*catalog.Column{ { Name: "stats_reset", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "prefetch", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "skip_init", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "skip_new", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "skip_fpw", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "skip_rep", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "wal_distance", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "block_distance", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "io_depth", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_replication", }, Columns: []*catalog.Column{ { Name: "pid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "usesysid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "usename", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "application_name", Type: ast.TypeName{Name: "text"}, }, { Name: "client_addr", Type: ast.TypeName{Name: "inet"}, }, { Name: "client_hostname", Type: ast.TypeName{Name: "text"}, }, { Name: "client_port", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "backend_start", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "backend_xmin", Type: ast.TypeName{Name: "xid"}, Length: toPointer(4), }, { Name: "state", Type: ast.TypeName{Name: "text"}, }, { Name: "sent_lsn", Type: ast.TypeName{Name: "pg_lsn"}, Length: toPointer(8), }, { Name: "write_lsn", Type: ast.TypeName{Name: "pg_lsn"}, Length: toPointer(8), }, { Name: "flush_lsn", Type: ast.TypeName{Name: "pg_lsn"}, Length: toPointer(8), }, { Name: "replay_lsn", Type: ast.TypeName{Name: "pg_lsn"}, Length: toPointer(8), }, { Name: "write_lag", Type: ast.TypeName{Name: "interval"}, Length: toPointer(16), }, { Name: "flush_lag", Type: ast.TypeName{Name: "interval"}, Length: toPointer(16), }, { Name: "replay_lag", Type: ast.TypeName{Name: "interval"}, Length: toPointer(16), }, { Name: "sync_priority", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "sync_state", Type: ast.TypeName{Name: "text"}, }, { Name: "reply_time", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_replication_slots", }, Columns: []*catalog.Column{ { Name: "slot_name", Type: ast.TypeName{Name: "text"}, }, { Name: "spill_txns", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "spill_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "spill_bytes", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "stream_txns", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "stream_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "stream_bytes", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "total_txns", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "total_bytes", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "stats_reset", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_slru", }, Columns: []*catalog.Column{ { Name: "name", Type: ast.TypeName{Name: "text"}, }, { Name: "blks_zeroed", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "blks_written", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "blks_exists", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "flushes", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "truncates", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "stats_reset", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_ssl", }, Columns: []*catalog.Column{ { Name: "pid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "ssl", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "version", Type: ast.TypeName{Name: "text"}, }, { Name: "cipher", Type: ast.TypeName{Name: "text"}, }, { Name: "bits", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "client_dn", Type: ast.TypeName{Name: "text"}, }, { Name: "client_serial", Type: ast.TypeName{Name: "numeric"}, }, { Name: "issuer_dn", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_subscription", }, Columns: []*catalog.Column{ { Name: "subid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "subname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "pid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "received_lsn", Type: ast.TypeName{Name: "pg_lsn"}, Length: toPointer(8), }, { Name: "last_msg_send_time", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "last_msg_receipt_time", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "latest_end_lsn", Type: ast.TypeName{Name: "pg_lsn"}, Length: toPointer(8), }, { Name: "latest_end_time", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_subscription_stats", }, Columns: []*catalog.Column{ { Name: "subid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "subname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "apply_error_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "sync_error_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "stats_reset", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_sys_indexes", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "indexrelid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "indexrelname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "idx_scan", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_tup_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_tup_fetch", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_sys_tables", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "seq_scan", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "seq_tup_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_scan", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_tup_fetch", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_ins", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_upd", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_del", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_hot_upd", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_live_tup", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_dead_tup", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_mod_since_analyze", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_ins_since_vacuum", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "last_vacuum", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "last_autovacuum", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "last_analyze", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "last_autoanalyze", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "vacuum_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "autovacuum_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "analyze_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "autoanalyze_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_user_functions", }, Columns: []*catalog.Column{ { Name: "funcid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "funcname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "calls", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "total_time", Type: ast.TypeName{Name: "float8"}, Length: toPointer(8), }, { Name: "self_time", Type: ast.TypeName{Name: "float8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_user_indexes", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "indexrelid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "indexrelname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "idx_scan", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_tup_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_tup_fetch", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_user_tables", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "seq_scan", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "seq_tup_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_scan", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_tup_fetch", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_ins", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_upd", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_del", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_hot_upd", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_live_tup", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_dead_tup", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_mod_since_analyze", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_ins_since_vacuum", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "last_vacuum", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "last_autovacuum", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "last_analyze", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "last_autoanalyze", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "vacuum_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "autovacuum_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "analyze_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "autoanalyze_count", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_wal", }, Columns: []*catalog.Column{ { Name: "wal_records", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "wal_fpi", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "wal_bytes", Type: ast.TypeName{Name: "numeric"}, }, { Name: "wal_buffers_full", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "wal_write", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "wal_sync", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "wal_write_time", Type: ast.TypeName{Name: "float8"}, Length: toPointer(8), }, { Name: "wal_sync_time", Type: ast.TypeName{Name: "float8"}, Length: toPointer(8), }, { Name: "stats_reset", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_wal_receiver", }, Columns: []*catalog.Column{ { Name: "pid", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "status", Type: ast.TypeName{Name: "text"}, }, { Name: "receive_start_lsn", Type: ast.TypeName{Name: "pg_lsn"}, Length: toPointer(8), }, { Name: "receive_start_tli", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "written_lsn", Type: ast.TypeName{Name: "pg_lsn"}, Length: toPointer(8), }, { Name: "flushed_lsn", Type: ast.TypeName{Name: "pg_lsn"}, Length: toPointer(8), }, { Name: "received_tli", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "last_msg_send_time", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "last_msg_receipt_time", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "latest_end_lsn", Type: ast.TypeName{Name: "pg_lsn"}, Length: toPointer(8), }, { Name: "latest_end_time", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "slot_name", Type: ast.TypeName{Name: "text"}, }, { Name: "sender_host", Type: ast.TypeName{Name: "text"}, }, { Name: "sender_port", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "conninfo", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_xact_all_tables", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "seq_scan", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "seq_tup_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_scan", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_tup_fetch", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_ins", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_upd", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_del", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_hot_upd", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_xact_sys_tables", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "seq_scan", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "seq_tup_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_scan", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_tup_fetch", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_ins", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_upd", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_del", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_hot_upd", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_xact_user_functions", }, Columns: []*catalog.Column{ { Name: "funcid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "funcname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "calls", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "total_time", Type: ast.TypeName{Name: "float8"}, Length: toPointer(8), }, { Name: "self_time", Type: ast.TypeName{Name: "float8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stat_xact_user_tables", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "seq_scan", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "seq_tup_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_scan", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_tup_fetch", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_ins", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_upd", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_del", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "n_tup_hot_upd", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_statio_all_indexes", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "indexrelid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "indexrelname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "idx_blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_statio_all_sequences", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_statio_all_tables", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "heap_blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "heap_blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "toast_blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "toast_blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tidx_blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tidx_blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_statio_sys_indexes", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "indexrelid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "indexrelname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "idx_blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_statio_sys_sequences", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_statio_sys_tables", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "heap_blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "heap_blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "toast_blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "toast_blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tidx_blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tidx_blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_statio_user_indexes", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "indexrelid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "indexrelname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "idx_blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_statio_user_sequences", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_statio_user_tables", }, Columns: []*catalog.Column{ { Name: "relid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "relname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "heap_blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "heap_blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "idx_blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "toast_blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "toast_blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tidx_blks_read", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, { Name: "tidx_blks_hit", Type: ast.TypeName{Name: "int8"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_statistic", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "starelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "staattnum", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "stainherit", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "stanullfrac", Type: ast.TypeName{Name: "float4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "stawidth", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "stadistinct", Type: ast.TypeName{Name: "float4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "stakind1", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "stakind2", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "stakind3", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "stakind4", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "stakind5", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "staop1", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "staop2", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "staop3", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "staop4", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "staop5", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "stacoll1", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "stacoll2", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "stacoll3", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "stacoll4", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "stacoll5", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "stanumbers1", Type: ast.TypeName{Name: "_float4"}, IsArray: true, }, { Name: "stanumbers2", Type: ast.TypeName{Name: "_float4"}, IsArray: true, }, { Name: "stanumbers3", Type: ast.TypeName{Name: "_float4"}, IsArray: true, }, { Name: "stanumbers4", Type: ast.TypeName{Name: "_float4"}, IsArray: true, }, { Name: "stanumbers5", Type: ast.TypeName{Name: "_float4"}, IsArray: true, }, { Name: "stavalues1", Type: ast.TypeName{Name: "anyarray"}, }, { Name: "stavalues2", Type: ast.TypeName{Name: "anyarray"}, }, { Name: "stavalues3", Type: ast.TypeName{Name: "anyarray"}, }, { Name: "stavalues4", Type: ast.TypeName{Name: "anyarray"}, }, { Name: "stavalues5", Type: ast.TypeName{Name: "anyarray"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_statistic_ext", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "stxrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "stxname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "stxnamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "stxowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "stxstattarget", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "stxkeys", Type: ast.TypeName{Name: "int2vector"}, IsNotNull: true, IsArray: true, }, { Name: "stxkind", Type: ast.TypeName{Name: "_char"}, IsNotNull: true, IsArray: true, }, { Name: "stxexprs", Type: ast.TypeName{Name: "pg_node_tree"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_statistic_ext_data", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "stxoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "stxdinherit", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "stxdndistinct", Type: ast.TypeName{Name: "pg_ndistinct"}, }, { Name: "stxddependencies", Type: ast.TypeName{Name: "pg_dependencies"}, }, { Name: "stxdmcv", Type: ast.TypeName{Name: "pg_mcv_list"}, }, { Name: "stxdexpr", Type: ast.TypeName{Name: "_pg_statistic"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stats", }, Columns: []*catalog.Column{ { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "tablename", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "attname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "inherited", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "null_frac", Type: ast.TypeName{Name: "float4"}, Length: toPointer(4), }, { Name: "avg_width", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "n_distinct", Type: ast.TypeName{Name: "float4"}, Length: toPointer(4), }, { Name: "most_common_vals", Type: ast.TypeName{Name: "anyarray"}, }, { Name: "most_common_freqs", Type: ast.TypeName{Name: "_float4"}, IsArray: true, }, { Name: "histogram_bounds", Type: ast.TypeName{Name: "anyarray"}, }, { Name: "correlation", Type: ast.TypeName{Name: "float4"}, Length: toPointer(4), }, { Name: "most_common_elems", Type: ast.TypeName{Name: "anyarray"}, }, { Name: "most_common_elem_freqs", Type: ast.TypeName{Name: "_float4"}, IsArray: true, }, { Name: "elem_count_histogram", Type: ast.TypeName{Name: "_float4"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stats_ext", }, Columns: []*catalog.Column{ { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "tablename", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "statistics_schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "statistics_name", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "statistics_owner", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "attnames", Type: ast.TypeName{Name: "_name"}, IsArray: true, }, { Name: "exprs", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "kinds", Type: ast.TypeName{Name: "_char"}, IsArray: true, }, { Name: "inherited", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "n_distinct", Type: ast.TypeName{Name: "pg_ndistinct"}, }, { Name: "dependencies", Type: ast.TypeName{Name: "pg_dependencies"}, }, { Name: "most_common_vals", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, { Name: "most_common_val_nulls", Type: ast.TypeName{Name: "_bool"}, IsArray: true, }, { Name: "most_common_freqs", Type: ast.TypeName{Name: "_float8"}, IsArray: true, }, { Name: "most_common_base_freqs", Type: ast.TypeName{Name: "_float8"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_stats_ext_exprs", }, Columns: []*catalog.Column{ { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "tablename", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "statistics_schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "statistics_name", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "statistics_owner", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "expr", Type: ast.TypeName{Name: "text"}, }, { Name: "inherited", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "null_frac", Type: ast.TypeName{Name: "float4"}, Length: toPointer(4), }, { Name: "avg_width", Type: ast.TypeName{Name: "int4"}, Length: toPointer(4), }, { Name: "n_distinct", Type: ast.TypeName{Name: "float4"}, Length: toPointer(4), }, { Name: "most_common_vals", Type: ast.TypeName{Name: "anyarray"}, }, { Name: "most_common_freqs", Type: ast.TypeName{Name: "_float4"}, IsArray: true, }, { Name: "histogram_bounds", Type: ast.TypeName{Name: "anyarray"}, }, { Name: "correlation", Type: ast.TypeName{Name: "float4"}, Length: toPointer(4), }, { Name: "most_common_elems", Type: ast.TypeName{Name: "anyarray"}, }, { Name: "most_common_elem_freqs", Type: ast.TypeName{Name: "_float4"}, IsArray: true, }, { Name: "elem_count_histogram", Type: ast.TypeName{Name: "_float4"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_subscription", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "subdbid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "subskiplsn", Type: ast.TypeName{Name: "pg_lsn"}, IsNotNull: true, Length: toPointer(8), }, { Name: "subname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "subowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "subenabled", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "subbinary", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "substream", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "subtwophasestate", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "subdisableonerr", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "subconninfo", Type: ast.TypeName{Name: "text"}, IsNotNull: true, }, { Name: "subslotname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "subsynccommit", Type: ast.TypeName{Name: "text"}, IsNotNull: true, }, { Name: "subpublications", Type: ast.TypeName{Name: "_text"}, IsNotNull: true, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_subscription_rel", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "srsubid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "srrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "srsubstate", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "srsublsn", Type: ast.TypeName{Name: "pg_lsn"}, Length: toPointer(8), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_tables", }, Columns: []*catalog.Column{ { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "tablename", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "tableowner", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "tablespace", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "hasindexes", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "hasrules", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "hastriggers", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "rowsecurity", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_tablespace", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "spcname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "spcowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "spcacl", Type: ast.TypeName{Name: "_aclitem"}, IsArray: true, }, { Name: "spcoptions", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_timezone_abbrevs", }, Columns: []*catalog.Column{ { Name: "abbrev", Type: ast.TypeName{Name: "text"}, }, { Name: "utc_offset", Type: ast.TypeName{Name: "interval"}, Length: toPointer(16), }, { Name: "is_dst", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_timezone_names", }, Columns: []*catalog.Column{ { Name: "name", Type: ast.TypeName{Name: "text"}, }, { Name: "abbrev", Type: ast.TypeName{Name: "text"}, }, { Name: "utc_offset", Type: ast.TypeName{Name: "interval"}, Length: toPointer(16), }, { Name: "is_dst", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_transform", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "trftype", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "trflang", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "trffromsql", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "trftosql", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_trigger", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "tgrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "tgparentid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "tgname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "tgfoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "tgtype", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "tgenabled", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "tgisinternal", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "tgconstrrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "tgconstrindid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "tgconstraint", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "tgdeferrable", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "tginitdeferred", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "tgnargs", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "tgattr", Type: ast.TypeName{Name: "int2vector"}, IsNotNull: true, IsArray: true, }, { Name: "tgargs", Type: ast.TypeName{Name: "bytea"}, IsNotNull: true, }, { Name: "tgqual", Type: ast.TypeName{Name: "pg_node_tree"}, }, { Name: "tgoldtable", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "tgnewtable", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_ts_config", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cfgname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "cfgnamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cfgowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cfgparser", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_ts_config_map", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "mapcfg", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "maptokentype", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "mapseqno", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "mapdict", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_ts_dict", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "dictname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "dictnamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "dictowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "dicttemplate", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "dictinitoption", Type: ast.TypeName{Name: "text"}, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_ts_parser", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "prsname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "prsnamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "prsstart", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "prstoken", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "prsend", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "prsheadline", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "prslextype", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_ts_template", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "tmplname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "tmplnamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "tmplinit", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "tmpllexize", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_type", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typname", Type: ast.TypeName{Name: "name"}, IsNotNull: true, Length: toPointer(64), }, { Name: "typnamespace", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typowner", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typlen", Type: ast.TypeName{Name: "int2"}, IsNotNull: true, Length: toPointer(2), }, { Name: "typbyval", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "typtype", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "typcategory", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "typispreferred", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "typisdefined", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "typdelim", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "typrelid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typsubscript", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typelem", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typarray", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typinput", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typoutput", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typreceive", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typsend", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typmodin", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typmodout", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typanalyze", Type: ast.TypeName{Name: "regproc"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typalign", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "typstorage", Type: ast.TypeName{Name: "char"}, IsNotNull: true, Length: toPointer(1), }, { Name: "typnotnull", Type: ast.TypeName{Name: "bool"}, IsNotNull: true, Length: toPointer(1), }, { Name: "typbasetype", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typtypmod", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typndims", Type: ast.TypeName{Name: "int4"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typcollation", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "typdefaultbin", Type: ast.TypeName{Name: "pg_node_tree"}, }, { Name: "typdefault", Type: ast.TypeName{Name: "text"}, }, { Name: "typacl", Type: ast.TypeName{Name: "_aclitem"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_user", }, Columns: []*catalog.Column{ { Name: "usename", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "usesysid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "usecreatedb", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "usesuper", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "userepl", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "usebypassrls", Type: ast.TypeName{Name: "bool"}, Length: toPointer(1), }, { Name: "passwd", Type: ast.TypeName{Name: "text"}, }, { Name: "valuntil", Type: ast.TypeName{Name: "timestamptz"}, Length: toPointer(8), }, { Name: "useconfig", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_user_mapping", }, Columns: []*catalog.Column{ { Name: "tableoid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmax", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmax", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "cmin", Type: ast.TypeName{Name: "cid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "xmin", Type: ast.TypeName{Name: "xid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "ctid", Type: ast.TypeName{Name: "tid"}, IsNotNull: true, Length: toPointer(6), }, { Name: "oid", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "umuser", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "umserver", Type: ast.TypeName{Name: "oid"}, IsNotNull: true, Length: toPointer(4), }, { Name: "umoptions", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_user_mappings", }, Columns: []*catalog.Column{ { Name: "umid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "srvid", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "srvname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "umuser", Type: ast.TypeName{Name: "oid"}, Length: toPointer(4), }, { Name: "usename", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "umoptions", Type: ast.TypeName{Name: "_text"}, IsArray: true, }, }, }, { Rel: &ast.TableName{ Catalog: "pg_catalog", Schema: "pg_catalog", Name: "pg_views", }, Columns: []*catalog.Column{ { Name: "schemaname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "viewname", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "viewowner", Type: ast.TypeName{Name: "name"}, Length: toPointer(64), }, { Name: "definition", Type: ast.TypeName{Name: "text"}, }, }, }, } return s } ================================================ FILE: internal/engine/postgresql/pg_temp.go ================================================ package postgresql import ( "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) func pgTemp() *catalog.Schema { return &catalog.Schema{Name: "pg_temp"} } ================================================ FILE: internal/engine/postgresql/reserved.go ================================================ package postgresql import ( "fmt" "strings" ) // hasMixedCase returns true if the string has any uppercase letters // (identifiers with mixed case need quoting in PostgreSQL) func hasMixedCase(s string) bool { for _, r := range s { if r >= 'A' && r <= 'Z' { return true } } return false } // QuoteIdent returns a quoted identifier if it needs quoting. // This implements the format.Dialect interface. func (p *Parser) QuoteIdent(s string) string { if p.IsReservedKeyword(s) || hasMixedCase(s) { return `"` + s + `"` } return s } // TypeName returns the SQL type name for the given namespace and name. // This implements the format.Dialect interface. func (p *Parser) TypeName(ns, name string) string { if ns == "pg_catalog" { switch name { case "int4": return "integer" case "int8": return "bigint" case "int2": return "smallint" case "float4": return "real" case "float8": return "double precision" case "bool": return "boolean" case "bpchar": return "character" case "timestamptz": return "timestamp with time zone" case "timetz": return "time with time zone" default: return name } } if ns != "" { return ns + "." + name } return name } // Param returns the parameter placeholder for the given number. // PostgreSQL uses $1, $2, etc. func (p *Parser) Param(n int) string { return fmt.Sprintf("$%d", n) } // NamedParam returns the named parameter placeholder for the given name. // PostgreSQL/sqlc uses @name syntax. func (p *Parser) NamedParam(name string) string { return "@" + name } // Cast returns a type cast expression. // PostgreSQL uses expr::type syntax. func (p *Parser) Cast(arg, typeName string) string { return arg + "::" + typeName } // https://www.postgresql.org/docs/current/sql-keywords-appendix.html func (p *Parser) IsReservedKeyword(s string) bool { switch strings.ToLower(s) { case "all": case "analyse": case "analyze": case "and": case "any": case "array": case "as": case "asc": case "asymmetric": case "authorization": case "binary": case "both": case "case": case "cast": case "check": case "collate": case "collation": case "column": case "concurrently": case "constraint": case "create": case "cross": case "current_catalog": case "current_date": case "current_role": case "current_schema": case "current_time": case "current_timestamp": case "current_user": case "default": case "deferrable": case "desc": case "distinct": case "do": case "else": case "end": case "except": case "false": case "fetch": case "for": case "foreign": case "freeze": case "from": case "full": case "grant": case "group": case "having": case "ilike": case "in": case "initially": case "inner": case "intersect": case "into": case "is": case "isnull": case "join": case "lateral": case "leading": case "left": case "like": case "limit": case "localtime": case "localtimestamp": case "natural": case "not": case "notnull": case "null": case "offset": case "on": case "only": case "or": case "order": case "outer": case "overlaps": case "placing": case "primary": case "references": case "returning": case "right": case "select": case "session_user": case "similar": case "some": case "symmetric": case "table": case "tablesample": case "then": case "to": case "trailing": case "true": case "union": case "unique": case "user": case "using": case "variadic": case "verbose": case "when": case "where": case "window": case "with": default: return false } return true } ================================================ FILE: internal/engine/postgresql/rewrite_test.go ================================================ package postgresql import ( "strings" "testing" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" "github.com/google/go-cmp/cmp" ) func TestApply(t *testing.T) { p := NewParser() input, err := p.Parse(strings.NewReader("SELECT sqlc.arg(name)")) if err != nil { t.Fatal(err) } output, err := p.Parse(strings.NewReader("SELECT $1")) if err != nil { t.Fatal(err) } expect := &output[0] actual := astutils.Apply(&input[0], func(cr *astutils.Cursor) bool { fun, ok := cr.Node().(*ast.FuncCall) if !ok { return true } if astutils.Join(fun.Funcname, ".") == "sqlc.arg" { cr.Replace(&ast.ParamRef{ Dollar: true, Number: 1, Location: fun.Location, }) return false } return true }, nil) if diff := cmp.Diff(expect, actual); diff != "" { t.Errorf("rewrite mismatch:\n%s", diff) } } ================================================ FILE: internal/engine/postgresql/utils.go ================================================ package postgresql import ( nodes "github.com/pganalyze/pg_query_go/v6" ) func isArray(n *nodes.TypeName) bool { if n == nil { return false } return len(n.ArrayBounds) > 0 } func isNotNull(n *nodes.ColumnDef) bool { if n.IsNotNull { return true } for _, c := range n.Constraints { switch inner := c.Node.(type) { case *nodes.Node_Constraint: if inner.Constraint.Contype == nodes.ConstrType_CONSTR_NOTNULL { return true } if inner.Constraint.Contype == nodes.ConstrType_CONSTR_PRIMARY { return true } } } return false } func IsNamedParamFunc(node *nodes.Node) bool { fun, ok := node.Node.(*nodes.Node_FuncCall) return ok && joinNodes(fun.FuncCall.Funcname, ".") == "sqlc.arg" } func IsNamedParamSign(node *nodes.Node) bool { expr, ok := node.Node.(*nodes.Node_AExpr) return ok && joinNodes(expr.AExpr.Name, ".") == "@" } func makeByte(s string) byte { var b byte if s == "" { return b } return []byte(s)[0] } func makeUint32Slice(in []uint64) []uint32 { out := make([]uint32, len(in)) for i, v := range in { out[i] = uint32(v) } return out } func makeString(s string) *string { if s == "" { return nil } return &s } ================================================ FILE: internal/engine/sqlite/analyzer/analyze.go ================================================ package analyzer import ( "context" "fmt" "strings" "sync" "github.com/ncruces/go-sqlite3" _ "github.com/ncruces/go-sqlite3/embed" core "github.com/sqlc-dev/sqlc/internal/analysis" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/opts" "github.com/sqlc-dev/sqlc/internal/shfmt" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" "github.com/sqlc-dev/sqlc/internal/sql/named" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) type Analyzer struct { db config.Database conn *sqlite3.Conn dbg opts.Debug replacer *shfmt.Replacer mu sync.Mutex } func New(db config.Database) *Analyzer { return &Analyzer{ db: db, dbg: opts.DebugFromEnv(), replacer: shfmt.NewReplacer(nil), } } func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrations []string, ps *named.ParamSet) (*core.Analysis, error) { a.mu.Lock() defer a.mu.Unlock() if a.conn == nil { var uri string applyMigrations := a.db.Managed if a.db.Managed { // For managed databases, create an in-memory database uri = ":memory:" } else if a.dbg.OnlyManagedDatabases { return nil, fmt.Errorf("database: connections disabled via SQLCDEBUG=databases=managed") } else { uri = a.replacer.Replace(a.db.URI) // For in-memory databases, we need to apply migrations since the database starts empty if isInMemoryDatabase(uri) { applyMigrations = true } } conn, err := sqlite3.Open(uri) if err != nil { return nil, fmt.Errorf("failed to open sqlite database: %w", err) } a.conn = conn // Apply migrations for managed or in-memory databases if applyMigrations { for _, m := range migrations { if len(strings.TrimSpace(m)) == 0 { continue } if err := a.conn.Exec(m); err != nil { a.conn.Close() a.conn = nil return nil, fmt.Errorf("migration failed: %s: %w", m, err) } } } } // Prepare the statement to get column and parameter information stmt, _, err := a.conn.Prepare(query) if err != nil { return nil, a.extractSqlErr(n, err) } defer stmt.Close() var result core.Analysis // Get column information colCount := stmt.ColumnCount() for i := 0; i < colCount; i++ { name := stmt.ColumnName(i) declType := stmt.ColumnDeclType(i) tableName := stmt.ColumnTableName(i) originName := stmt.ColumnOriginName(i) dbName := stmt.ColumnDatabaseName(i) // Normalize the data type dataType := normalizeType(declType) // Determine if column is NOT NULL // SQLite doesn't provide this info directly from prepared statements, // so we default to nullable (false) notNull := false col := &core.Column{ Name: name, OriginalName: originName, DataType: dataType, NotNull: notNull, } if tableName != "" { col.Table = &core.Identifier{ Schema: dbName, Name: tableName, } } result.Columns = append(result.Columns, col) } // Get parameter information bindCount := stmt.BindCount() for i := 1; i <= bindCount; i++ { paramName := stmt.BindName(i) // SQLite doesn't provide parameter types from prepared statements // We use "any" as the default type name := "" if paramName != "" { // Remove the prefix (?, :, @, $) from parameter names name = strings.TrimLeft(paramName, "?:@$") } if ps != nil { if n, ok := ps.NameFor(i); ok { name = n } } result.Params = append(result.Params, &core.Parameter{ Number: int32(i), Column: &core.Column{ Name: name, DataType: "any", NotNull: false, }, }) } return &result, nil } func (a *Analyzer) extractSqlErr(n ast.Node, err error) error { if err == nil { return nil } // Try to extract SQLite error details var sqliteErr *sqlite3.Error if e, ok := err.(*sqlite3.Error); ok { sqliteErr = e } if sqliteErr != nil { return &sqlerr.Error{ Code: fmt.Sprintf("%d", sqliteErr.Code()), Message: sqliteErr.Error(), Location: n.Pos(), } } return &sqlerr.Error{ Message: err.Error(), Location: n.Pos(), } } func (a *Analyzer) Close(_ context.Context) error { a.mu.Lock() defer a.mu.Unlock() if a.conn != nil { err := a.conn.Close() a.conn = nil return err } return nil } // EnsureConn initializes the database connection if not already done. // This is useful for database-only mode where we need to connect before analyzing queries. func (a *Analyzer) EnsureConn(ctx context.Context, migrations []string) error { a.mu.Lock() defer a.mu.Unlock() if a.conn != nil { return nil } var uri string applyMigrations := a.db.Managed if a.db.Managed { // For managed databases, create an in-memory database uri = ":memory:" } else if a.dbg.OnlyManagedDatabases { return fmt.Errorf("database: connections disabled via SQLCDEBUG=databases=managed") } else { uri = a.replacer.Replace(a.db.URI) // For in-memory databases, we need to apply migrations since the database starts empty if isInMemoryDatabase(uri) { applyMigrations = true } } conn, err := sqlite3.Open(uri) if err != nil { return fmt.Errorf("failed to open sqlite database: %w", err) } a.conn = conn // Apply migrations for managed or in-memory databases if applyMigrations { for _, m := range migrations { if len(strings.TrimSpace(m)) == 0 { continue } if err := a.conn.Exec(m); err != nil { a.conn.Close() a.conn = nil return fmt.Errorf("migration failed: %s: %w", m, err) } } } return nil } // GetColumnNames implements the expander.ColumnGetter interface. // It prepares a query and returns the column names from the result set description. func (a *Analyzer) GetColumnNames(ctx context.Context, query string) ([]string, error) { a.mu.Lock() defer a.mu.Unlock() if a.conn == nil { return nil, fmt.Errorf("database connection not initialized") } stmt, _, err := a.conn.Prepare(query) if err != nil { return nil, err } defer stmt.Close() colCount := stmt.ColumnCount() columns := make([]string, colCount) for i := 0; i < colCount; i++ { columns[i] = stmt.ColumnName(i) } return columns, nil } // IntrospectSchema queries the database to build a catalog containing // tables and columns for the database. func (a *Analyzer) IntrospectSchema(ctx context.Context, schemas []string) (*catalog.Catalog, error) { a.mu.Lock() defer a.mu.Unlock() if a.conn == nil { return nil, fmt.Errorf("database connection not initialized") } // Build catalog cat := &catalog.Catalog{ DefaultSchema: "main", } // Create default schema mainSchema := &catalog.Schema{Name: "main"} cat.Schemas = append(cat.Schemas, mainSchema) // Query tables from sqlite_master stmt, _, err := a.conn.Prepare("SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'") if err != nil { return nil, fmt.Errorf("introspect tables: %w", err) } tableNames := []string{} for stmt.Step() { tableName := stmt.ColumnText(0) tableNames = append(tableNames, tableName) } stmt.Close() // For each table, get column information using PRAGMA table_info for _, tableName := range tableNames { tbl := &catalog.Table{ Rel: &ast.TableName{ Name: tableName, }, } pragmaStmt, _, err := a.conn.Prepare(fmt.Sprintf("PRAGMA table_info('%s')", tableName)) if err != nil { return nil, fmt.Errorf("pragma table_info for %s: %w", tableName, err) } for pragmaStmt.Step() { // PRAGMA table_info returns: cid, name, type, notnull, dflt_value, pk colName := pragmaStmt.ColumnText(1) colType := pragmaStmt.ColumnText(2) notNull := pragmaStmt.ColumnInt(3) != 0 tbl.Columns = append(tbl.Columns, &catalog.Column{ Name: colName, Type: ast.TypeName{Name: normalizeType(colType)}, IsNotNull: notNull, }) } pragmaStmt.Close() mainSchema.Tables = append(mainSchema.Tables, tbl) } return cat, nil } // isInMemoryDatabase checks if a SQLite URI refers to an in-memory database func isInMemoryDatabase(uri string) bool { if uri == ":memory:" || uri == "" { return true } // Check for file URI with mode=memory parameter // e.g., "file:test?mode=memory&cache=shared" if strings.Contains(uri, "mode=memory") { return true } return false } // normalizeType converts SQLite type declarations to standard type names func normalizeType(declType string) string { if declType == "" { return "any" } // Convert to lowercase for comparison lower := strings.ToLower(declType) // SQLite type affinity rules (https://www.sqlite.org/datatype3.html) switch { case strings.Contains(lower, "int"): return "integer" case strings.Contains(lower, "char"), strings.Contains(lower, "clob"), strings.Contains(lower, "text"): return "text" case strings.Contains(lower, "blob"): return "blob" case strings.Contains(lower, "real"), strings.Contains(lower, "floa"), strings.Contains(lower, "doub"): return "real" case strings.Contains(lower, "bool"): return "boolean" case strings.Contains(lower, "date"), strings.Contains(lower, "time"): return "datetime" default: // Return as-is for numeric or other types return lower } } ================================================ FILE: internal/engine/sqlite/analyzer/analyze_test.go ================================================ package analyzer import ( "context" "testing" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) func TestAnalyzer_Analyze(t *testing.T) { db := config.Database{ Managed: true, } a := New(db) defer a.Close(context.Background()) ctx := context.Background() migrations := []string{ `CREATE TABLE users ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, email TEXT )`, } query := `SELECT id, name, email FROM users WHERE id = ?` node := &ast.TODO{} result, err := a.Analyze(ctx, node, query, migrations, nil) if err != nil { t.Fatalf("Analyze failed: %v", err) } if len(result.Columns) != 3 { t.Errorf("Expected 3 columns, got %d", len(result.Columns)) } expectedCols := []struct { name string dataType string }{ {"id", "integer"}, {"name", "text"}, {"email", "text"}, } for i, expected := range expectedCols { if i >= len(result.Columns) { break } col := result.Columns[i] if col.Name != expected.name { t.Errorf("Column %d: expected name %q, got %q", i, expected.name, col.Name) } if col.DataType != expected.dataType { t.Errorf("Column %d: expected dataType %q, got %q", i, expected.dataType, col.DataType) } if col.Table == nil || col.Table.Name != "users" { t.Errorf("Column %d: expected table 'users', got %v", i, col.Table) } } if len(result.Params) != 1 { t.Errorf("Expected 1 parameter, got %d", len(result.Params)) } } func TestAnalyzer_InvalidQuery(t *testing.T) { db := config.Database{ Managed: true, } a := New(db) defer a.Close(context.Background()) ctx := context.Background() migrations := []string{ `CREATE TABLE users (id INTEGER PRIMARY KEY)`, } query := `SELECT * FROM nonexistent` node := &ast.TODO{} _, err := a.Analyze(ctx, node, query, migrations, nil) if err == nil { t.Error("Expected error for invalid query, got nil") } } func TestNormalizeType(t *testing.T) { tests := []struct { input string expected string }{ {"INTEGER", "integer"}, {"INT", "integer"}, {"BIGINT", "integer"}, {"TEXT", "text"}, {"VARCHAR(255)", "text"}, {"BLOB", "blob"}, {"REAL", "real"}, {"FLOAT", "real"}, {"DOUBLE", "real"}, {"BOOLEAN", "boolean"}, {"DATETIME", "datetime"}, {"", "any"}, } for _, tt := range tests { t.Run(tt.input, func(t *testing.T) { result := normalizeType(tt.input) if result != tt.expected { t.Errorf("normalizeType(%q) = %q, want %q", tt.input, result, tt.expected) } }) } } ================================================ FILE: internal/engine/sqlite/catalog.go ================================================ package sqlite import "github.com/sqlc-dev/sqlc/internal/sql/catalog" func NewCatalog() *catalog.Catalog { def := "main" return &catalog.Catalog{ DefaultSchema: def, Schemas: []*catalog.Schema{ defaultSchema(def), }, Extensions: map[string]struct{}{}, } } func newTestCatalog() *catalog.Catalog { return catalog.New("main") } ================================================ FILE: internal/engine/sqlite/catalog_test.go ================================================ package sqlite import ( "strconv" "strings" "testing" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" ) func TestUpdate(t *testing.T) { p := NewParser() for i, tc := range []struct { stmt string s *catalog.Schema }{ { ` CREATE TABLE foo (bar text); `, &catalog.Schema{ Name: "main", Tables: []*catalog.Table{ { Rel: &ast.TableName{Name: "foo"}, Columns: []*catalog.Column{ { Name: "bar", Type: ast.TypeName{Name: "text"}, }, }, }, }, }, }, { ` CREATE TABLE foo (bar text); ALTER TABLE foo RENAME TO baz; `, &catalog.Schema{ Name: "main", Tables: []*catalog.Table{ { Rel: &ast.TableName{Name: "baz"}, Columns: []*catalog.Column{ { Name: "bar", Type: ast.TypeName{Name: "text"}, }, }, }, }, }, }, { ` CREATE TABLE foo (bar text); ALTER TABLE foo ADD COLUMN baz bool; `, &catalog.Schema{ Name: "main", Tables: []*catalog.Table{ { Rel: &ast.TableName{Name: "foo"}, Columns: []*catalog.Column{ { Name: "bar", Type: ast.TypeName{Name: "text"}, }, { Name: "baz", Type: ast.TypeName{Name: "bool"}, }, }, }, }, }, }, { ` CREATE TABLE foo (bar text); ALTER TABLE foo RENAME COLUMN bar TO baz; `, &catalog.Schema{ Name: "main", Tables: []*catalog.Table{ { Rel: &ast.TableName{Name: "foo"}, Columns: []*catalog.Column{ { Name: "baz", Type: ast.TypeName{Name: "text"}, }, }, }, }, }, }, { ` CREATE TABLE foo (bar text); ALTER TABLE foo RENAME bar TO baz; `, &catalog.Schema{ Name: "main", Tables: []*catalog.Table{ { Rel: &ast.TableName{Name: "foo"}, Columns: []*catalog.Column{ { Name: "baz", Type: ast.TypeName{Name: "text"}, }, }, }, }, }, }, { ` ATTACH ':memory:' as ns; CREATE TABLE ns.foo (bar text); `, &catalog.Schema{ Name: "ns", Tables: []*catalog.Table{ { Rel: &ast.TableName{Schema: "ns", Name: "foo"}, Columns: []*catalog.Column{ { Name: "bar", Type: ast.TypeName{Name: "text"}, }, }, }, }, }, }, { ` ATTACH ':memory:' as ns; CREATE TABLE ns.foo (bar text); ALTER TABLE ns.foo RENAME TO baz; `, &catalog.Schema{ Name: "ns", Tables: []*catalog.Table{ { Rel: &ast.TableName{Schema: "ns", Name: "baz"}, Columns: []*catalog.Column{ { Name: "bar", Type: ast.TypeName{Name: "text"}, }, }, }, }, }, }, { ` ATTACH ':memory:' as ns; CREATE TABLE ns.foo (bar text); ALTER TABLE ns.foo ADD COLUMN baz bool; `, &catalog.Schema{ Name: "ns", Tables: []*catalog.Table{ { Rel: &ast.TableName{Schema: "ns", Name: "foo"}, Columns: []*catalog.Column{ { Name: "bar", Type: ast.TypeName{Name: "text"}, }, { Name: "baz", Type: ast.TypeName{Name: "bool"}, }, }, }, }, }, }, { ` ATTACH ':memory:' as ns; CREATE TABLE ns.foo (bar text); ALTER TABLE ns.foo RENAME COLUMN bar TO baz; `, &catalog.Schema{ Name: "ns", Tables: []*catalog.Table{ { Rel: &ast.TableName{Schema: "ns", Name: "foo"}, Columns: []*catalog.Column{ { Name: "baz", Type: ast.TypeName{Name: "text"}, }, }, }, }, }, }, { ` ATTACH ':memory:' as ns; CREATE TABLE ns.foo (bar text); ALTER TABLE ns.foo RENAME bar TO baz; `, &catalog.Schema{ Name: "ns", Tables: []*catalog.Table{ { Rel: &ast.TableName{Schema: "ns", Name: "foo"}, Columns: []*catalog.Column{ { Name: "baz", Type: ast.TypeName{Name: "text"}, }, }, }, }, }, }, } { test := tc t.Run(strconv.Itoa(i), func(t *testing.T) { stmts, err := p.Parse(strings.NewReader(test.stmt)) if err != nil { t.Log(test.stmt) t.Fatal(err) } c := newTestCatalog() if err := c.Build(stmts); err != nil { t.Log(test.stmt) t.Fatal(err) } e := newTestCatalog() if test.s != nil { var replaced bool for i := range e.Schemas { if e.Schemas[i].Name == test.s.Name { e.Schemas[i] = test.s replaced = true break } } if !replaced { e.Schemas = append(e.Schemas, test.s) } } if diff := cmp.Diff(e, c, cmpopts.EquateEmpty(), cmpopts.IgnoreUnexported(catalog.Column{})); diff != "" { t.Log(test.stmt) t.Errorf("catalog mismatch:\n%s", diff) } }) } } ================================================ FILE: internal/engine/sqlite/convert.go ================================================ package sqlite import ( "fmt" "log" "strconv" "strings" "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" ) type cc struct { paramCount int } type node interface { GetParser() antlr.Parser } func todo(funcname string, n node) *ast.TODO { if debug.Active { log.Printf("sqlite.%s: Unknown node type %T\n", funcname, n) } return &ast.TODO{} } func identifier(id string) string { if len(id) >= 2 && id[0] == '"' && id[len(id)-1] == '"' { unquoted, _ := strconv.Unquote(id) return unquoted } return strings.ToLower(id) } func NewIdentifier(t string) *ast.String { return &ast.String{Str: identifier(t)} } 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 := identifier(newTable.Any_name().GetText()) return &ast.RenameTableStmt{ Table: parseTableName(n), NewName: &name, } } if newCol, ok := n.GetNew_column_name().(*parser.Column_nameContext); ok { name := identifier(newCol.Any_name().GetText()) return &ast.RenameColumnStmt{ Table: parseTableName(n), Col: &ast.ColumnRef{ Name: identifier(n.GetOld_column_name().GetText()), }, NewName: &name, } } } if n.ADD_() != nil { if def, ok := n.Column_def().(*parser.Column_defContext); ok { stmt := &ast.AlterTableStmt{ Table: parseTableName(n), Cmds: &ast.List{}, } name := def.Column_name().GetText() stmt.Cmds.Items = append(stmt.Cmds.Items, &ast.AlterTableCmd{ Name: &name, Subtype: ast.AT_AddColumn, Def: &ast.ColumnDef{ Colname: name, TypeName: &ast.TypeName{ Name: def.Type_name().GetText(), }, IsNotNull: hasNotNullConstraint(def.AllColumn_constraint()), }, }) return stmt } } if n.DROP_() != nil { stmt := &ast.AlterTableStmt{ Table: parseTableName(n), Cmds: &ast.List{}, } name := n.Column_name(0).GetText() stmt.Cmds.Items = append(stmt.Cmds.Items, &ast.AlterTableCmd{ Name: &name, Subtype: ast.AT_DropColumn, }) return stmt } return todo("convertAlter_table_stmtContext", n) } func (c *cc) convertAttach_stmtContext(n *parser.Attach_stmtContext) ast.Node { name := n.Schema_name().GetText() return &ast.CreateSchemaStmt{ Name: &name, } } func (c *cc) convertCreate_table_stmtContext(n *parser.Create_table_stmtContext) ast.Node { stmt := &ast.CreateTableStmt{ Name: parseTableName(n), IfNotExists: n.EXISTS_() != nil, } for _, idef := range n.AllColumn_def() { if def, ok := idef.(*parser.Column_defContext); ok { typeName := "any" if def.Type_name() != nil { typeName = def.Type_name().GetText() } stmt.Cols = append(stmt.Cols, &ast.ColumnDef{ Colname: identifier(def.Column_name().GetText()), IsNotNull: hasNotNullConstraint(def.AllColumn_constraint()), TypeName: &ast.TypeName{Name: typeName}, }) } } return stmt } func (c *cc) convertCreate_virtual_table_stmtContext(n *parser.Create_virtual_table_stmtContext) ast.Node { switch moduleName := n.Module_name().GetText(); moduleName { case "fts5": // https://www.sqlite.org/fts5.html return c.convertCreate_virtual_table_fts5(n) default: return todo( fmt.Sprintf("create_virtual_table. unsupported module name: %q", moduleName), n, ) } } func (c *cc) convertCreate_virtual_table_fts5(n *parser.Create_virtual_table_stmtContext) ast.Node { stmt := &ast.CreateTableStmt{ Name: parseTableName(n), IfNotExists: n.EXISTS_() != nil, } for _, arg := range n.AllModule_argument() { var columnName string // For example: CREATE VIRTUAL TABLE tbl_ft USING fts5(b, c UNINDEXED) // * the 'b' column is parsed like Expr_qualified_column_nameContext // * the 'c' column is parsed like Column_defContext if columnExpr, ok := arg.Expr().(*parser.Expr_qualified_column_nameContext); ok { columnName = columnExpr.Column_name().GetText() } else if columnDef, ok := arg.Column_def().(*parser.Column_defContext); ok { columnName = columnDef.Column_name().GetText() } if columnName != "" { stmt.Cols = append(stmt.Cols, &ast.ColumnDef{ Colname: identifier(columnName), // you can not specify any column constraints in fts5, so we pass them manually IsNotNull: true, TypeName: &ast.TypeName{Name: "text"}, }) } } return stmt } func (c *cc) convertCreate_view_stmtContext(n *parser.Create_view_stmtContext) ast.Node { viewName := n.View_name().GetText() relation := &ast.RangeVar{ Relname: &viewName, } if n.Schema_name() != nil { schemaName := n.Schema_name().GetText() relation.Schemaname = &schemaName } return &ast.ViewStmt{ View: relation, Aliases: &ast.List{}, Query: c.convert(n.Select_stmt()), Replace: false, Options: &ast.List{}, WithCheckOption: ast.ViewCheckOption(0), } } type Delete_stmt interface { node Qualified_table_name() parser.IQualified_table_nameContext WHERE_() antlr.TerminalNode Expr() parser.IExprContext } func (c *cc) convertDelete_stmtContext(n Delete_stmt) ast.Node { if qualifiedName, ok := n.Qualified_table_name().(*parser.Qualified_table_nameContext); ok { tableName := identifier(qualifiedName.Table_name().GetText()) relation := &ast.RangeVar{ Relname: &tableName, } if qualifiedName.Schema_name() != nil { schemaName := qualifiedName.Schema_name().GetText() relation.Schemaname = &schemaName } if qualifiedName.Alias() != nil { alias := qualifiedName.Alias().GetText() relation.Alias = &ast.Alias{Aliasname: &alias} } relations := &ast.List{} relations.Items = append(relations.Items, relation) delete := &ast.DeleteStmt{ Relations: relations, WithClause: nil, } if n.WHERE_() != nil && n.Expr() != nil { delete.WhereClause = c.convert(n.Expr()) } if n, ok := n.(interface { Returning_clause() parser.IReturning_clauseContext }); ok { delete.ReturningList = c.convertReturning_caluseContext(n.Returning_clause()) } else { delete.ReturningList = c.convertReturning_caluseContext(nil) } if n, ok := n.(interface { Limit_stmt() parser.ILimit_stmtContext }); ok { limitCount, _ := c.convertLimit_stmtContext(n.Limit_stmt()) delete.LimitCount = limitCount } return delete } return todo("convertDelete_stmtContext", n) } func (c *cc) convertDrop_stmtContext(n *parser.Drop_stmtContext) ast.Node { if n.TABLE_() != nil || n.VIEW_() != nil { name := ast.TableName{ Name: identifier(n.Any_name().GetText()), } if n.Schema_name() != nil { name.Schema = n.Schema_name().GetText() } return &ast.DropTableStmt{ IfExists: n.EXISTS_() != nil, Tables: []*ast.TableName{&name}, } } return todo("convertDrop_stmtContext", n) } func (c *cc) convertFuncContext(n *parser.Expr_functionContext) ast.Node { if name, ok := n.Qualified_function_name().(*parser.Qualified_function_nameContext); ok { funcName := strings.ToLower(name.Function_name().GetText()) schema := "" if name.Schema_name() != nil { schema = name.Schema_name().GetText() } var argNodes []ast.Node for _, exp := range n.AllExpr() { argNodes = append(argNodes, c.convert(exp)) } args := &ast.List{Items: argNodes} if funcName == "coalesce" { return &ast.CoalesceExpr{ Args: args, Location: name.GetStart().GetStart(), } } else { return &ast.FuncCall{ Func: &ast.FuncName{ Schema: schema, Name: funcName, }, Funcname: &ast.List{ Items: []ast.Node{ NewIdentifier(funcName), }, }, AggStar: n.STAR() != nil, Args: args, AggOrder: &ast.List{}, AggDistinct: n.DISTINCT_() != nil, Location: name.GetStart().GetStart(), } } } return todo("convertFuncContext", n) } func (c *cc) convertExprContext(n *parser.ExprContext) ast.Node { return &ast.Expr{} } func (c *cc) convertColumnNameExpr(n *parser.Expr_qualified_column_nameContext) *ast.ColumnRef { var items []ast.Node if schema, ok := n.Schema_name().(*parser.Schema_nameContext); ok { schemaText := schema.GetText() if schemaText != "" { items = append(items, NewIdentifier(schemaText)) } } if table, ok := n.Table_name().(*parser.Table_nameContext); ok { tableName := table.GetText() if tableName != "" { items = append(items, NewIdentifier(tableName)) } } items = append(items, NewIdentifier(n.Column_name().GetText())) return &ast.ColumnRef{ Fields: &ast.List{ Items: items, }, Location: n.GetStart().GetStart(), } } func (c *cc) convertComparison(n *parser.Expr_comparisonContext) ast.Node { lexpr := c.convert(n.Expr(0)) if n.IN_() != nil { rexprs := []ast.Node{} for _, expr := range n.AllExpr()[1:] { e := c.convert(expr) switch t := e.(type) { case *ast.List: rexprs = append(rexprs, t.Items...) default: rexprs = append(rexprs, t) } } return &ast.In{ Expr: lexpr, List: rexprs, Not: false, Sel: nil, Location: n.GetStart().GetStart(), } } return &ast.A_Expr{ Name: &ast.List{ Items: []ast.Node{ &ast.String{Str: "="}, // TODO: add actual comparison }, }, Lexpr: lexpr, Rexpr: c.convert(n.Expr(1)), } } func (c *cc) convertMultiSelect_stmtContext(n *parser.Select_stmtContext) ast.Node { var ctes ast.List if ct := n.Common_table_stmt(); ct != nil { recursive := ct.RECURSIVE_() != nil for _, cte := range ct.AllCommon_table_expression() { tableName := identifier(cte.Table_name().GetText()) var cteCols ast.List for _, col := range cte.AllColumn_name() { cteCols.Items = append(cteCols.Items, NewIdentifier(col.GetText())) } ctes.Items = append(ctes.Items, &ast.CommonTableExpr{ Ctename: &tableName, Ctequery: c.convert(cte.Select_stmt()), Location: cte.GetStart().GetStart(), Cterecursive: recursive, Ctecolnames: &cteCols, }) } } var selectStmt *ast.SelectStmt for s, icore := range n.AllSelect_core() { core, ok := icore.(*parser.Select_coreContext) if !ok { continue } cols := c.getCols(core) tables := c.getTables(core) var where ast.Node i := 0 if core.WHERE_() != nil { where = c.convert(core.Expr(i)) i++ } var groups ast.List var having ast.Node if core.GROUP_() != nil { l := len(core.AllExpr()) - i if core.HAVING_() != nil { having = c.convert(core.Expr(l)) l-- } for i < l { groups.Items = append(groups.Items, c.convert(core.Expr(i))) i++ } } var window ast.List if core.WINDOW_() != nil { for w, windowNameCtx := range core.AllWindow_name() { windowName := identifier(windowNameCtx.GetText()) windowDef := core.Window_defn(w) _ = windowDef.Base_window_name() var partitionBy ast.List if windowDef.PARTITION_() != nil { for _, e := range windowDef.AllExpr() { partitionBy.Items = append(partitionBy.Items, c.convert(e)) } } var orderBy ast.List if windowDef.ORDER_() != nil { for _, e := range windowDef.AllOrdering_term() { oterm := e.(*parser.Ordering_termContext) sortByDir := ast.SortByDirDefault if ad := oterm.Asc_desc(); ad != nil { if ad.ASC_() != nil { sortByDir = ast.SortByDirAsc } else { sortByDir = ast.SortByDirDesc } } sortByNulls := ast.SortByNullsDefault if oterm.NULLS_() != nil { if oterm.FIRST_() != nil { sortByNulls = ast.SortByNullsFirst } else { sortByNulls = ast.SortByNullsLast } } orderBy.Items = append(orderBy.Items, &ast.SortBy{ Node: c.convert(oterm.Expr()), SortbyDir: sortByDir, SortbyNulls: sortByNulls, UseOp: &ast.List{}, }) } } window.Items = append(window.Items, &ast.WindowDef{ Name: &windowName, PartitionClause: &partitionBy, OrderClause: &orderBy, FrameOptions: 0, // todo StartOffset: &ast.TODO{}, EndOffset: &ast.TODO{}, Location: windowNameCtx.GetStart().GetStart(), }) } } sel := &ast.SelectStmt{ FromClause: &ast.List{Items: tables}, TargetList: &ast.List{Items: cols}, WhereClause: where, GroupClause: &groups, HavingClause: having, WindowClause: &window, ValuesLists: &ast.List{}, } if selectStmt == nil { selectStmt = sel } else { co := n.Compound_operator(s - 1) so := ast.None all := false switch { case co.UNION_() != nil: so = ast.Union all = co.ALL_() != nil case co.INTERSECT_() != nil: so = ast.Intersect case co.EXCEPT_() != nil: so = ast.Except } selectStmt = &ast.SelectStmt{ TargetList: &ast.List{}, FromClause: &ast.List{}, Op: so, All: all, Larg: selectStmt, Rarg: sel, } } } limitCount, limitOffset := c.convertLimit_stmtContext(n.Limit_stmt()) selectStmt.LimitCount = limitCount selectStmt.LimitOffset = limitOffset // Only set WithClause if there are CTEs if len(ctes.Items) > 0 { selectStmt.WithClause = &ast.WithClause{Ctes: &ctes} } return selectStmt } func (c *cc) convertExprListContext(n *parser.Expr_listContext) ast.Node { list := &ast.List{Items: []ast.Node{}} for _, e := range n.AllExpr() { list.Items = append(list.Items, c.convert(e)) } return list } func (c *cc) getTables(core *parser.Select_coreContext) []ast.Node { if core.Join_clause() != nil { join := core.Join_clause().(*parser.Join_clauseContext) tables := c.convertTablesOrSubquery(join.AllTable_or_subquery()) table := tables[0] for i, t := range tables[1:] { joinExpr := &ast.JoinExpr{ Larg: table, Rarg: t, } jo := join.Join_operator(i) if jo.NATURAL_() != nil { joinExpr.IsNatural = true } switch { case jo.CROSS_() != nil || jo.INNER_() != nil: joinExpr.Jointype = ast.JoinTypeInner case jo.LEFT_() != nil: joinExpr.Jointype = ast.JoinTypeLeft case jo.RIGHT_() != nil: joinExpr.Jointype = ast.JoinTypeRight case jo.FULL_() != nil: joinExpr.Jointype = ast.JoinTypeFull } jc := join.Join_constraint(i) switch { case jc.ON_() != nil: joinExpr.Quals = c.convert(jc.Expr()) case jc.USING_() != nil: var using ast.List for _, cn := range jc.AllColumn_name() { using.Items = append(using.Items, NewIdentifier(cn.GetText())) } joinExpr.UsingClause = &using } table = joinExpr } return []ast.Node{table} } else { return c.convertTablesOrSubquery(core.AllTable_or_subquery()) } } func (c *cc) getCols(core *parser.Select_coreContext) []ast.Node { var cols []ast.Node for _, icol := range core.AllResult_column() { col, ok := icol.(*parser.Result_columnContext) if !ok { continue } target := &ast.ResTarget{ Location: col.GetStart().GetStart(), } var val ast.Node iexpr := col.Expr() switch { case col.STAR() != nil: val = c.convertWildCardField(col) case iexpr != nil: val = c.convert(iexpr) } if val == nil { continue } if col.Column_alias() != nil { name := identifier(col.Column_alias().GetText()) target.Name = &name } target.Val = val cols = append(cols, target) } return cols } func (c *cc) convertWildCardField(n *parser.Result_columnContext) *ast.ColumnRef { items := []ast.Node{} if n.Table_name() != nil { items = append(items, NewIdentifier(n.Table_name().GetText())) } items = append(items, &ast.A_Star{}) return &ast.ColumnRef{ Fields: &ast.List{ Items: items, }, Location: n.GetStart().GetStart(), } } func (c *cc) convertOrderby_stmtContext(n parser.IOrder_by_stmtContext) ast.Node { if orderBy, ok := n.(*parser.Order_by_stmtContext); ok { list := &ast.List{Items: []ast.Node{}} for _, o := range orderBy.AllOrdering_term() { term, ok := o.(*parser.Ordering_termContext) if !ok { continue } list.Items = append(list.Items, &ast.CaseExpr{ Xpr: c.convert(term.Expr()), Location: term.Expr().GetStart().GetStart(), }) } return list } return todo("convertOrderby_stmtContext", n) } func (c *cc) convertLimit_stmtContext(n parser.ILimit_stmtContext) (ast.Node, ast.Node) { if n == nil { return nil, nil } var limitCount, limitOffset ast.Node if limit, ok := n.(*parser.Limit_stmtContext); ok { limitCount = c.convert(limit.Expr(0)) if limit.OFFSET_() != nil { limitOffset = c.convert(limit.Expr(1)) } } return limitCount, limitOffset } func (c *cc) convertSql_stmtContext(n *parser.Sql_stmtContext) ast.Node { if stmt := n.Alter_table_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Analyze_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Attach_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Begin_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Commit_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Create_index_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Create_table_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Create_trigger_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Create_view_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Create_virtual_table_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Delete_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Delete_stmt_limited(); stmt != nil { return c.convert(stmt) } if stmt := n.Detach_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Drop_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Insert_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Pragma_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Reindex_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Release_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Rollback_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Savepoint_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Select_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Update_stmt(); stmt != nil { return c.convert(stmt) } if stmt := n.Update_stmt_limited(); stmt != nil { return c.convert(stmt) } if stmt := n.Vacuum_stmt(); stmt != nil { return c.convert(stmt) } return nil } func (c *cc) convertLiteral(n *parser.Expr_literalContext) ast.Node { if literal, ok := n.Literal_value().(*parser.Literal_valueContext); ok { if literal.NUMERIC_LITERAL() != nil { i, _ := strconv.ParseInt(literal.GetText(), 10, 64) return &ast.A_Const{ Val: &ast.Integer{Ival: i}, Location: n.GetStart().GetStart(), } } if literal.STRING_LITERAL() != nil { // remove surrounding single quote text := literal.GetText() return &ast.A_Const{ Val: &ast.String{Str: text[1 : len(text)-1]}, Location: n.GetStart().GetStart(), } } if literal.TRUE_() != nil || literal.FALSE_() != nil { var i int64 if literal.TRUE_() != nil { i = 1 } return &ast.A_Const{ Val: &ast.Integer{Ival: i}, Location: n.GetStart().GetStart(), } } if literal.NULL_() != nil { return &ast.A_Const{ Val: &ast.Null{}, Location: n.GetStart().GetStart(), } } } return todo("convertLiteral", n) } func (c *cc) convertBinaryNode(n *parser.Expr_binaryContext) ast.Node { return &ast.A_Expr{ Name: &ast.List{ Items: []ast.Node{ &ast.String{Str: n.GetChild(1).(antlr.TerminalNode).GetText()}, }, }, Lexpr: c.convert(n.Expr(0)), Rexpr: c.convert(n.Expr(1)), } } func (c *cc) convertBoolNode(n *parser.Expr_boolContext) ast.Node { var op ast.BoolExprType if n.AND_() != nil { op = ast.BoolExprTypeAnd } else if n.OR_() != nil { op = ast.BoolExprTypeOr } return &ast.BoolExpr{ Boolop: op, Args: &ast.List{ Items: []ast.Node{ c.convert(n.Expr(0)), c.convert(n.Expr(1)), }, }, } } func (c *cc) convertUnaryExpr(n *parser.Expr_unaryContext) ast.Node { op := n.Unary_operator() if op == nil { return c.convert(n.Expr()) } // Get the inner expression expr := c.convert(n.Expr()) // Check the operator type if opCtx, ok := op.(*parser.Unary_operatorContext); ok { if opCtx.NOT_() != nil { // NOT expression return &ast.BoolExpr{ Boolop: ast.BoolExprTypeNot, Args: &ast.List{ Items: []ast.Node{expr}, }, } } if opCtx.MINUS() != nil { // Negative number: -expr return &ast.A_Expr{ Name: &ast.List{Items: []ast.Node{&ast.String{Str: "-"}}}, Rexpr: expr, } } if opCtx.PLUS() != nil { // Positive number: +expr (just return expr) return expr } if opCtx.TILDE() != nil { // Bitwise NOT: ~expr return &ast.A_Expr{ Name: &ast.List{Items: []ast.Node{&ast.String{Str: "~"}}}, Rexpr: expr, } } } return expr } func (c *cc) convertParam(n *parser.Expr_bindContext) ast.Node { if n.NUMBERED_BIND_PARAMETER() != nil { // Parameter numbers start at one c.paramCount += 1 text := n.GetText() number := c.paramCount if len(text) > 1 { number, _ = strconv.Atoi(text[1:]) } return &ast.ParamRef{ Number: number, Location: n.GetStart().GetStart(), Dollar: len(text) > 1, } } if n.NAMED_BIND_PARAMETER() != nil { return &ast.A_Expr{ Name: &ast.List{Items: []ast.Node{&ast.String{Str: "@"}}}, Rexpr: &ast.String{Str: n.GetText()[1:]}, Location: n.GetStart().GetStart(), } } return todo("convertParam", n) } func (c *cc) convertInSelectNode(n *parser.Expr_in_selectContext) ast.Node { // Check if this is EXISTS or NOT EXISTS if n.EXISTS_() != nil { linkType := ast.EXISTS_SUBLINK sublink := &ast.SubLink{ SubLinkType: linkType, Subselect: c.convert(n.Select_stmt()), } if n.NOT_() != nil { // NOT EXISTS is represented as a BoolExpr NOT wrapping the EXISTS return &ast.BoolExpr{ Boolop: ast.BoolExprTypeNot, Args: &ast.List{ Items: []ast.Node{sublink}, }, } } return sublink } // Check if this is an IN/NOT IN expression: expr IN (SELECT ...) if n.IN_() != nil && len(n.AllExpr()) > 0 { linkType := ast.ANY_SUBLINK sublink := &ast.SubLink{ SubLinkType: linkType, Testexpr: c.convert(n.Expr(0)), Subselect: c.convert(n.Select_stmt()), } if n.NOT_() != nil { return &ast.A_Expr{ Kind: ast.A_Expr_Kind_OP, Name: &ast.List{Items: []ast.Node{&ast.String{Str: "NOT IN"}}}, Lexpr: c.convert(n.Expr(0)), Rexpr: &ast.SubLink{ SubLinkType: ast.EXPR_SUBLINK, Subselect: c.convert(n.Select_stmt()), }, } } return sublink } // Plain subquery in parentheses (SELECT ...) return &ast.SubLink{ SubLinkType: ast.EXPR_SUBLINK, Subselect: c.convert(n.Select_stmt()), } } func (c *cc) convertReturning_caluseContext(n parser.IReturning_clauseContext) *ast.List { list := &ast.List{Items: []ast.Node{}} if n == nil { return list } r, ok := n.(*parser.Returning_clauseContext) if !ok { return list } for _, exp := range r.AllExpr() { list.Items = append(list.Items, &ast.ResTarget{ Indirection: &ast.List{}, Val: c.convert(exp), }) } for _, star := range r.AllSTAR() { list.Items = append(list.Items, &ast.ResTarget{ Indirection: &ast.List{}, Val: &ast.ColumnRef{ Fields: &ast.List{ Items: []ast.Node{&ast.A_Star{}}, }, Location: star.GetSymbol().GetStart(), }, Location: star.GetSymbol().GetStart(), }) } return list } func (c *cc) convertInsert_stmtContext(n *parser.Insert_stmtContext) ast.Node { tableName := identifier(n.Table_name().GetText()) rel := &ast.RangeVar{ Relname: &tableName, } if n.Schema_name() != nil { schemaName := n.Schema_name().GetText() rel.Schemaname = &schemaName } if n.Table_alias() != nil { tableAlias := identifier(n.Table_alias().GetText()) rel.Alias = &ast.Alias{ Aliasname: &tableAlias, } } insert := &ast.InsertStmt{ Relation: rel, Cols: c.convertColumnNames(n.AllColumn_name()), ReturningList: c.convertReturning_caluseContext(n.Returning_clause()), } // 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, set the flag instead of creating an empty values list insert.DefaultValues = true } else if n.Select_stmt() != nil { if ss, ok := c.convert(n.Select_stmt()).(*ast.SelectStmt); ok { ss.ValuesLists = &ast.List{} insert.SelectStmt = ss } } else { var valuesLists ast.List var values *ast.List for _, cn := range n.GetChildren() { switch cn := cn.(type) { case antlr.TerminalNode: switch cn.GetSymbol().GetTokenType() { case parser.SQLiteParserVALUES_: values = &ast.List{} case parser.SQLiteParserOPEN_PAR: if values != nil { values = &ast.List{} } case parser.SQLiteParserCOMMA: case parser.SQLiteParserCLOSE_PAR: if values != nil { valuesLists.Items = append(valuesLists.Items, values) } } case parser.IExprContext: if values != nil { values.Items = append(values.Items, c.convert(cn)) } } } insert.SelectStmt = &ast.SelectStmt{ FromClause: &ast.List{}, TargetList: &ast.List{}, ValuesLists: &valuesLists, } } return insert } func (c *cc) convertColumnNames(cols []parser.IColumn_nameContext) *ast.List { list := &ast.List{Items: []ast.Node{}} for _, c := range cols { name := identifier(c.GetText()) list.Items = append(list.Items, &ast.ResTarget{ Name: &name, }) } return list } func (c *cc) convertTablesOrSubquery(n []parser.ITable_or_subqueryContext) []ast.Node { var tables []ast.Node for _, ifrom := range n { from, ok := ifrom.(*parser.Table_or_subqueryContext) if !ok { continue } if from.Table_name() != nil { rel := identifier(from.Table_name().GetText()) rv := &ast.RangeVar{ Relname: &rel, Location: from.GetStart().GetStart(), } if from.Schema_name() != nil { schema := from.Schema_name().GetText() rv.Schemaname = &schema } if from.Table_alias() != nil { alias := identifier(from.Table_alias().GetText()) rv.Alias = &ast.Alias{Aliasname: &alias} } if from.Table_alias_fallback() != nil { alias := identifier(from.Table_alias_fallback().GetText()) rv.Alias = &ast.Alias{Aliasname: &alias} } tables = append(tables, rv) } else if from.Table_function_name() != nil { rel := from.Table_function_name().GetText() // Convert function arguments var args []ast.Node for _, expr := range from.AllExpr() { args = append(args, c.convert(expr)) } rf := &ast.RangeFunction{ Functions: &ast.List{ Items: []ast.Node{ &ast.FuncCall{ Func: &ast.FuncName{ Name: rel, }, Funcname: &ast.List{ Items: []ast.Node{ NewIdentifier(rel), }, }, Args: &ast.List{ Items: args, }, Location: from.GetStart().GetStart(), }, }, }, } if from.Table_alias() != nil { alias := identifier(from.Table_alias().GetText()) rf.Alias = &ast.Alias{Aliasname: &alias} } tables = append(tables, rf) } else if from.Select_stmt() != nil { rs := &ast.RangeSubselect{ Subquery: c.convert(from.Select_stmt()), } if from.Table_alias() != nil { alias := identifier(from.Table_alias().GetText()) rs.Alias = &ast.Alias{Aliasname: &alias} } tables = append(tables, rs) } } return tables } type Update_stmt interface { Qualified_table_name() parser.IQualified_table_nameContext GetStart() antlr.Token AllColumn_name() []parser.IColumn_nameContext WHERE_() antlr.TerminalNode Expr(i int) parser.IExprContext AllExpr() []parser.IExprContext } func (c *cc) convertUpdate_stmtContext(n Update_stmt) ast.Node { if n == nil { return nil } relations := &ast.List{} tableName := identifier(n.Qualified_table_name().GetText()) rel := ast.RangeVar{ Relname: &tableName, Location: n.GetStart().GetStart(), } relations.Items = append(relations.Items, &rel) list := &ast.List{} for i, col := range n.AllColumn_name() { colName := identifier(col.GetText()) target := &ast.ResTarget{ Name: &colName, Val: c.convert(n.Expr(i)), } list.Items = append(list.Items, target) } var where ast.Node = nil if n.WHERE_() != nil { where = c.convert(n.Expr(len(n.AllExpr()) - 1)) } stmt := &ast.UpdateStmt{ Relations: relations, TargetList: list, WhereClause: where, FromClause: &ast.List{}, WithClause: nil, // TODO: support with clause } if n, ok := n.(interface { Returning_clause() parser.IReturning_clauseContext }); ok { stmt.ReturningList = c.convertReturning_caluseContext(n.Returning_clause()) } else { stmt.ReturningList = c.convertReturning_caluseContext(nil) } if n, ok := n.(interface { Limit_stmt() parser.ILimit_stmtContext }); ok { limitCount, _ := c.convertLimit_stmtContext(n.Limit_stmt()) stmt.LimitCount = limitCount } return stmt } func (c *cc) convertBetweenExpr(n *parser.Expr_betweenContext) ast.Node { return &ast.BetweenExpr{ Expr: c.convert(n.Expr(0)), Left: c.convert(n.Expr(1)), Right: c.convert(n.Expr(2)), Location: n.GetStart().GetStart(), Not: n.NOT_() != nil, } } func (c *cc) convertCastExpr(n *parser.Expr_castContext) ast.Node { name := n.Type_name().GetText() return &ast.TypeCast{ Arg: c.convert(n.Expr()), TypeName: &ast.TypeName{ Name: name, Names: &ast.List{Items: []ast.Node{ NewIdentifier(name), }}, ArrayBounds: &ast.List{}, }, Location: n.GetStart().GetStart(), } } func (c *cc) convertCollateExpr(n *parser.Expr_collateContext) ast.Node { return &ast.CollateExpr{ Xpr: c.convert(n.Expr()), Arg: NewIdentifier(n.Collation_name().GetText()), Location: n.GetStart().GetStart(), } } 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) { case *parser.Alter_table_stmtContext: return c.convertAlter_table_stmtContext(n) case *parser.Attach_stmtContext: return c.convertAttach_stmtContext(n) case *parser.Create_table_stmtContext: return c.convertCreate_table_stmtContext(n) case *parser.Create_virtual_table_stmtContext: return c.convertCreate_virtual_table_stmtContext(n) case *parser.Create_view_stmtContext: return c.convertCreate_view_stmtContext(n) case *parser.Drop_stmtContext: return c.convertDrop_stmtContext(n) case *parser.Delete_stmtContext: return c.convertDelete_stmtContext(n) case *parser.Delete_stmt_limitedContext: return c.convertDelete_stmtContext(n) case *parser.ExprContext: return c.convertExprContext(n) case *parser.Expr_functionContext: return c.convertFuncContext(n) case *parser.Expr_qualified_column_nameContext: return c.convertColumnNameExpr(n) case *parser.Expr_comparisonContext: return c.convertComparison(n) case *parser.Expr_bindContext: return c.convertParam(n) case *parser.Expr_literalContext: return c.convertLiteral(n) case *parser.Expr_boolContext: return c.convertBoolNode(n) case *parser.Expr_listContext: return c.convertExprListContext(n) case *parser.Expr_binaryContext: return c.convertBinaryNode(n) case *parser.Expr_unaryContext: return c.convertUnaryExpr(n) case *parser.Expr_in_selectContext: return c.convertInSelectNode(n) case *parser.Expr_betweenContext: return c.convertBetweenExpr(n) case *parser.Expr_collateContext: return c.convertCollateExpr(n) case *parser.Factored_select_stmtContext: // TODO: need to handle this return todo("convert(case=parser.Factored_select_stmtContext)", n) case *parser.Insert_stmtContext: return c.convertInsert_stmtContext(n) case *parser.Order_by_stmtContext: return c.convertOrderby_stmtContext(n) case *parser.Select_stmtContext: return c.convertMultiSelect_stmtContext(n) case *parser.Sql_stmtContext: return c.convertSql_stmtContext(n) case *parser.Update_stmtContext: return c.convertUpdate_stmtContext(n) case *parser.Update_stmt_limitedContext: return c.convertUpdate_stmtContext(n) case *parser.Expr_castContext: return c.convertCastExpr(n) case *parser.Expr_caseContext: return c.convertCase(n) default: return todo("convert(case=default)", n) } } ================================================ FILE: internal/engine/sqlite/format.go ================================================ package sqlite // QuoteIdent returns a quoted identifier if it needs quoting. // SQLite uses double quotes for quoting identifiers (SQL standard), // though backticks are also supported for MySQL compatibility. func (p *Parser) QuoteIdent(s string) string { // For now, don't quote - return as-is return s } // TypeName returns the SQL type name for the given namespace and name. func (p *Parser) TypeName(ns, name string) string { if ns != "" { return ns + "." + name } return name } // Param returns the parameter placeholder for the given number. // SQLite uses ? for positional parameters. func (p *Parser) Param(n int) string { return "?" } // NamedParam returns the named parameter placeholder for the given name. // SQLite uses :name syntax for named parameters. func (p *Parser) NamedParam(name string) string { return ":" + name } // Cast returns a type cast expression. // SQLite uses CAST(expr AS type) syntax. func (p *Parser) Cast(arg, typeName string) string { return "CAST(" + arg + " AS " + typeName + ")" } ================================================ FILE: internal/engine/sqlite/parse.go ================================================ package sqlite import ( "errors" "fmt" "io" "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" ) type errorListener struct { *antlr.DefaultErrorListener err string } func (el *errorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException) { el.err = msg } // func (el *errorListener) ReportAmbiguity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, exact bool, ambigAlts *antlr.BitSet, configs antlr.ATNConfigSet) { // } // // func (el *errorListener) ReportAttemptingFullContext(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, conflictingAlts *antlr.BitSet, configs antlr.ATNConfigSet) { // } // // func (el *errorListener) ReportContextSensitivity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex, prediction int, configs antlr.ATNConfigSet) { // } func NewParser() *Parser { return &Parser{} } type Parser struct { } func (p *Parser) Parse(r io.Reader) ([]ast.Statement, error) { blob, err := io.ReadAll(r) if err != nil { return nil, err } input := antlr.NewInputStream(string(blob)) lexer := parser.NewSQLiteLexer(input) stream := antlr.NewCommonTokenStream(lexer, 0) pp := parser.NewSQLiteParser(stream) el := &errorListener{} pp.AddErrorListener(el) // pp.BuildParseTrees = true tree := pp.Parse() if el.err != "" { return nil, errors.New(el.err) } pctx, ok := tree.(*parser.ParseContext) if !ok { return nil, fmt.Errorf("expected ParserContext; got %T\n", tree) } var stmts []ast.Statement for _, istmt := range pctx.AllSql_stmt_list() { list, ok := istmt.(*parser.Sql_stmt_listContext) if !ok { return nil, fmt.Errorf("expected Sql_stmt_listContext; got %T\n", istmt) } loc := 0 for _, stmt := range list.AllSql_stmt() { converter := &cc{} out := converter.convert(stmt) if _, ok := out.(*ast.TODO); ok { loc = stmt.GetStop().GetStop() + 2 continue } len := (stmt.GetStop().GetStop() + 1) - loc stmts = append(stmts, ast.Statement{ Raw: &ast.RawStmt{ Stmt: out, StmtLocation: loc, StmtLen: len, }, }) loc = stmt.GetStop().GetStop() + 2 } } return stmts, nil } func (p *Parser) CommentSyntax() source.CommentSyntax { return source.CommentSyntax{ Dash: true, Hash: false, SlashStar: true, } } ================================================ FILE: internal/engine/sqlite/parser/.gitignore ================================================ antlr-4.12.0-complete.jar ================================================ FILE: internal/engine/sqlite/parser/Makefile ================================================ 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.13.1-complete.jar: curl -O https://www.antlr.org/download/antlr-4.13.1-complete.jar ================================================ FILE: internal/engine/sqlite/parser/SQLiteLexer.g4 ================================================ /* * The MIT License (MIT) * * Copyright (c) 2020 by Martin Mirchev * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and * associated documentation files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, publish, distribute, * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or * substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Project : sqlite-parser; an ANTLR4 grammar for SQLite https://github.com/bkiers/sqlite-parser * Developed by : Bart Kiers, bart@big-o.nl */ // $antlr-format alignTrailingComments on, columnLimit 150, maxEmptyLinesToKeep 1, reflowComments off, useTab off // $antlr-format allowShortRulesOnASingleLine on, alignSemicolons ownLine lexer grammar SQLiteLexer; SCOL: ';'; DOT: '.'; OPEN_PAR: '('; CLOSE_PAR: ')'; COMMA: ','; ASSIGN: '='; STAR: '*'; PLUS: '+'; PTR2: '->>'; PTR: '->'; MINUS: '-'; TILDE: '~'; PIPE2: '||'; DIV: '/'; MOD: '%'; LT2: '<<'; GT2: '>>'; AMP: '&'; PIPE: '|'; LT: '<'; LT_EQ: '<='; GT: '>'; GT_EQ: '>='; EQ: '=='; NOT_EQ1: '!='; NOT_EQ2: '<>'; // http://www.sqlite.org/lang_keywords.html ABORT_: A B O R T; ACTION_: A C T I O N; ADD_: A D D; AFTER_: A F T E R; ALL_: A L L; ALTER_: A L T E R; ANALYZE_: A N A L Y Z E; AND_: A N D; AS_: A S; ASC_: A S C; ATTACH_: A T T A C H; AUTOINCREMENT_: A U T O I N C R E M E N T; BEFORE_: B E F O R E; BEGIN_: B E G I N; BETWEEN_: B E T W E E N; BY_: B Y; CASCADE_: C A S C A D E; CASE_: C A S E; CAST_: C A S T; CHECK_: C H E C K; COLLATE_: C O L L A T E; COLUMN_: C O L U M N; COMMIT_: C O M M I T; CONFLICT_: C O N F L I C T; CONSTRAINT_: C O N S T R A I N T; CREATE_: C R E A T E; CROSS_: C R O S S; CURRENT_DATE_: C U R R E N T '_' D A T E; CURRENT_TIME_: C U R R E N T '_' T I M E; CURRENT_TIMESTAMP_: C U R R E N T '_' T I M E S T A M P; DATABASE_: D A T A B A S E; DEFAULT_: D E F A U L T; DEFERRABLE_: D E F E R R A B L E; DEFERRED_: D E F E R R E D; DELETE_: D E L E T E; DESC_: D E S C; DETACH_: D E T A C H; DISTINCT_: D I S T I N C T; DROP_: D R O P; EACH_: E A C H; ELSE_: E L S E; END_: E N D; ESCAPE_: E S C A P E; EXCEPT_: E X C E P T; EXCLUSIVE_: E X C L U S I V E; EXISTS_: E X I S T S; EXPLAIN_: E X P L A I N; FAIL_: F A I L; FOR_: F O R; FOREIGN_: F O R E I G N; FROM_: F R O M; FULL_: F U L L; GLOB_: G L O B; GROUP_: G R O U P; HAVING_: H A V I N G; IF_: I F; IGNORE_: I G N O R E; IMMEDIATE_: I M M E D I A T E; IN_: I N; INDEX_: I N D E X; INDEXED_: I N D E X E D; INITIALLY_: I N I T I A L L Y; INNER_: I N N E R; INSERT_: I N S E R T; INSTEAD_: I N S T E A D; INTERSECT_: I N T E R S E C T; INTO_: I N T O; IS_: I S; ISNULL_: I S N U L L; JOIN_: J O I N; KEY_: K E Y; LEFT_: L E F T; LIKE_: L I K E; LIMIT_: L I M I T; MATCH_: M A T C H; NATURAL_: N A T U R A L; NO_: N O; NOT_: N O T; NOTNULL_: N O T N U L L; NULL_: N U L L; OF_: O F; OFFSET_: O F F S E T; ON_: O N; OR_: O R; ORDER_: O R D E R; OUTER_: O U T E R; PLAN_: P L A N; PRAGMA_: P R A G M A; PRIMARY_: P R I M A R Y; QUERY_: Q U E R Y; RAISE_: R A I S E; RECURSIVE_: R E C U R S I V E; REFERENCES_: R E F E R E N C E S; REGEXP_: R E G E X P; REINDEX_: R E I N D E X; RELEASE_: R E L E A S E; RENAME_: R E N A M E; REPLACE_: R E P L A C E; RESTRICT_: R E S T R I C T; RETURNING_: R E T U R N I N G; RIGHT_: R I G H T; ROLLBACK_: R O L L B A C K; ROW_: R O W; ROWS_: R O W S; SAVEPOINT_: S A V E P O I N T; SELECT_: S E L E C T; SET_: S E T; STRICT_: S T R I C T; TABLE_: T A B L E; TEMP_: T E M P; TEMPORARY_: T E M P O R A R Y; THEN_: T H E N; TO_: T O; TRANSACTION_: T R A N S A C T I O N; TRIGGER_: T R I G G E R; UNION_: U N I O N; UNIQUE_: U N I Q U E; UPDATE_: U P D A T E; USING_: U S I N G; VACUUM_: V A C U U M; VALUES_: V A L U E S; VIEW_: V I E W; VIRTUAL_: V I R T U A L; WHEN_: W H E N; WHERE_: W H E R E; WITH_: W I T H; WITHOUT_: W I T H O U T; FIRST_VALUE_: F I R S T '_' V A L U E; OVER_: O V E R; PARTITION_: P A R T I T I O N; RANGE_: R A N G E; PRECEDING_: P R E C E D I N G; UNBOUNDED_: U N B O U N D E D; CURRENT_: C U R R E N T; FOLLOWING_: F O L L O W I N G; CUME_DIST_: C U M E '_' D I S T; DENSE_RANK_: D E N S E '_' R A N K; LAG_: L A G; LAST_VALUE_: L A S T '_' V A L U E; LEAD_: L E A D; NTH_VALUE_: N T H '_' V A L U E; NTILE_: N T I L E; PERCENT_RANK_: P E R C E N T '_' R A N K; RANK_: R A N K; ROW_NUMBER_: R O W '_' N U M B E R; GENERATED_: G E N E R A T E D; ALWAYS_: A L W A Y S; STORED_: S T O R E D; TRUE_: T R U E; FALSE_: F A L S E; WINDOW_: W I N D O W; NULLS_: N U L L S; FIRST_: F I R S T; LAST_: L A S T; FILTER_: F I L T E R; GROUPS_: G R O U P S; EXCLUDE_: E X C L U D E; TIES_: T I E S; OTHERS_: O T H E R S; DO_: D O; NOTHING_: N O T H I N G; IDENTIFIER: '"' (~'"' | '""')* '"' | '`' (~'`' | '``')* '`' | '[' ~']'* ']' | [a-zA-Z_] [a-zA-Z_0-9]* ; // TODO check: needs more chars in set NUMERIC_LITERAL: ((DIGIT+ ('.' DIGIT*)?) | ('.' DIGIT+)) (E [-+]? DIGIT+)? | '0x' HEX_DIGIT+; NUMBERED_BIND_PARAMETER: '?' DIGIT*; NAMED_BIND_PARAMETER: [:@$] IDENTIFIER; STRING_LITERAL: '\'' ( ~'\'' | '\'\'')* '\''; BLOB_LITERAL: X STRING_LITERAL; SINGLE_LINE_COMMENT: '--' ~[\r\n]* (('\r'? '\n') | EOF) -> channel(HIDDEN); MULTILINE_COMMENT: '/*' .*? '*/' -> channel(HIDDEN); SPACES: [ \u000B\t\r\n] -> channel(HIDDEN); UNEXPECTED_CHAR: .; fragment HEX_DIGIT: [0-9a-fA-F]; fragment DIGIT: [0-9]; fragment A: [aA]; fragment B: [bB]; fragment C: [cC]; fragment D: [dD]; fragment E: [eE]; fragment F: [fF]; fragment G: [gG]; fragment H: [hH]; fragment I: [iI]; fragment J: [jJ]; fragment K: [kK]; fragment L: [lL]; fragment M: [mM]; fragment N: [nN]; fragment O: [oO]; fragment P: [pP]; fragment Q: [qQ]; fragment R: [rR]; fragment S: [sS]; fragment T: [tT]; fragment U: [uU]; fragment V: [vV]; fragment W: [wW]; fragment X: [xX]; fragment Y: [yY]; fragment Z: [zZ]; ================================================ FILE: internal/engine/sqlite/parser/SQLiteLexer.interp ================================================ token literal names: null ';' '.' '(' ')' ',' '=' '*' '+' '->>' '->' '-' '~' '||' '/' '%' '<<' '>>' '&' '|' '<' '<=' '>' '>=' '==' '!=' '<>' null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null token symbolic names: null SCOL DOT OPEN_PAR CLOSE_PAR COMMA ASSIGN STAR 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 rule names: SCOL DOT OPEN_PAR CLOSE_PAR COMMA ASSIGN STAR 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 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 channel names: DEFAULT_TOKEN_CHANNEL HIDDEN mode names: DEFAULT_MODE atn: [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] ================================================ FILE: internal/engine/sqlite/parser/SQLiteLexer.tokens ================================================ SCOL=1 DOT=2 OPEN_PAR=3 CLOSE_PAR=4 COMMA=5 ASSIGN=6 STAR=7 PLUS=8 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 ')'=4 ','=5 '='=6 '*'=7 '+'=8 '->>'=9 '->'=10 '-'=11 '~'=12 '||'=13 '/'=14 '%'=15 '<<'=16 '>>'=17 '&'=18 '|'=19 '<'=20 '<='=21 '>'=22 '>='=23 '=='=24 '!='=25 '<>'=26 ================================================ FILE: internal/engine/sqlite/parser/SQLiteParser.g4 ================================================ /* * The MIT License (MIT) * * Copyright (c) 2014 by Bart Kiers * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and * associated documentation files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, publish, distribute, * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or * substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Project : sqlite-parser; an ANTLR4 grammar for SQLite https://github.com/bkiers/sqlite-parser * Developed by: * Bart Kiers, bart@big-o.nl * Martin Mirchev, marti_2203@abv.bg * Mike Lische, mike@lischke-online.de */ // $antlr-format alignTrailingComments on, columnLimit 130, minEmptyLines 1, maxEmptyLinesToKeep 1, reflowComments off // $antlr-format useTab off, allowShortRulesOnASingleLine off, allowShortBlocksOnASingleLine on, alignSemicolons ownLine parser grammar SQLiteParser; options { tokenVocab = SQLiteLexer; } parse: (sql_stmt_list)* EOF ; sql_stmt_list: SCOL* sql_stmt (SCOL+ sql_stmt)* SCOL* ; sql_stmt: (EXPLAIN_ (QUERY_ PLAN_)?)? ( alter_table_stmt | analyze_stmt | attach_stmt | begin_stmt | commit_stmt | create_index_stmt | create_table_stmt | create_trigger_stmt | create_view_stmt | create_virtual_table_stmt | delete_stmt | delete_stmt_limited | detach_stmt | drop_stmt | insert_stmt | pragma_stmt | reindex_stmt | release_stmt | rollback_stmt | savepoint_stmt | select_stmt | update_stmt | update_stmt_limited | vacuum_stmt ) ; alter_table_stmt: ALTER_ TABLE_ (schema_name DOT)? table_name ( RENAME_ ( TO_ new_table_name | COLUMN_? old_column_name = column_name TO_ new_column_name = column_name ) | ADD_ COLUMN_? column_def | DROP_ COLUMN_? column_name ) ; analyze_stmt: ANALYZE_ (schema_name | (schema_name DOT)? table_or_index_name)? ; attach_stmt: ATTACH_ DATABASE_? expr AS_ schema_name ; begin_stmt: BEGIN_ (DEFERRED_ | IMMEDIATE_ | EXCLUSIVE_)? ( TRANSACTION_ transaction_name? )? ; commit_stmt: (COMMIT_ | END_) TRANSACTION_? ; rollback_stmt: ROLLBACK_ TRANSACTION_? (TO_ SAVEPOINT_? savepoint_name)? ; savepoint_stmt: SAVEPOINT_ savepoint_name ; release_stmt: RELEASE_ SAVEPOINT_? savepoint_name ; create_index_stmt: CREATE_ UNIQUE_? INDEX_ (IF_ NOT_ EXISTS_)? (schema_name DOT)? index_name ON_ table_name OPEN_PAR indexed_column (COMMA indexed_column)* CLOSE_PAR (WHERE_ expr)? ; indexed_column: (column_name | expr) (COLLATE_ collation_name)? asc_desc? ; table_option: WITHOUT_ row_ROW_ID = IDENTIFIER | STRICT_ ; create_table_stmt: CREATE_ (TEMP_ | TEMPORARY_)? TABLE_ (IF_ NOT_ EXISTS_)? ( schema_name DOT )? table_name ( OPEN_PAR column_def (COMMA column_def)*? (COMMA table_constraint)* CLOSE_PAR ( table_option (COMMA table_option)* )? | AS_ select_stmt ) ; column_def: column_name type_name? column_constraint* ; type_name: name+? ( OPEN_PAR signed_number CLOSE_PAR | OPEN_PAR signed_number COMMA signed_number CLOSE_PAR )? ; column_constraint: (CONSTRAINT_ name)? ( (PRIMARY_ KEY_ asc_desc? conflict_clause? AUTOINCREMENT_?) | (NOT_ NULL_ | UNIQUE_) conflict_clause? | CHECK_ OPEN_PAR expr CLOSE_PAR | DEFAULT_ (signed_number | literal_value | OPEN_PAR expr CLOSE_PAR) | COLLATE_ collation_name | foreign_key_clause | (GENERATED_ ALWAYS_)? AS_ OPEN_PAR expr CLOSE_PAR ( STORED_ | VIRTUAL_ )? ) ; signed_number: (PLUS | MINUS)? NUMERIC_LITERAL ; table_constraint: (CONSTRAINT_ name)? ( (PRIMARY_ KEY_ | UNIQUE_) OPEN_PAR indexed_column ( COMMA indexed_column )* CLOSE_PAR conflict_clause? | CHECK_ OPEN_PAR expr CLOSE_PAR | FOREIGN_ KEY_ OPEN_PAR column_name (COMMA column_name)* CLOSE_PAR foreign_key_clause ) ; foreign_key_clause: REFERENCES_ foreign_table ( OPEN_PAR column_name (COMMA column_name)* CLOSE_PAR )? ( ON_ (DELETE_ | UPDATE_) ( SET_ (NULL_ | DEFAULT_) | CASCADE_ | RESTRICT_ | NO_ ACTION_ ) | MATCH_ name )* (NOT_? DEFERRABLE_ (INITIALLY_ (DEFERRED_ | IMMEDIATE_))?)? ; conflict_clause: ON_ CONFLICT_ ( ROLLBACK_ | ABORT_ | FAIL_ | IGNORE_ | REPLACE_ ) ; create_trigger_stmt: CREATE_ (TEMP_ | TEMPORARY_)? TRIGGER_ (IF_ NOT_ EXISTS_)? ( schema_name DOT )? trigger_name (BEFORE_ | AFTER_ | INSTEAD_ OF_)? ( DELETE_ | INSERT_ | UPDATE_ (OF_ column_name ( COMMA column_name)*)? ) ON_ table_name (FOR_ EACH_ ROW_)? (WHEN_ expr)? BEGIN_ ( (update_stmt | insert_stmt | delete_stmt | select_stmt) SCOL )+ END_ ; create_view_stmt: CREATE_ (TEMP_ | TEMPORARY_)? VIEW_ (IF_ NOT_ EXISTS_)? ( schema_name DOT )? view_name (OPEN_PAR column_name (COMMA column_name)* CLOSE_PAR)? AS_ select_stmt ; create_virtual_table_stmt: CREATE_ VIRTUAL_ TABLE_ (IF_ NOT_ EXISTS_)? (schema_name DOT)? table_name USING_ module_name ( OPEN_PAR module_argument (COMMA module_argument)* CLOSE_PAR )? ; with_clause: WITH_ RECURSIVE_? cte_table_name AS_ OPEN_PAR select_stmt CLOSE_PAR ( COMMA cte_table_name AS_ OPEN_PAR select_stmt CLOSE_PAR )* ; cte_table_name: table_name (OPEN_PAR column_name ( COMMA column_name)* CLOSE_PAR)? ; recursive_cte: cte_table_name AS_ OPEN_PAR initial_select UNION_ ALL_? recursive__select CLOSE_PAR ; common_table_expression: table_name (OPEN_PAR column_name ( COMMA column_name)* CLOSE_PAR)? AS_ OPEN_PAR select_stmt CLOSE_PAR ; returning_clause: RETURNING_ ( (STAR | expr ( AS_? column_alias)?) ( COMMA (STAR | expr ( AS_? column_alias)?) )* ) ; delete_stmt: with_clause? DELETE_ FROM_ qualified_table_name (WHERE_ expr)? returning_clause? ; delete_stmt_limited: with_clause? DELETE_ FROM_ qualified_table_name (WHERE_ expr)? ( order_by_stmt? limit_stmt )? returning_clause? ; detach_stmt: DETACH_ DATABASE_? schema_name ; drop_stmt: DROP_ object = (INDEX_ | TABLE_ | TRIGGER_ | VIEW_) ( IF_ EXISTS_ )? (schema_name DOT)? any_name ; /* SQLite understands the following binary operators, in order from highest to lowest precedence: || * / % + - << >> & | < <= > >= = == != <> IS IS NOT IN LIKE GLOB MATCH REGEXP AND OR */ expr: literal_value #expr_literal | NUMBERED_BIND_PARAMETER #expr_bind | NAMED_BIND_PARAMETER #expr_bind | ((schema_name DOT)? table_name DOT)? column_name #expr_qualified_column_name | unary_operator expr #expr_unary | expr PIPE2 expr #expr_binary | 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 ( ASSIGN | EQ | NOT_EQ1 | NOT_EQ2 | IS_ | IS_ NOT_ | NOT_? IN_ | LIKE_ | GLOB_ | MATCH_ | REGEXP_ ) expr #expr_comparison | expr NOT_? IN_ ( OPEN_PAR (select_stmt | expr ( COMMA expr)*)? CLOSE_PAR | ( 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_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 | expr COLLATE_ collation_name #expr_collate | expr NOT_? (LIKE_ | GLOB_ | REGEXP_ | MATCH_) expr ( ESCAPE_ expr )? #expr_comparison | expr ( ISNULL_ | NOTNULL_ | NOT_ NULL_) #expr_null_comp | expr NOT_? BETWEEN_ expr AND_ expr #expr_between | ((NOT_)? EXISTS_)? OPEN_PAR select_stmt CLOSE_PAR #expr_in_select | CASE_ expr? (WHEN_ expr THEN_ expr)+ (ELSE_ expr)? END_ #expr_case | raise_function #expr_raise ; raise_function: RAISE_ OPEN_PAR ( IGNORE_ | (ROLLBACK_ | ABORT_ | FAIL_) COMMA error_message ) CLOSE_PAR ; literal_value: NUMERIC_LITERAL | STRING_LITERAL | BLOB_LITERAL | NULL_ | TRUE_ | FALSE_ | CURRENT_TIME_ | CURRENT_DATE_ | CURRENT_TIMESTAMP_ ; insert_stmt: with_clause? ( INSERT_ | REPLACE_ | INSERT_ OR_ ( REPLACE_ | ROLLBACK_ | ABORT_ | FAIL_ | IGNORE_ ) ) INTO_ (schema_name DOT)? table_name (AS_ table_alias)? ( OPEN_PAR column_name ( COMMA column_name)* CLOSE_PAR )? ( ( VALUES_ OPEN_PAR expr (COMMA expr)* CLOSE_PAR ( COMMA OPEN_PAR expr ( COMMA expr)* CLOSE_PAR )* | select_stmt | DEFAULT_ VALUES_ ) upsert_clause? returning_clause? ) ; upsert_clause: ON_ CONFLICT_ ( OPEN_PAR indexed_column (COMMA indexed_column)* CLOSE_PAR (WHERE_ expr)? )? DO_ ( NOTHING_ | UPDATE_ SET_ ( (column_name | column_name_list) ASSIGN expr ( COMMA (column_name | column_name_list) ASSIGN expr )* (WHERE_ expr)? ) ) ; pragma_stmt: PRAGMA_ (schema_name DOT)? pragma_name ( ASSIGN pragma_value | OPEN_PAR pragma_value CLOSE_PAR )? ; pragma_value: signed_number | name | STRING_LITERAL ; reindex_stmt: REINDEX_ (collation_name | (schema_name DOT)? (table_name | index_name))? ; select_stmt: common_table_stmt? select_core (compound_operator select_core)* order_by_stmt? limit_stmt? ; join_clause: table_or_subquery (join_operator table_or_subquery join_constraint)* ; select_core: ( SELECT_ (DISTINCT_ | ALL_)? result_column (COMMA result_column)* ( FROM_ (table_or_subquery (COMMA table_or_subquery)* | join_clause) )? (WHERE_ expr)? (GROUP_ BY_ expr (COMMA expr)* (HAVING_ expr)?)? ( WINDOW_ window_name AS_ window_defn ( COMMA window_name AS_ window_defn )* )? ) | VALUES_ OPEN_PAR expr (COMMA expr)* CLOSE_PAR ( COMMA OPEN_PAR expr ( COMMA expr)* CLOSE_PAR )* ; factored_select_stmt: select_stmt ; simple_select_stmt: common_table_stmt? select_core order_by_stmt? limit_stmt? ; compound_select_stmt: common_table_stmt? select_core ( (UNION_ ALL_? | INTERSECT_ | EXCEPT_) select_core )+ order_by_stmt? limit_stmt? ; table_or_subquery: (schema_name DOT)? table_name (AS_? table_alias)? (INDEXED_ BY_ index_name | NOT_ INDEXED_)? | (schema_name DOT)? table_function_name OPEN_PAR expr (COMMA expr)* CLOSE_PAR (AS_? table_alias)? | OPEN_PAR (table_or_subquery (COMMA table_or_subquery)* | join_clause) CLOSE_PAR | OPEN_PAR select_stmt CLOSE_PAR (AS_? table_alias)? | (schema_name DOT)? table_name (AS_? table_alias_fallback)? (INDEXED_ BY_ index_name | NOT_ INDEXED_)? | (schema_name DOT)? table_function_name OPEN_PAR expr (COMMA expr)* CLOSE_PAR (AS_? table_alias_fallback)? | OPEN_PAR (table_or_subquery (COMMA table_or_subquery)* | join_clause) CLOSE_PAR | OPEN_PAR select_stmt CLOSE_PAR (AS_? table_alias_fallback)? ; result_column: STAR | table_name DOT STAR | expr ( AS_? column_alias)? ; join_operator: COMMA | NATURAL_? (((LEFT_ | RIGHT_ | FULL_) OUTER_?) | INNER_)? JOIN_ | CROSS_ JOIN_ ; join_constraint: (ON_ expr | USING_ OPEN_PAR column_name ( COMMA column_name)* CLOSE_PAR)? ; compound_operator: UNION_ ALL_? | INTERSECT_ | EXCEPT_ ; update_stmt: with_clause? UPDATE_ ( OR_ (ROLLBACK_ | ABORT_ | REPLACE_ | FAIL_ | IGNORE_) )? qualified_table_name SET_ (column_name | column_name_list) ASSIGN expr ( COMMA (column_name | column_name_list) ASSIGN expr )* (WHERE_ expr)? returning_clause? ; column_name_list: OPEN_PAR column_name (COMMA column_name)* CLOSE_PAR ; update_stmt_limited: with_clause? UPDATE_ ( OR_ (ROLLBACK_ | ABORT_ | REPLACE_ | FAIL_ | IGNORE_) )? qualified_table_name SET_ (column_name | column_name_list) ASSIGN expr ( COMMA (column_name | column_name_list) ASSIGN expr )* (WHERE_ expr)? (order_by_stmt? limit_stmt)? ; qualified_table_name: (schema_name DOT)? table_name (AS_ alias)? ( INDEXED_ BY_ index_name | NOT_ INDEXED_ )? ; vacuum_stmt: VACUUM_ schema_name? (INTO_ filename)? ; filter_clause: FILTER_ OPEN_PAR WHERE_ expr CLOSE_PAR ; window_defn: OPEN_PAR base_window_name? (PARTITION_ BY_ expr (COMMA expr)*)? ( ORDER_ BY_ ordering_term (COMMA ordering_term)* ) frame_spec? CLOSE_PAR ; over_clause: OVER_ ( window_name | OPEN_PAR base_window_name? (PARTITION_ BY_ expr (COMMA expr)*)? ( ORDER_ BY_ ordering_term (COMMA ordering_term)* )? frame_spec? CLOSE_PAR ) ; frame_spec: frame_clause ( EXCLUDE_ (NO_ OTHERS_) | CURRENT_ ROW_ | GROUP_ | TIES_ )? ; frame_clause: (RANGE_ | ROWS_ | GROUPS_) ( frame_single | BETWEEN_ frame_left AND_ frame_right ) ; simple_function_invocation: simple_func OPEN_PAR (expr (COMMA expr)* | STAR) CLOSE_PAR ; aggregate_function_invocation: aggregate_func OPEN_PAR (DISTINCT_? expr (COMMA expr)* | STAR)? CLOSE_PAR filter_clause? ; window_function_invocation: window_function OPEN_PAR (expr (COMMA expr)* | STAR)? CLOSE_PAR filter_clause? OVER_ ( window_defn | window_name ) ; common_table_stmt: //additional structures WITH_ RECURSIVE_? common_table_expression (COMMA common_table_expression)* ; order_by_stmt: ORDER_ BY_ ordering_term (COMMA ordering_term)* ; limit_stmt: LIMIT_ expr ((OFFSET_ | COMMA) expr)? ; ordering_term: expr (COLLATE_ collation_name)? asc_desc? (NULLS_ (FIRST_ | LAST_))? ; asc_desc: ASC_ | DESC_ ; frame_left: expr PRECEDING_ | expr FOLLOWING_ | CURRENT_ ROW_ | UNBOUNDED_ PRECEDING_ ; frame_right: expr PRECEDING_ | expr FOLLOWING_ | CURRENT_ ROW_ | UNBOUNDED_ FOLLOWING_ ; frame_single: expr PRECEDING_ | UNBOUNDED_ PRECEDING_ | CURRENT_ ROW_ ; // unknown window_function: (FIRST_VALUE_ | LAST_VALUE_) OPEN_PAR expr CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr_asc_desc frame_clause ? CLOSE_PAR | (CUME_DIST_ | PERCENT_RANK_) OPEN_PAR CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr? CLOSE_PAR | (DENSE_RANK_ | RANK_ | ROW_NUMBER_) OPEN_PAR CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr_asc_desc CLOSE_PAR | (LAG_ | LEAD_) OPEN_PAR expr of_OF_fset? default_DEFAULT__value? CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr_asc_desc CLOSE_PAR | NTH_VALUE_ OPEN_PAR expr COMMA signed_number CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr_asc_desc frame_clause? CLOSE_PAR | NTILE_ OPEN_PAR expr CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr_asc_desc CLOSE_PAR ; of_OF_fset: COMMA signed_number ; default_DEFAULT__value: COMMA signed_number ; partition_by: PARTITION_ BY_ expr+ ; order_by_expr: ORDER_ BY_ expr+ ; order_by_expr_asc_desc: ORDER_ BY_ order_by_expr_asc_desc ; expr_asc_desc: expr asc_desc? (COMMA expr asc_desc?)* ; //TODO BOTH OF THESE HAVE TO BE REWORKED TO FOLLOW THE SPEC initial_select: select_stmt ; recursive__select: select_stmt ; unary_operator: MINUS | PLUS | TILDE | NOT_ ; error_message: STRING_LITERAL ; module_argument: // TODO check what exactly is permitted here expr | column_def ; column_alias: IDENTIFIER | STRING_LITERAL ; keyword: 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_ ; // TODO: check all names below name: any_name ; function_name: any_name ; qualified_function_name: (schema_name DOT)? function_name ; schema_name: any_name ; table_name: any_name ; table_or_index_name: any_name ; new_table_name: any_name ; column_name: any_name ; collation_name: any_name ; foreign_table: any_name ; index_name: any_name ; trigger_name: any_name ; view_name: any_name ; module_name: any_name ; pragma_name: any_name ; savepoint_name: any_name ; table_alias: IDENTIFIER | STRING_LITERAL; table_alias_fallback: any_name; transaction_name: any_name ; window_name: any_name ; alias: any_name ; filename: any_name ; base_window_name: any_name ; simple_func: any_name ; aggregate_func: any_name ; table_function_name: any_name ; any_name: IDENTIFIER | keyword | STRING_LITERAL | OPEN_PAR any_name CLOSE_PAR ; ================================================ FILE: internal/engine/sqlite/parser/SQLiteParser.interp ================================================ token literal names: null ';' '.' '(' ')' ',' '=' '*' '+' '->>' '->' '-' '~' '||' '/' '%' '<<' '>>' '&' '|' '<' '<=' '>' '>=' '==' '!=' '<>' null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null token symbolic names: null SCOL DOT OPEN_PAR CLOSE_PAR COMMA ASSIGN STAR 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 rule names: 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 create_table_stmt column_def type_name column_constraint signed_number table_constraint foreign_key_clause conflict_clause create_trigger_stmt create_view_stmt create_virtual_table_stmt with_clause cte_table_name recursive_cte common_table_expression returning_clause delete_stmt delete_stmt_limited detach_stmt drop_stmt expr raise_function literal_value insert_stmt upsert_clause pragma_stmt pragma_value reindex_stmt select_stmt join_clause select_core factored_select_stmt simple_select_stmt compound_select_stmt table_or_subquery result_column join_operator join_constraint compound_operator update_stmt column_name_list update_stmt_limited qualified_table_name vacuum_stmt filter_clause window_defn over_clause frame_spec frame_clause simple_function_invocation aggregate_function_invocation window_function_invocation common_table_stmt order_by_stmt limit_stmt ordering_term asc_desc frame_left frame_right frame_single window_function of_OF_fset default_DEFAULT__value partition_by order_by_expr order_by_expr_asc_desc expr_asc_desc initial_select recursive__select unary_operator error_message module_argument column_alias keyword name function_name qualified_function_name schema_name table_name table_or_index_name new_table_name column_name collation_name foreign_table index_name trigger_name view_name module_name pragma_name savepoint_name table_alias table_alias_fallback transaction_name window_name alias filename base_window_name simple_func aggregate_func table_function_name any_name atn: [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] ================================================ FILE: internal/engine/sqlite/parser/SQLiteParser.tokens ================================================ SCOL=1 DOT=2 OPEN_PAR=3 CLOSE_PAR=4 COMMA=5 ASSIGN=6 STAR=7 PLUS=8 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 ')'=4 ','=5 '='=6 '*'=7 '+'=8 '->>'=9 '->'=10 '-'=11 '~'=12 '||'=13 '/'=14 '%'=15 '<<'=16 '>>'=17 '&'=18 '|'=19 '<'=20 '<='=21 '>'=22 '>='=23 '=='=24 '!='=25 '<>'=26 ================================================ FILE: internal/engine/sqlite/parser/sqlite_lexer.go ================================================ // 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" ) // Suppress unused import error var _ = fmt.Printf var _ = sync.Once{} var _ = unicode.IsLetter type SQLiteLexer struct { *antlr.BaseLexer channelNames []string modeNames []string // TODO: EOF string } var SQLiteLexerLexerStaticData struct { once sync.Once serializedATN []int32 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{ "DEFAULT_TOKEN_CHANNEL", "HIDDEN", } staticData.ModeNames = []string{ "DEFAULT_MODE", } staticData.LiteralNames = []string{ "", "';'", "'.'", "'('", "')'", "','", "'='", "'*'", "'+'", "'->>'", "'->'", "'-'", "'~'", "'||'", "'/'", "'%'", "'<<'", "'>>'", "'&'", "'|'", "'<'", "'<='", "'>'", "'>='", "'=='", "'!='", "'<>'", } staticData.SymbolicNames = []string{ "", "SCOL", "DOT", "OPEN_PAR", "CLOSE_PAR", "COMMA", "ASSIGN", "STAR", "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{ "SCOL", "DOT", "OPEN_PAR", "CLOSE_PAR", "COMMA", "ASSIGN", "STAR", "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", "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.serializedATN = []int32{ 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, } deserializer := antlr.NewATNDeserializer(nil) staticData.atn = deserializer.Deserialize(staticData.serializedATN) atn := staticData.atn staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState)) decisionToDFA := staticData.decisionToDFA for index, state := range atn.DecisionToState { decisionToDFA[index] = antlr.NewDFA(state, index) } } // SQLiteLexerInit initializes any static state used to implement SQLiteLexer. By default the // static state used to implement the lexer is lazily initialized during the first call to // NewSQLiteLexer(). You can call this function if you wish to initialize the static state ahead // of time. func SQLiteLexerInit() { staticData := &SQLiteLexerLexerStaticData staticData.once.Do(sqlitelexerLexerInit) } // NewSQLiteLexer produces a new lexer instance for the optional input antlr.CharStream. 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 l.GrammarFileName = "SQLiteLexer.g4" // TODO: l.EOF = antlr.TokenEOF return l } // SQLiteLexer tokens. const ( SQLiteLexerSCOL = 1 SQLiteLexerDOT = 2 SQLiteLexerOPEN_PAR = 3 SQLiteLexerCLOSE_PAR = 4 SQLiteLexerCOMMA = 5 SQLiteLexerASSIGN = 6 SQLiteLexerSTAR = 7 SQLiteLexerPLUS = 8 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 ) ================================================ FILE: internal/engine/sqlite/parser/sqlite_parser.go ================================================ // Code generated from SQLiteParser.g4 by ANTLR 4.13.1. DO NOT EDIT. package parser // SQLiteParser import ( "fmt" "strconv" "sync" "github.com/antlr4-go/antlr/v4" ) // Suppress unused import errors var _ = fmt.Printf var _ = strconv.Itoa var _ = sync.Once{} type SQLiteParser struct { *antlr.BaseParser } var SQLiteParserParserStaticData struct { once sync.Once serializedATN []int32 LiteralNames []string SymbolicNames []string RuleNames []string PredictionContextCache *antlr.PredictionContextCache atn *antlr.ATN decisionToDFA []*antlr.DFA } func sqliteparserParserInit() { staticData := &SQLiteParserParserStaticData staticData.LiteralNames = []string{ "", "';'", "'.'", "'('", "')'", "','", "'='", "'*'", "'+'", "'->>'", "'->'", "'-'", "'~'", "'||'", "'/'", "'%'", "'<<'", "'>>'", "'&'", "'|'", "'<'", "'<='", "'>'", "'>='", "'=='", "'!='", "'<>'", } staticData.SymbolicNames = []string{ "", "SCOL", "DOT", "OPEN_PAR", "CLOSE_PAR", "COMMA", "ASSIGN", "STAR", "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", "create_table_stmt", "column_def", "type_name", "column_constraint", "signed_number", "table_constraint", "foreign_key_clause", "conflict_clause", "create_trigger_stmt", "create_view_stmt", "create_virtual_table_stmt", "with_clause", "cte_table_name", "recursive_cte", "common_table_expression", "returning_clause", "delete_stmt", "delete_stmt_limited", "detach_stmt", "drop_stmt", "expr", "raise_function", "literal_value", "insert_stmt", "upsert_clause", "pragma_stmt", "pragma_value", "reindex_stmt", "select_stmt", "join_clause", "select_core", "factored_select_stmt", "simple_select_stmt", "compound_select_stmt", "table_or_subquery", "result_column", "join_operator", "join_constraint", "compound_operator", "update_stmt", "column_name_list", "update_stmt_limited", "qualified_table_name", "vacuum_stmt", "filter_clause", "window_defn", "over_clause", "frame_spec", "frame_clause", "simple_function_invocation", "aggregate_function_invocation", "window_function_invocation", "common_table_stmt", "order_by_stmt", "limit_stmt", "ordering_term", "asc_desc", "frame_left", "frame_right", "frame_single", "window_function", "of_OF_fset", "default_DEFAULT__value", "partition_by", "order_by_expr", "order_by_expr_asc_desc", "expr_asc_desc", "initial_select", "recursive__select", "unary_operator", "error_message", "module_argument", "column_alias", "keyword", "name", "function_name", "qualified_function_name", "schema_name", "table_name", "table_or_index_name", "new_table_name", "column_name", "collation_name", "foreign_table", "index_name", "trigger_name", "view_name", "module_name", "pragma_name", "savepoint_name", "table_alias", "table_alias_fallback", "transaction_name", "window_name", "alias", "filename", "base_window_name", "simple_func", "aggregate_func", "table_function_name", "any_name", } staticData.PredictionContextCache = antlr.NewPredictionContextCache() staticData.serializedATN = []int32{ 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, } deserializer := antlr.NewATNDeserializer(nil) staticData.atn = deserializer.Deserialize(staticData.serializedATN) atn := staticData.atn staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState)) decisionToDFA := staticData.decisionToDFA for index, state := range atn.DecisionToState { decisionToDFA[index] = antlr.NewDFA(state, index) } } // SQLiteParserInit initializes any static state used to implement SQLiteParser. By default the // static state used to implement the parser is lazily initialized during the first call to // NewSQLiteParser(). You can call this function if you wish to initialize the static state ahead // of time. func SQLiteParserInit() { staticData := &SQLiteParserParserStaticData staticData.once.Do(sqliteparserParserInit) } // NewSQLiteParser produces a new parser instance for the optional input antlr.TokenStream. 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 this.GrammarFileName = "SQLiteParser.g4" return this } // SQLiteParser tokens. const ( SQLiteParserEOF = antlr.TokenEOF SQLiteParserSCOL = 1 SQLiteParserDOT = 2 SQLiteParserOPEN_PAR = 3 SQLiteParserCLOSE_PAR = 4 SQLiteParserCOMMA = 5 SQLiteParserASSIGN = 6 SQLiteParserSTAR = 7 SQLiteParserPLUS = 8 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. const ( SQLiteParserRULE_parse = 0 SQLiteParserRULE_sql_stmt_list = 1 SQLiteParserRULE_sql_stmt = 2 SQLiteParserRULE_alter_table_stmt = 3 SQLiteParserRULE_analyze_stmt = 4 SQLiteParserRULE_attach_stmt = 5 SQLiteParserRULE_begin_stmt = 6 SQLiteParserRULE_commit_stmt = 7 SQLiteParserRULE_rollback_stmt = 8 SQLiteParserRULE_savepoint_stmt = 9 SQLiteParserRULE_release_stmt = 10 SQLiteParserRULE_create_index_stmt = 11 SQLiteParserRULE_indexed_column = 12 SQLiteParserRULE_table_option = 13 SQLiteParserRULE_create_table_stmt = 14 SQLiteParserRULE_column_def = 15 SQLiteParserRULE_type_name = 16 SQLiteParserRULE_column_constraint = 17 SQLiteParserRULE_signed_number = 18 SQLiteParserRULE_table_constraint = 19 SQLiteParserRULE_foreign_key_clause = 20 SQLiteParserRULE_conflict_clause = 21 SQLiteParserRULE_create_trigger_stmt = 22 SQLiteParserRULE_create_view_stmt = 23 SQLiteParserRULE_create_virtual_table_stmt = 24 SQLiteParserRULE_with_clause = 25 SQLiteParserRULE_cte_table_name = 26 SQLiteParserRULE_recursive_cte = 27 SQLiteParserRULE_common_table_expression = 28 SQLiteParserRULE_returning_clause = 29 SQLiteParserRULE_delete_stmt = 30 SQLiteParserRULE_delete_stmt_limited = 31 SQLiteParserRULE_detach_stmt = 32 SQLiteParserRULE_drop_stmt = 33 SQLiteParserRULE_expr = 34 SQLiteParserRULE_raise_function = 35 SQLiteParserRULE_literal_value = 36 SQLiteParserRULE_insert_stmt = 37 SQLiteParserRULE_upsert_clause = 38 SQLiteParserRULE_pragma_stmt = 39 SQLiteParserRULE_pragma_value = 40 SQLiteParserRULE_reindex_stmt = 41 SQLiteParserRULE_select_stmt = 42 SQLiteParserRULE_join_clause = 43 SQLiteParserRULE_select_core = 44 SQLiteParserRULE_factored_select_stmt = 45 SQLiteParserRULE_simple_select_stmt = 46 SQLiteParserRULE_compound_select_stmt = 47 SQLiteParserRULE_table_or_subquery = 48 SQLiteParserRULE_result_column = 49 SQLiteParserRULE_join_operator = 50 SQLiteParserRULE_join_constraint = 51 SQLiteParserRULE_compound_operator = 52 SQLiteParserRULE_update_stmt = 53 SQLiteParserRULE_column_name_list = 54 SQLiteParserRULE_update_stmt_limited = 55 SQLiteParserRULE_qualified_table_name = 56 SQLiteParserRULE_vacuum_stmt = 57 SQLiteParserRULE_filter_clause = 58 SQLiteParserRULE_window_defn = 59 SQLiteParserRULE_over_clause = 60 SQLiteParserRULE_frame_spec = 61 SQLiteParserRULE_frame_clause = 62 SQLiteParserRULE_simple_function_invocation = 63 SQLiteParserRULE_aggregate_function_invocation = 64 SQLiteParserRULE_window_function_invocation = 65 SQLiteParserRULE_common_table_stmt = 66 SQLiteParserRULE_order_by_stmt = 67 SQLiteParserRULE_limit_stmt = 68 SQLiteParserRULE_ordering_term = 69 SQLiteParserRULE_asc_desc = 70 SQLiteParserRULE_frame_left = 71 SQLiteParserRULE_frame_right = 72 SQLiteParserRULE_frame_single = 73 SQLiteParserRULE_window_function = 74 SQLiteParserRULE_of_OF_fset = 75 SQLiteParserRULE_default_DEFAULT__value = 76 SQLiteParserRULE_partition_by = 77 SQLiteParserRULE_order_by_expr = 78 SQLiteParserRULE_order_by_expr_asc_desc = 79 SQLiteParserRULE_expr_asc_desc = 80 SQLiteParserRULE_initial_select = 81 SQLiteParserRULE_recursive__select = 82 SQLiteParserRULE_unary_operator = 83 SQLiteParserRULE_error_message = 84 SQLiteParserRULE_module_argument = 85 SQLiteParserRULE_column_alias = 86 SQLiteParserRULE_keyword = 87 SQLiteParserRULE_name = 88 SQLiteParserRULE_function_name = 89 SQLiteParserRULE_qualified_function_name = 90 SQLiteParserRULE_schema_name = 91 SQLiteParserRULE_table_name = 92 SQLiteParserRULE_table_or_index_name = 93 SQLiteParserRULE_new_table_name = 94 SQLiteParserRULE_column_name = 95 SQLiteParserRULE_collation_name = 96 SQLiteParserRULE_foreign_table = 97 SQLiteParserRULE_index_name = 98 SQLiteParserRULE_trigger_name = 99 SQLiteParserRULE_view_name = 100 SQLiteParserRULE_module_name = 101 SQLiteParserRULE_pragma_name = 102 SQLiteParserRULE_savepoint_name = 103 SQLiteParserRULE_table_alias = 104 SQLiteParserRULE_table_alias_fallback = 105 SQLiteParserRULE_transaction_name = 106 SQLiteParserRULE_window_name = 107 SQLiteParserRULE_alias = 108 SQLiteParserRULE_filename = 109 SQLiteParserRULE_base_window_name = 110 SQLiteParserRULE_simple_func = 111 SQLiteParserRULE_aggregate_func = 112 SQLiteParserRULE_table_function_name = 113 SQLiteParserRULE_any_name = 114 ) // IParseContext is an interface to support dynamic dispatch. type IParseContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures EOF() antlr.TerminalNode AllSql_stmt_list() []ISql_stmt_listContext Sql_stmt_list(i int) ISql_stmt_listContext // IsParseContext differentiates from other interfaces. IsParseContext() } type ParseContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyParseContext() *ParseContext { var p = new(ParseContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_parse return p } func (s *ParseContext) GetParser() antlr.Parser { return s.parser } func (s *ParseContext) EOF() antlr.TerminalNode { return s.GetToken(SQLiteParserEOF, 0) } func (s *ParseContext) AllSql_stmt_list() []ISql_stmt_listContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(ISql_stmt_listContext); ok { len++ } } tst := make([]ISql_stmt_listContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(ISql_stmt_listContext); ok { tst[i] = t.(ISql_stmt_listContext) i++ } } return tst } func (s *ParseContext) Sql_stmt_list(i int) ISql_stmt_listContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISql_stmt_listContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(ISql_stmt_listContext) } func (s *ParseContext) GetRuleContext() antlr.RuleContext { return s } func (s *ParseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *ParseContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterParse(s) } } func (s *ParseContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitParse(s) } } func (p *SQLiteParser) Parse() (localctx IParseContext) { localctx = NewParseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 0, SQLiteParserRULE_parse) var _la int 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)&-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() } 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. type ISql_stmt_listContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures AllSql_stmt() []ISql_stmtContext Sql_stmt(i int) ISql_stmtContext AllSCOL() []antlr.TerminalNode SCOL(i int) antlr.TerminalNode // IsSql_stmt_listContext differentiates from other interfaces. IsSql_stmt_listContext() } type Sql_stmt_listContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySql_stmt_listContext() *Sql_stmt_listContext { var p = new(Sql_stmt_listContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_sql_stmt_list return p } func (s *Sql_stmt_listContext) GetParser() antlr.Parser { return s.parser } func (s *Sql_stmt_listContext) AllSql_stmt() []ISql_stmtContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(ISql_stmtContext); ok { len++ } } tst := make([]ISql_stmtContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(ISql_stmtContext); ok { tst[i] = t.(ISql_stmtContext) i++ } } return tst } func (s *Sql_stmt_listContext) Sql_stmt(i int) ISql_stmtContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISql_stmtContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(ISql_stmtContext) } func (s *Sql_stmt_listContext) AllSCOL() []antlr.TerminalNode { return s.GetTokens(SQLiteParserSCOL) } func (s *Sql_stmt_listContext) SCOL(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserSCOL, i) } func (s *Sql_stmt_listContext) GetRuleContext() antlr.RuleContext { return s } func (s *Sql_stmt_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Sql_stmt_listContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterSql_stmt_list(s) } } func (s *Sql_stmt_listContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitSql_stmt_list(s) } } func (p *SQLiteParser) Sql_stmt_list() (localctx ISql_stmt_listContext) { localctx = NewSql_stmt_listContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 2, SQLiteParserRULE_sql_stmt_list) var _la int 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) } { p.SetState(244) p.Sql_stmt() } p.SetState(253) p.GetErrorHandler().Sync(p) 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) } { p.SetState(250) p.Sql_stmt() } } p.SetState(255) p.GetErrorHandler().Sync(p) 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) 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) 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. type ISql_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Alter_table_stmt() IAlter_table_stmtContext Analyze_stmt() IAnalyze_stmtContext Attach_stmt() IAttach_stmtContext Begin_stmt() IBegin_stmtContext Commit_stmt() ICommit_stmtContext Create_index_stmt() ICreate_index_stmtContext Create_table_stmt() ICreate_table_stmtContext Create_trigger_stmt() ICreate_trigger_stmtContext Create_view_stmt() ICreate_view_stmtContext Create_virtual_table_stmt() ICreate_virtual_table_stmtContext Delete_stmt() IDelete_stmtContext Delete_stmt_limited() IDelete_stmt_limitedContext Detach_stmt() IDetach_stmtContext Drop_stmt() IDrop_stmtContext Insert_stmt() IInsert_stmtContext Pragma_stmt() IPragma_stmtContext Reindex_stmt() IReindex_stmtContext Release_stmt() IRelease_stmtContext Rollback_stmt() IRollback_stmtContext Savepoint_stmt() ISavepoint_stmtContext Select_stmt() ISelect_stmtContext Update_stmt() IUpdate_stmtContext Update_stmt_limited() IUpdate_stmt_limitedContext Vacuum_stmt() IVacuum_stmtContext EXPLAIN_() antlr.TerminalNode QUERY_() antlr.TerminalNode PLAN_() antlr.TerminalNode // IsSql_stmtContext differentiates from other interfaces. IsSql_stmtContext() } type Sql_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySql_stmtContext() *Sql_stmtContext { var p = new(Sql_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_sql_stmt return p } func (s *Sql_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Sql_stmtContext) Alter_table_stmt() IAlter_table_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAlter_table_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAlter_table_stmtContext) } func (s *Sql_stmtContext) Analyze_stmt() IAnalyze_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAnalyze_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAnalyze_stmtContext) } func (s *Sql_stmtContext) Attach_stmt() IAttach_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAttach_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAttach_stmtContext) } func (s *Sql_stmtContext) Begin_stmt() IBegin_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IBegin_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IBegin_stmtContext) } func (s *Sql_stmtContext) Commit_stmt() ICommit_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICommit_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ICommit_stmtContext) } func (s *Sql_stmtContext) Create_index_stmt() ICreate_index_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICreate_index_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ICreate_index_stmtContext) } func (s *Sql_stmtContext) Create_table_stmt() ICreate_table_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICreate_table_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ICreate_table_stmtContext) } func (s *Sql_stmtContext) Create_trigger_stmt() ICreate_trigger_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICreate_trigger_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ICreate_trigger_stmtContext) } func (s *Sql_stmtContext) Create_view_stmt() ICreate_view_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICreate_view_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ICreate_view_stmtContext) } func (s *Sql_stmtContext) Create_virtual_table_stmt() ICreate_virtual_table_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICreate_virtual_table_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ICreate_virtual_table_stmtContext) } func (s *Sql_stmtContext) Delete_stmt() IDelete_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IDelete_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IDelete_stmtContext) } func (s *Sql_stmtContext) Delete_stmt_limited() IDelete_stmt_limitedContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IDelete_stmt_limitedContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IDelete_stmt_limitedContext) } func (s *Sql_stmtContext) Detach_stmt() IDetach_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IDetach_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IDetach_stmtContext) } func (s *Sql_stmtContext) Drop_stmt() IDrop_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IDrop_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IDrop_stmtContext) } func (s *Sql_stmtContext) Insert_stmt() IInsert_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IInsert_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IInsert_stmtContext) } func (s *Sql_stmtContext) Pragma_stmt() IPragma_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IPragma_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IPragma_stmtContext) } func (s *Sql_stmtContext) Reindex_stmt() IReindex_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IReindex_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IReindex_stmtContext) } func (s *Sql_stmtContext) Release_stmt() IRelease_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IRelease_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IRelease_stmtContext) } func (s *Sql_stmtContext) Rollback_stmt() IRollback_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IRollback_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IRollback_stmtContext) } func (s *Sql_stmtContext) Savepoint_stmt() ISavepoint_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISavepoint_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISavepoint_stmtContext) } func (s *Sql_stmtContext) Select_stmt() ISelect_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISelect_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISelect_stmtContext) } func (s *Sql_stmtContext) Update_stmt() IUpdate_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IUpdate_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IUpdate_stmtContext) } func (s *Sql_stmtContext) Update_stmt_limited() IUpdate_stmt_limitedContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IUpdate_stmt_limitedContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IUpdate_stmt_limitedContext) } func (s *Sql_stmtContext) Vacuum_stmt() IVacuum_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IVacuum_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IVacuum_stmtContext) } func (s *Sql_stmtContext) EXPLAIN_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXPLAIN_, 0) } func (s *Sql_stmtContext) QUERY_() antlr.TerminalNode { return s.GetToken(SQLiteParserQUERY_, 0) } func (s *Sql_stmtContext) PLAN_() antlr.TerminalNode { return s.GetToken(SQLiteParserPLAN_, 0) } func (s *Sql_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Sql_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Sql_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterSql_stmt(s) } } func (s *Sql_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitSql_stmt(s) } } func (p *SQLiteParser) Sql_stmt() (localctx ISql_stmtContext) { localctx = NewSql_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 4, SQLiteParserRULE_sql_stmt) var _la int 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 } } } } p.SetState(293) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 7, p.GetParserRuleContext()) { case 1: { p.SetState(269) p.Alter_table_stmt() } case 2: { p.SetState(270) p.Analyze_stmt() } case 3: { p.SetState(271) p.Attach_stmt() } case 4: { p.SetState(272) p.Begin_stmt() } case 5: { p.SetState(273) p.Commit_stmt() } case 6: { p.SetState(274) p.Create_index_stmt() } case 7: { p.SetState(275) p.Create_table_stmt() } case 8: { p.SetState(276) p.Create_trigger_stmt() } case 9: { p.SetState(277) p.Create_view_stmt() } case 10: { p.SetState(278) p.Create_virtual_table_stmt() } case 11: { p.SetState(279) p.Delete_stmt() } case 12: { p.SetState(280) p.Delete_stmt_limited() } case 13: { p.SetState(281) p.Detach_stmt() } case 14: { p.SetState(282) p.Drop_stmt() } case 15: { p.SetState(283) p.Insert_stmt() } case 16: { p.SetState(284) p.Pragma_stmt() } case 17: { p.SetState(285) p.Reindex_stmt() } case 18: { p.SetState(286) p.Release_stmt() } case 19: { p.SetState(287) p.Rollback_stmt() } case 20: { p.SetState(288) p.Savepoint_stmt() } case 21: { p.SetState(289) p.Select_stmt() } case 22: { p.SetState(290) p.Update_stmt() } case 23: { p.SetState(291) p.Update_stmt_limited() } case 24: { p.SetState(292) 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. type IAlter_table_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // GetOld_column_name returns the old_column_name rule contexts. GetOld_column_name() IColumn_nameContext // GetNew_column_name returns the new_column_name rule contexts. GetNew_column_name() IColumn_nameContext // SetOld_column_name sets the old_column_name rule contexts. SetOld_column_name(IColumn_nameContext) // SetNew_column_name sets the new_column_name rule contexts. SetNew_column_name(IColumn_nameContext) // Getter signatures ALTER_() antlr.TerminalNode TABLE_() antlr.TerminalNode Table_name() ITable_nameContext RENAME_() antlr.TerminalNode ADD_() antlr.TerminalNode Column_def() IColumn_defContext DROP_() antlr.TerminalNode AllColumn_name() []IColumn_nameContext Column_name(i int) IColumn_nameContext Schema_name() ISchema_nameContext DOT() antlr.TerminalNode TO_() antlr.TerminalNode New_table_name() INew_table_nameContext COLUMN_() antlr.TerminalNode // IsAlter_table_stmtContext differentiates from other interfaces. IsAlter_table_stmtContext() } type Alter_table_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser old_column_name IColumn_nameContext new_column_name IColumn_nameContext } func NewEmptyAlter_table_stmtContext() *Alter_table_stmtContext { var p = new(Alter_table_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_alter_table_stmt return p } func (s *Alter_table_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Alter_table_stmtContext) GetOld_column_name() IColumn_nameContext { return s.old_column_name } func (s *Alter_table_stmtContext) GetNew_column_name() IColumn_nameContext { return s.new_column_name } func (s *Alter_table_stmtContext) SetOld_column_name(v IColumn_nameContext) { s.old_column_name = v } func (s *Alter_table_stmtContext) SetNew_column_name(v IColumn_nameContext) { s.new_column_name = v } func (s *Alter_table_stmtContext) ALTER_() antlr.TerminalNode { return s.GetToken(SQLiteParserALTER_, 0) } func (s *Alter_table_stmtContext) TABLE_() antlr.TerminalNode { return s.GetToken(SQLiteParserTABLE_, 0) } func (s *Alter_table_stmtContext) Table_name() ITable_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_nameContext) } func (s *Alter_table_stmtContext) RENAME_() antlr.TerminalNode { return s.GetToken(SQLiteParserRENAME_, 0) } func (s *Alter_table_stmtContext) ADD_() antlr.TerminalNode { return s.GetToken(SQLiteParserADD_, 0) } func (s *Alter_table_stmtContext) Column_def() IColumn_defContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_defContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IColumn_defContext) } func (s *Alter_table_stmtContext) DROP_() antlr.TerminalNode { return s.GetToken(SQLiteParserDROP_, 0) } func (s *Alter_table_stmtContext) AllColumn_name() []IColumn_nameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_nameContext); ok { len++ } } tst := make([]IColumn_nameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_nameContext); ok { tst[i] = t.(IColumn_nameContext) i++ } } return tst } func (s *Alter_table_stmtContext) Column_name(i int) IColumn_nameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Alter_table_stmtContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Alter_table_stmtContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Alter_table_stmtContext) TO_() antlr.TerminalNode { return s.GetToken(SQLiteParserTO_, 0) } func (s *Alter_table_stmtContext) New_table_name() INew_table_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(INew_table_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(INew_table_nameContext) } func (s *Alter_table_stmtContext) COLUMN_() antlr.TerminalNode { return s.GetToken(SQLiteParserCOLUMN_, 0) } func (s *Alter_table_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Alter_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Alter_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterAlter_table_stmt(s) } } func (s *Alter_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitAlter_table_stmt(s) } } func (p *SQLiteParser) Alter_table_stmt() (localctx IAlter_table_stmtContext) { localctx = NewAlter_table_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 6, SQLiteParserRULE_alter_table_stmt) 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.BaseParser, p.GetTokenStream(), 8, p.GetParserRuleContext()) == 1 { { p.SetState(297) p.Schema_name() } { 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) p.Table_name() } 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) 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) p.New_table_name() } case 2: p.SetState(307) p.GetErrorHandler().Sync(p) 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) var _x = p.Column_name() localctx.(*Alter_table_stmtContext).old_column_name = _x } { p.SetState(310) p.Match(SQLiteParserTO_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(311) var _x = p.Column_name() 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.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) p.Column_def() } case SQLiteParserDROP_: { 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.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) p.Column_name() } default: 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. type IAnalyze_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures ANALYZE_() antlr.TerminalNode Schema_name() ISchema_nameContext Table_or_index_name() ITable_or_index_nameContext DOT() antlr.TerminalNode // IsAnalyze_stmtContext differentiates from other interfaces. IsAnalyze_stmtContext() } type Analyze_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyAnalyze_stmtContext() *Analyze_stmtContext { var p = new(Analyze_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_analyze_stmt return p } func (s *Analyze_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Analyze_stmtContext) ANALYZE_() antlr.TerminalNode { return s.GetToken(SQLiteParserANALYZE_, 0) } func (s *Analyze_stmtContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Analyze_stmtContext) Table_or_index_name() ITable_or_index_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_or_index_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_or_index_nameContext) } func (s *Analyze_stmtContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Analyze_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Analyze_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Analyze_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterAnalyze_stmt(s) } } func (s *Analyze_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitAnalyze_stmt(s) } } func (p *SQLiteParser) Analyze_stmt() (localctx IAnalyze_stmtContext) { localctx = NewAnalyze_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 8, SQLiteParserRULE_analyze_stmt) 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.BaseParser, p.GetTokenStream(), 15, p.GetParserRuleContext()) == 1 { { p.SetState(328) p.Schema_name() } } 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.BaseParser, p.GetTokenStream(), 14, p.GetParserRuleContext()) == 1 { { p.SetState(329) p.Schema_name() } { 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. type IAttach_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures ATTACH_() antlr.TerminalNode Expr() IExprContext AS_() antlr.TerminalNode Schema_name() ISchema_nameContext DATABASE_() antlr.TerminalNode // IsAttach_stmtContext differentiates from other interfaces. IsAttach_stmtContext() } type Attach_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyAttach_stmtContext() *Attach_stmtContext { var p = new(Attach_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_attach_stmt return p } func (s *Attach_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Attach_stmtContext) ATTACH_() antlr.TerminalNode { return s.GetToken(SQLiteParserATTACH_, 0) } func (s *Attach_stmtContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Attach_stmtContext) AS_() antlr.TerminalNode { return s.GetToken(SQLiteParserAS_, 0) } func (s *Attach_stmtContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Attach_stmtContext) DATABASE_() antlr.TerminalNode { return s.GetToken(SQLiteParserDATABASE_, 0) } func (s *Attach_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Attach_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Attach_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterAttach_stmt(s) } } func (s *Attach_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitAttach_stmt(s) } } func (p *SQLiteParser) Attach_stmt() (localctx IAttach_stmtContext) { localctx = NewAttach_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 10, SQLiteParserRULE_attach_stmt) 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.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) p.expr(0) } { 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. type IBegin_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures BEGIN_() antlr.TerminalNode TRANSACTION_() antlr.TerminalNode DEFERRED_() antlr.TerminalNode IMMEDIATE_() antlr.TerminalNode EXCLUSIVE_() antlr.TerminalNode Transaction_name() ITransaction_nameContext // IsBegin_stmtContext differentiates from other interfaces. IsBegin_stmtContext() } type Begin_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyBegin_stmtContext() *Begin_stmtContext { var p = new(Begin_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_begin_stmt return p } func (s *Begin_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Begin_stmtContext) BEGIN_() antlr.TerminalNode { return s.GetToken(SQLiteParserBEGIN_, 0) } func (s *Begin_stmtContext) TRANSACTION_() antlr.TerminalNode { return s.GetToken(SQLiteParserTRANSACTION_, 0) } func (s *Begin_stmtContext) DEFERRED_() antlr.TerminalNode { return s.GetToken(SQLiteParserDEFERRED_, 0) } func (s *Begin_stmtContext) IMMEDIATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserIMMEDIATE_, 0) } func (s *Begin_stmtContext) EXCLUSIVE_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXCLUSIVE_, 0) } func (s *Begin_stmtContext) Transaction_name() ITransaction_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITransaction_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITransaction_nameContext) } func (s *Begin_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Begin_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Begin_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterBegin_stmt(s) } } func (s *Begin_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitBegin_stmt(s) } } func (p *SQLiteParser) Begin_stmt() (localctx IBegin_stmtContext) { localctx = NewBegin_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 12, SQLiteParserRULE_begin_stmt) var _la int 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-60)) & ^0x3f) == 0 && ((int64(1)<<(_la-60))&16779265) != 0 { { p.SetState(346) _la = p.GetTokenStream().LA(1) if !((int64((_la-60)) & ^0x3f) == 0 && ((int64(1)<<(_la-60))&16779265) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } } 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.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. type ICommit_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures COMMIT_() antlr.TerminalNode END_() antlr.TerminalNode TRANSACTION_() antlr.TerminalNode // IsCommit_stmtContext differentiates from other interfaces. IsCommit_stmtContext() } type Commit_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCommit_stmtContext() *Commit_stmtContext { var p = new(Commit_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_commit_stmt return p } func (s *Commit_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Commit_stmtContext) COMMIT_() antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMIT_, 0) } func (s *Commit_stmtContext) END_() antlr.TerminalNode { return s.GetToken(SQLiteParserEND_, 0) } func (s *Commit_stmtContext) TRANSACTION_() antlr.TerminalNode { return s.GetToken(SQLiteParserTRANSACTION_, 0) } func (s *Commit_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Commit_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Commit_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterCommit_stmt(s) } } func (s *Commit_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitCommit_stmt(s) } } func (p *SQLiteParser) Commit_stmt() (localctx ICommit_stmtContext) { localctx = NewCommit_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 14, SQLiteParserRULE_commit_stmt) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(355) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserCOMMIT_ || _la == SQLiteParserEND_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } 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. type IRollback_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures ROLLBACK_() antlr.TerminalNode TRANSACTION_() antlr.TerminalNode TO_() antlr.TerminalNode Savepoint_name() ISavepoint_nameContext SAVEPOINT_() antlr.TerminalNode // IsRollback_stmtContext differentiates from other interfaces. IsRollback_stmtContext() } type Rollback_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyRollback_stmtContext() *Rollback_stmtContext { var p = new(Rollback_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_rollback_stmt return p } func (s *Rollback_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Rollback_stmtContext) ROLLBACK_() antlr.TerminalNode { return s.GetToken(SQLiteParserROLLBACK_, 0) } func (s *Rollback_stmtContext) TRANSACTION_() antlr.TerminalNode { return s.GetToken(SQLiteParserTRANSACTION_, 0) } func (s *Rollback_stmtContext) TO_() antlr.TerminalNode { return s.GetToken(SQLiteParserTO_, 0) } func (s *Rollback_stmtContext) Savepoint_name() ISavepoint_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISavepoint_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISavepoint_nameContext) } func (s *Rollback_stmtContext) SAVEPOINT_() antlr.TerminalNode { return s.GetToken(SQLiteParserSAVEPOINT_, 0) } func (s *Rollback_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Rollback_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Rollback_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterRollback_stmt(s) } } func (s *Rollback_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitRollback_stmt(s) } } func (p *SQLiteParser) Rollback_stmt() (localctx IRollback_stmtContext) { localctx = NewRollback_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 16, SQLiteParserRULE_rollback_stmt) var _la int 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.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) 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 } // ISavepoint_stmtContext is an interface to support dynamic dispatch. type ISavepoint_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures SAVEPOINT_() antlr.TerminalNode Savepoint_name() ISavepoint_nameContext // IsSavepoint_stmtContext differentiates from other interfaces. IsSavepoint_stmtContext() } type Savepoint_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySavepoint_stmtContext() *Savepoint_stmtContext { var p = new(Savepoint_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_savepoint_stmt return p } func (s *Savepoint_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Savepoint_stmtContext) SAVEPOINT_() antlr.TerminalNode { return s.GetToken(SQLiteParserSAVEPOINT_, 0) } func (s *Savepoint_stmtContext) Savepoint_name() ISavepoint_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISavepoint_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISavepoint_nameContext) } func (s *Savepoint_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Savepoint_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Savepoint_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterSavepoint_stmt(s) } } func (s *Savepoint_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitSavepoint_stmt(s) } } func (p *SQLiteParser) Savepoint_stmt() (localctx ISavepoint_stmtContext) { localctx = NewSavepoint_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 18, SQLiteParserRULE_savepoint_stmt) 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. type IRelease_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures RELEASE_() antlr.TerminalNode Savepoint_name() ISavepoint_nameContext SAVEPOINT_() antlr.TerminalNode // IsRelease_stmtContext differentiates from other interfaces. IsRelease_stmtContext() } type Release_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyRelease_stmtContext() *Release_stmtContext { var p = new(Release_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_release_stmt return p } func (s *Release_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Release_stmtContext) RELEASE_() antlr.TerminalNode { return s.GetToken(SQLiteParserRELEASE_, 0) } func (s *Release_stmtContext) Savepoint_name() ISavepoint_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISavepoint_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISavepoint_nameContext) } func (s *Release_stmtContext) SAVEPOINT_() antlr.TerminalNode { return s.GetToken(SQLiteParserSAVEPOINT_, 0) } func (s *Release_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Release_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Release_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterRelease_stmt(s) } } func (s *Release_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitRelease_stmt(s) } } func (p *SQLiteParser) Release_stmt() (localctx IRelease_stmtContext) { localctx = NewRelease_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 20, SQLiteParserRULE_release_stmt) 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.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. type ICreate_index_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures CREATE_() antlr.TerminalNode INDEX_() antlr.TerminalNode Index_name() IIndex_nameContext ON_() antlr.TerminalNode Table_name() ITable_nameContext OPEN_PAR() antlr.TerminalNode AllIndexed_column() []IIndexed_columnContext Indexed_column(i int) IIndexed_columnContext CLOSE_PAR() antlr.TerminalNode UNIQUE_() antlr.TerminalNode IF_() antlr.TerminalNode NOT_() antlr.TerminalNode EXISTS_() antlr.TerminalNode Schema_name() ISchema_nameContext DOT() antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode WHERE_() antlr.TerminalNode Expr() IExprContext // IsCreate_index_stmtContext differentiates from other interfaces. IsCreate_index_stmtContext() } type Create_index_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCreate_index_stmtContext() *Create_index_stmtContext { var p = new(Create_index_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_create_index_stmt return p } func (s *Create_index_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Create_index_stmtContext) CREATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCREATE_, 0) } func (s *Create_index_stmtContext) INDEX_() antlr.TerminalNode { return s.GetToken(SQLiteParserINDEX_, 0) } func (s *Create_index_stmtContext) Index_name() IIndex_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IIndex_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IIndex_nameContext) } func (s *Create_index_stmtContext) ON_() antlr.TerminalNode { return s.GetToken(SQLiteParserON_, 0) } func (s *Create_index_stmtContext) Table_name() ITable_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_nameContext) } func (s *Create_index_stmtContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Create_index_stmtContext) AllIndexed_column() []IIndexed_columnContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IIndexed_columnContext); ok { len++ } } tst := make([]IIndexed_columnContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IIndexed_columnContext); ok { tst[i] = t.(IIndexed_columnContext) i++ } } return tst } func (s *Create_index_stmtContext) Indexed_column(i int) IIndexed_columnContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IIndexed_columnContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IIndexed_columnContext) } func (s *Create_index_stmtContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Create_index_stmtContext) UNIQUE_() antlr.TerminalNode { return s.GetToken(SQLiteParserUNIQUE_, 0) } func (s *Create_index_stmtContext) IF_() antlr.TerminalNode { return s.GetToken(SQLiteParserIF_, 0) } func (s *Create_index_stmtContext) NOT_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_, 0) } func (s *Create_index_stmtContext) EXISTS_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXISTS_, 0) } func (s *Create_index_stmtContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Create_index_stmtContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Create_index_stmtContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Create_index_stmtContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Create_index_stmtContext) WHERE_() antlr.TerminalNode { return s.GetToken(SQLiteParserWHERE_, 0) } func (s *Create_index_stmtContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Create_index_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Create_index_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Create_index_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterCreate_index_stmt(s) } } func (s *Create_index_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitCreate_index_stmt(s) } } func (p *SQLiteParser) Create_index_stmt() (localctx ICreate_index_stmtContext) { localctx = NewCreate_index_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 22, SQLiteParserRULE_create_index_stmt) var _la int 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.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.BaseParser, p.GetTokenStream(), 27, p.GetParserRuleContext()) == 1 { { p.SetState(389) p.Schema_name() } { 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) p.Index_name() } { p.SetState(395) p.Match(SQLiteParserON_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(396) p.Table_name() } { p.SetState(397) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(398) p.Indexed_column() } 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) p.Indexed_column() } 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) 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 } // IIndexed_columnContext is an interface to support dynamic dispatch. type IIndexed_columnContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Column_name() IColumn_nameContext Expr() IExprContext COLLATE_() antlr.TerminalNode Collation_name() ICollation_nameContext Asc_desc() IAsc_descContext // IsIndexed_columnContext differentiates from other interfaces. IsIndexed_columnContext() } type Indexed_columnContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyIndexed_columnContext() *Indexed_columnContext { var p = new(Indexed_columnContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_indexed_column return p } func (s *Indexed_columnContext) GetParser() antlr.Parser { return s.parser } func (s *Indexed_columnContext) Column_name() IColumn_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Indexed_columnContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Indexed_columnContext) COLLATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCOLLATE_, 0) } func (s *Indexed_columnContext) Collation_name() ICollation_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICollation_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ICollation_nameContext) } func (s *Indexed_columnContext) Asc_desc() IAsc_descContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAsc_descContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAsc_descContext) } func (s *Indexed_columnContext) GetRuleContext() antlr.RuleContext { return s } func (s *Indexed_columnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Indexed_columnContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterIndexed_column(s) } } func (s *Indexed_columnContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitIndexed_column(s) } } func (p *SQLiteParser) Indexed_column() (localctx IIndexed_columnContext) { localctx = NewIndexed_columnContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 24, SQLiteParserRULE_indexed_column) var _la int p.EnterOuterAlt(localctx, 1) p.SetState(413) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 30, p.GetParserRuleContext()) { case 1: { p.SetState(411) p.Column_name() } case 2: { p.SetState(412) 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) p.Collation_name() } } p.SetState(420) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ { { p.SetState(419) p.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 } // ITable_optionContext is an interface to support dynamic dispatch. type ITable_optionContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // GetRow_ROW_ID returns the row_ROW_ID token. GetRow_ROW_ID() antlr.Token // SetRow_ROW_ID sets the row_ROW_ID token. SetRow_ROW_ID(antlr.Token) // Getter signatures WITHOUT_() antlr.TerminalNode IDENTIFIER() antlr.TerminalNode STRICT_() antlr.TerminalNode // IsTable_optionContext differentiates from other interfaces. IsTable_optionContext() } type Table_optionContext struct { antlr.BaseParserRuleContext parser antlr.Parser row_ROW_ID antlr.Token } func NewEmptyTable_optionContext() *Table_optionContext { var p = new(Table_optionContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_option return p } func (s *Table_optionContext) GetParser() antlr.Parser { return s.parser } func (s *Table_optionContext) GetRow_ROW_ID() antlr.Token { return s.row_ROW_ID } func (s *Table_optionContext) SetRow_ROW_ID(v antlr.Token) { s.row_ROW_ID = v } func (s *Table_optionContext) WITHOUT_() antlr.TerminalNode { return s.GetToken(SQLiteParserWITHOUT_, 0) } func (s *Table_optionContext) IDENTIFIER() antlr.TerminalNode { return s.GetToken(SQLiteParserIDENTIFIER, 0) } func (s *Table_optionContext) STRICT_() antlr.TerminalNode { return s.GetToken(SQLiteParserSTRICT_, 0) } func (s *Table_optionContext) GetRuleContext() antlr.RuleContext { return s } func (s *Table_optionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Table_optionContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterTable_option(s) } } func (s *Table_optionContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitTable_option(s) } } func (p *SQLiteParser) Table_option() (localctx ITable_optionContext) { localctx = NewTable_optionContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 26, SQLiteParserRULE_table_option) p.SetState(425) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetTokenStream().LA(1) { case SQLiteParserWITHOUT_: p.EnterOuterAlt(localctx, 1) { p.SetState(422) p.Match(SQLiteParserWITHOUT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(423) var _m = p.Match(SQLiteParserIDENTIFIER) localctx.(*Table_optionContext).row_ROW_ID = _m if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserSTRICT_: p.EnterOuterAlt(localctx, 2) { p.SetState(424) p.Match(SQLiteParserSTRICT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } default: 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. type ICreate_table_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures CREATE_() antlr.TerminalNode TABLE_() antlr.TerminalNode Table_name() ITable_nameContext OPEN_PAR() antlr.TerminalNode AllColumn_def() []IColumn_defContext Column_def(i int) IColumn_defContext CLOSE_PAR() antlr.TerminalNode AS_() antlr.TerminalNode Select_stmt() ISelect_stmtContext IF_() antlr.TerminalNode NOT_() antlr.TerminalNode EXISTS_() antlr.TerminalNode Schema_name() ISchema_nameContext DOT() antlr.TerminalNode TEMP_() antlr.TerminalNode TEMPORARY_() antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode AllTable_constraint() []ITable_constraintContext Table_constraint(i int) ITable_constraintContext AllTable_option() []ITable_optionContext Table_option(i int) ITable_optionContext // IsCreate_table_stmtContext differentiates from other interfaces. IsCreate_table_stmtContext() } type Create_table_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCreate_table_stmtContext() *Create_table_stmtContext { var p = new(Create_table_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_create_table_stmt return p } func (s *Create_table_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Create_table_stmtContext) CREATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCREATE_, 0) } func (s *Create_table_stmtContext) TABLE_() antlr.TerminalNode { return s.GetToken(SQLiteParserTABLE_, 0) } func (s *Create_table_stmtContext) Table_name() ITable_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_nameContext) } func (s *Create_table_stmtContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Create_table_stmtContext) AllColumn_def() []IColumn_defContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_defContext); ok { len++ } } tst := make([]IColumn_defContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_defContext); ok { tst[i] = t.(IColumn_defContext) i++ } } return tst } func (s *Create_table_stmtContext) Column_def(i int) IColumn_defContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_defContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_defContext) } func (s *Create_table_stmtContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Create_table_stmtContext) AS_() antlr.TerminalNode { return s.GetToken(SQLiteParserAS_, 0) } func (s *Create_table_stmtContext) Select_stmt() ISelect_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISelect_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISelect_stmtContext) } func (s *Create_table_stmtContext) IF_() antlr.TerminalNode { return s.GetToken(SQLiteParserIF_, 0) } func (s *Create_table_stmtContext) NOT_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_, 0) } func (s *Create_table_stmtContext) EXISTS_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXISTS_, 0) } func (s *Create_table_stmtContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Create_table_stmtContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Create_table_stmtContext) TEMP_() antlr.TerminalNode { return s.GetToken(SQLiteParserTEMP_, 0) } func (s *Create_table_stmtContext) TEMPORARY_() antlr.TerminalNode { return s.GetToken(SQLiteParserTEMPORARY_, 0) } func (s *Create_table_stmtContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Create_table_stmtContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Create_table_stmtContext) AllTable_constraint() []ITable_constraintContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(ITable_constraintContext); ok { len++ } } tst := make([]ITable_constraintContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(ITable_constraintContext); ok { tst[i] = t.(ITable_constraintContext) i++ } } return tst } func (s *Create_table_stmtContext) Table_constraint(i int) ITable_constraintContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_constraintContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(ITable_constraintContext) } func (s *Create_table_stmtContext) AllTable_option() []ITable_optionContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(ITable_optionContext); ok { len++ } } tst := make([]ITable_optionContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(ITable_optionContext); ok { tst[i] = t.(ITable_optionContext) i++ } } return tst } func (s *Create_table_stmtContext) Table_option(i int) ITable_optionContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_optionContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(ITable_optionContext) } func (s *Create_table_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Create_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Create_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterCreate_table_stmt(s) } } func (s *Create_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitCreate_table_stmt(s) } } func (p *SQLiteParser) Create_table_stmt() (localctx ICreate_table_stmtContext) { localctx = NewCreate_table_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 28, SQLiteParserRULE_create_table_stmt) var _la int 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_ { { p.SetState(428) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } } { 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.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.BaseParser, p.GetTokenStream(), 36, p.GetParserRuleContext()) == 1 { { p.SetState(437) p.Schema_name() } { 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) p.Table_name() } 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) p.Column_def() } p.SetState(449) p.GetErrorHandler().Sync(p) 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) p.Column_def() } } p.SetState(451) p.GetErrorHandler().Sync(p) 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) p.Table_constraint() } 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_ { { p.SetState(460) p.Table_option() } 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) p.Table_option() } p.SetState(467) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } } case SQLiteParserAS_: { p.SetState(470) p.Match(SQLiteParserAS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(471) p.Select_stmt() } default: 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. type IColumn_defContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Column_name() IColumn_nameContext Type_name() IType_nameContext AllColumn_constraint() []IColumn_constraintContext Column_constraint(i int) IColumn_constraintContext // IsColumn_defContext differentiates from other interfaces. IsColumn_defContext() } type Column_defContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyColumn_defContext() *Column_defContext { var p = new(Column_defContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_column_def return p } func (s *Column_defContext) GetParser() antlr.Parser { return s.parser } func (s *Column_defContext) Column_name() IColumn_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Column_defContext) Type_name() IType_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IType_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IType_nameContext) } func (s *Column_defContext) AllColumn_constraint() []IColumn_constraintContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_constraintContext); ok { len++ } } tst := make([]IColumn_constraintContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_constraintContext); ok { tst[i] = t.(IColumn_constraintContext) i++ } } return tst } func (s *Column_defContext) Column_constraint(i int) IColumn_constraintContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_constraintContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_constraintContext) } func (s *Column_defContext) GetRuleContext() antlr.RuleContext { return s } func (s *Column_defContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Column_defContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterColumn_def(s) } } func (s *Column_defContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitColumn_def(s) } } func (p *SQLiteParser) Column_def() (localctx IColumn_defContext) { localctx = NewColumn_defContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 30, SQLiteParserRULE_column_def) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(474) p.Column_name() } p.SetState(476) p.GetErrorHandler().Sync(p) 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) 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) 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. type IType_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures AllName() []INameContext Name(i int) INameContext OPEN_PAR() antlr.TerminalNode AllSigned_number() []ISigned_numberContext Signed_number(i int) ISigned_numberContext CLOSE_PAR() antlr.TerminalNode COMMA() antlr.TerminalNode // IsType_nameContext differentiates from other interfaces. IsType_nameContext() } type Type_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyType_nameContext() *Type_nameContext { var p = new(Type_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_type_name return p } func (s *Type_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Type_nameContext) AllName() []INameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(INameContext); ok { len++ } } tst := make([]INameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(INameContext); ok { tst[i] = t.(INameContext) i++ } } return tst } func (s *Type_nameContext) Name(i int) INameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(INameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(INameContext) } func (s *Type_nameContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Type_nameContext) AllSigned_number() []ISigned_numberContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(ISigned_numberContext); ok { len++ } } tst := make([]ISigned_numberContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(ISigned_numberContext); ok { tst[i] = t.(ISigned_numberContext) i++ } } return tst } func (s *Type_nameContext) Signed_number(i int) ISigned_numberContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISigned_numberContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(ISigned_numberContext) } func (s *Type_nameContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Type_nameContext) COMMA() antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, 0) } func (s *Type_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Type_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Type_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterType_name(s) } } func (s *Type_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitType_name(s) } } func (p *SQLiteParser) Type_name() (localctx IType_nameContext) { localctx = NewType_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 32, SQLiteParserRULE_type_name) 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 { case 1 + 1: { p.SetState(484) p.Name() } default: p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) goto errorExit } p.SetState(487) p.GetErrorHandler().Sync(p) _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.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) p.Signed_number() } { p.SetState(491) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } } 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) p.Signed_number() } { p.SetState(495) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(496) p.Signed_number() } { 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. type IColumn_constraintContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures CHECK_() antlr.TerminalNode OPEN_PAR() antlr.TerminalNode Expr() IExprContext CLOSE_PAR() antlr.TerminalNode DEFAULT_() antlr.TerminalNode COLLATE_() antlr.TerminalNode Collation_name() ICollation_nameContext Foreign_key_clause() IForeign_key_clauseContext AS_() antlr.TerminalNode CONSTRAINT_() antlr.TerminalNode Name() INameContext PRIMARY_() antlr.TerminalNode KEY_() antlr.TerminalNode NOT_() antlr.TerminalNode NULL_() antlr.TerminalNode UNIQUE_() antlr.TerminalNode Signed_number() ISigned_numberContext Literal_value() ILiteral_valueContext Conflict_clause() IConflict_clauseContext GENERATED_() antlr.TerminalNode ALWAYS_() antlr.TerminalNode STORED_() antlr.TerminalNode VIRTUAL_() antlr.TerminalNode Asc_desc() IAsc_descContext AUTOINCREMENT_() antlr.TerminalNode // IsColumn_constraintContext differentiates from other interfaces. IsColumn_constraintContext() } type Column_constraintContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyColumn_constraintContext() *Column_constraintContext { var p = new(Column_constraintContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_column_constraint return p } func (s *Column_constraintContext) GetParser() antlr.Parser { return s.parser } func (s *Column_constraintContext) CHECK_() antlr.TerminalNode { return s.GetToken(SQLiteParserCHECK_, 0) } func (s *Column_constraintContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Column_constraintContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Column_constraintContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Column_constraintContext) DEFAULT_() antlr.TerminalNode { return s.GetToken(SQLiteParserDEFAULT_, 0) } func (s *Column_constraintContext) COLLATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCOLLATE_, 0) } func (s *Column_constraintContext) Collation_name() ICollation_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICollation_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ICollation_nameContext) } func (s *Column_constraintContext) Foreign_key_clause() IForeign_key_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IForeign_key_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IForeign_key_clauseContext) } func (s *Column_constraintContext) AS_() antlr.TerminalNode { return s.GetToken(SQLiteParserAS_, 0) } func (s *Column_constraintContext) CONSTRAINT_() antlr.TerminalNode { return s.GetToken(SQLiteParserCONSTRAINT_, 0) } func (s *Column_constraintContext) Name() INameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(INameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(INameContext) } func (s *Column_constraintContext) PRIMARY_() antlr.TerminalNode { return s.GetToken(SQLiteParserPRIMARY_, 0) } func (s *Column_constraintContext) KEY_() antlr.TerminalNode { return s.GetToken(SQLiteParserKEY_, 0) } func (s *Column_constraintContext) NOT_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_, 0) } func (s *Column_constraintContext) NULL_() antlr.TerminalNode { return s.GetToken(SQLiteParserNULL_, 0) } func (s *Column_constraintContext) UNIQUE_() antlr.TerminalNode { return s.GetToken(SQLiteParserUNIQUE_, 0) } func (s *Column_constraintContext) Signed_number() ISigned_numberContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISigned_numberContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISigned_numberContext) } func (s *Column_constraintContext) 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 *Column_constraintContext) Conflict_clause() IConflict_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IConflict_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IConflict_clauseContext) } func (s *Column_constraintContext) GENERATED_() antlr.TerminalNode { return s.GetToken(SQLiteParserGENERATED_, 0) } func (s *Column_constraintContext) ALWAYS_() antlr.TerminalNode { return s.GetToken(SQLiteParserALWAYS_, 0) } func (s *Column_constraintContext) STORED_() antlr.TerminalNode { return s.GetToken(SQLiteParserSTORED_, 0) } func (s *Column_constraintContext) VIRTUAL_() antlr.TerminalNode { return s.GetToken(SQLiteParserVIRTUAL_, 0) } func (s *Column_constraintContext) Asc_desc() IAsc_descContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAsc_descContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAsc_descContext) } func (s *Column_constraintContext) AUTOINCREMENT_() antlr.TerminalNode { return s.GetToken(SQLiteParserAUTOINCREMENT_, 0) } func (s *Column_constraintContext) GetRuleContext() antlr.RuleContext { return s } func (s *Column_constraintContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Column_constraintContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterColumn_constraint(s) } } func (s *Column_constraintContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitColumn_constraint(s) } } func (p *SQLiteParser) Column_constraint() (localctx IColumn_constraintContext) { localctx = NewColumn_constraintContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 34, SQLiteParserRULE_column_constraint) var _la int 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) p.Name() } } 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_ { { p.SetState(507) p.Asc_desc() } } p.SetState(511) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserON_ { { p.SetState(510) p.Conflict_clause() } } 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 } } } 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: 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_ { { p.SetState(521) p.Conflict_clause() } } case SQLiteParserCHECK_: { 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) p.expr(0) } { 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) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 52, p.GetParserRuleContext()) { case 1: { p.SetState(530) p.Signed_number() } case 2: { p.SetState(531) p.Literal_value() } case 3: { p.SetState(532) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(533) p.expr(0) } { 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) p.Collation_name() } case SQLiteParserREFERENCES_: { p.SetState(540) p.Foreign_key_clause() } 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) p.expr(0) } { 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_ { { p.SetState(549) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserVIRTUAL_ || _la == SQLiteParserSTORED_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } } default: 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. type ISigned_numberContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures NUMERIC_LITERAL() antlr.TerminalNode PLUS() antlr.TerminalNode MINUS() antlr.TerminalNode // IsSigned_numberContext differentiates from other interfaces. IsSigned_numberContext() } type Signed_numberContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySigned_numberContext() *Signed_numberContext { var p = new(Signed_numberContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_signed_number return p } func (s *Signed_numberContext) GetParser() antlr.Parser { return s.parser } func (s *Signed_numberContext) NUMERIC_LITERAL() antlr.TerminalNode { return s.GetToken(SQLiteParserNUMERIC_LITERAL, 0) } func (s *Signed_numberContext) PLUS() antlr.TerminalNode { return s.GetToken(SQLiteParserPLUS, 0) } func (s *Signed_numberContext) MINUS() antlr.TerminalNode { return s.GetToken(SQLiteParserMINUS, 0) } func (s *Signed_numberContext) GetRuleContext() antlr.RuleContext { return s } func (s *Signed_numberContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Signed_numberContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterSigned_number(s) } } func (s *Signed_numberContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitSigned_number(s) } } func (p *SQLiteParser) Signed_number() (localctx ISigned_numberContext) { localctx = NewSigned_numberContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 36, SQLiteParserRULE_signed_number) var _la int 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 { { p.SetState(554) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserPLUS || _la == SQLiteParserMINUS) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } } { 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. type ITable_constraintContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures OPEN_PAR() antlr.TerminalNode AllIndexed_column() []IIndexed_columnContext Indexed_column(i int) IIndexed_columnContext CLOSE_PAR() antlr.TerminalNode CHECK_() antlr.TerminalNode Expr() IExprContext FOREIGN_() antlr.TerminalNode KEY_() antlr.TerminalNode AllColumn_name() []IColumn_nameContext Column_name(i int) IColumn_nameContext Foreign_key_clause() IForeign_key_clauseContext CONSTRAINT_() antlr.TerminalNode Name() INameContext PRIMARY_() antlr.TerminalNode UNIQUE_() antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode Conflict_clause() IConflict_clauseContext // IsTable_constraintContext differentiates from other interfaces. IsTable_constraintContext() } type Table_constraintContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTable_constraintContext() *Table_constraintContext { var p = new(Table_constraintContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_constraint return p } func (s *Table_constraintContext) GetParser() antlr.Parser { return s.parser } func (s *Table_constraintContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Table_constraintContext) AllIndexed_column() []IIndexed_columnContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IIndexed_columnContext); ok { len++ } } tst := make([]IIndexed_columnContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IIndexed_columnContext); ok { tst[i] = t.(IIndexed_columnContext) i++ } } return tst } func (s *Table_constraintContext) Indexed_column(i int) IIndexed_columnContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IIndexed_columnContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IIndexed_columnContext) } func (s *Table_constraintContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Table_constraintContext) CHECK_() antlr.TerminalNode { return s.GetToken(SQLiteParserCHECK_, 0) } func (s *Table_constraintContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Table_constraintContext) FOREIGN_() antlr.TerminalNode { return s.GetToken(SQLiteParserFOREIGN_, 0) } func (s *Table_constraintContext) KEY_() antlr.TerminalNode { return s.GetToken(SQLiteParserKEY_, 0) } func (s *Table_constraintContext) AllColumn_name() []IColumn_nameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_nameContext); ok { len++ } } tst := make([]IColumn_nameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_nameContext); ok { tst[i] = t.(IColumn_nameContext) i++ } } return tst } func (s *Table_constraintContext) Column_name(i int) IColumn_nameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Table_constraintContext) Foreign_key_clause() IForeign_key_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IForeign_key_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IForeign_key_clauseContext) } func (s *Table_constraintContext) CONSTRAINT_() antlr.TerminalNode { return s.GetToken(SQLiteParserCONSTRAINT_, 0) } func (s *Table_constraintContext) Name() INameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(INameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(INameContext) } func (s *Table_constraintContext) PRIMARY_() antlr.TerminalNode { return s.GetToken(SQLiteParserPRIMARY_, 0) } func (s *Table_constraintContext) UNIQUE_() antlr.TerminalNode { return s.GetToken(SQLiteParserUNIQUE_, 0) } func (s *Table_constraintContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Table_constraintContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Table_constraintContext) Conflict_clause() IConflict_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IConflict_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IConflict_clauseContext) } func (s *Table_constraintContext) GetRuleContext() antlr.RuleContext { return s } func (s *Table_constraintContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Table_constraintContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterTable_constraint(s) } } func (s *Table_constraintContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitTable_constraint(s) } } func (p *SQLiteParser) Table_constraint() (localctx ITable_constraintContext) { localctx = NewTable_constraintContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 38, SQLiteParserRULE_table_constraint) var _la int 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) p.Name() } } 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: 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) p.Indexed_column() } 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) p.Indexed_column() } 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_ { { p.SetState(578) p.Conflict_clause() } } case SQLiteParserCHECK_: { 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) p.expr(0) } { 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) p.Column_name() } 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) p.Column_name() } 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) p.Foreign_key_clause() } default: 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. type IForeign_key_clauseContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures REFERENCES_() antlr.TerminalNode Foreign_table() IForeign_tableContext OPEN_PAR() antlr.TerminalNode AllColumn_name() []IColumn_nameContext Column_name(i int) IColumn_nameContext CLOSE_PAR() antlr.TerminalNode AllON_() []antlr.TerminalNode ON_(i int) antlr.TerminalNode AllMATCH_() []antlr.TerminalNode MATCH_(i int) antlr.TerminalNode AllName() []INameContext Name(i int) INameContext DEFERRABLE_() antlr.TerminalNode AllDELETE_() []antlr.TerminalNode DELETE_(i int) antlr.TerminalNode AllUPDATE_() []antlr.TerminalNode UPDATE_(i int) antlr.TerminalNode AllSET_() []antlr.TerminalNode SET_(i int) antlr.TerminalNode AllCASCADE_() []antlr.TerminalNode CASCADE_(i int) antlr.TerminalNode AllRESTRICT_() []antlr.TerminalNode RESTRICT_(i int) antlr.TerminalNode AllNO_() []antlr.TerminalNode NO_(i int) antlr.TerminalNode AllACTION_() []antlr.TerminalNode ACTION_(i int) antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode AllNULL_() []antlr.TerminalNode NULL_(i int) antlr.TerminalNode AllDEFAULT_() []antlr.TerminalNode DEFAULT_(i int) antlr.TerminalNode NOT_() antlr.TerminalNode INITIALLY_() antlr.TerminalNode DEFERRED_() antlr.TerminalNode IMMEDIATE_() antlr.TerminalNode // IsForeign_key_clauseContext differentiates from other interfaces. IsForeign_key_clauseContext() } type Foreign_key_clauseContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyForeign_key_clauseContext() *Foreign_key_clauseContext { var p = new(Foreign_key_clauseContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_foreign_key_clause return p } func (s *Foreign_key_clauseContext) GetParser() antlr.Parser { return s.parser } func (s *Foreign_key_clauseContext) REFERENCES_() antlr.TerminalNode { return s.GetToken(SQLiteParserREFERENCES_, 0) } func (s *Foreign_key_clauseContext) Foreign_table() IForeign_tableContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IForeign_tableContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IForeign_tableContext) } func (s *Foreign_key_clauseContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Foreign_key_clauseContext) AllColumn_name() []IColumn_nameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_nameContext); ok { len++ } } tst := make([]IColumn_nameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_nameContext); ok { tst[i] = t.(IColumn_nameContext) i++ } } return tst } func (s *Foreign_key_clauseContext) Column_name(i int) IColumn_nameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Foreign_key_clauseContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Foreign_key_clauseContext) AllON_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserON_) } func (s *Foreign_key_clauseContext) ON_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserON_, i) } func (s *Foreign_key_clauseContext) AllMATCH_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserMATCH_) } func (s *Foreign_key_clauseContext) MATCH_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserMATCH_, i) } func (s *Foreign_key_clauseContext) AllName() []INameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(INameContext); ok { len++ } } tst := make([]INameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(INameContext); ok { tst[i] = t.(INameContext) i++ } } return tst } func (s *Foreign_key_clauseContext) Name(i int) INameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(INameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(INameContext) } func (s *Foreign_key_clauseContext) DEFERRABLE_() antlr.TerminalNode { return s.GetToken(SQLiteParserDEFERRABLE_, 0) } func (s *Foreign_key_clauseContext) AllDELETE_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserDELETE_) } func (s *Foreign_key_clauseContext) DELETE_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserDELETE_, i) } func (s *Foreign_key_clauseContext) AllUPDATE_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserUPDATE_) } func (s *Foreign_key_clauseContext) UPDATE_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserUPDATE_, i) } func (s *Foreign_key_clauseContext) AllSET_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserSET_) } func (s *Foreign_key_clauseContext) SET_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserSET_, i) } func (s *Foreign_key_clauseContext) AllCASCADE_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCASCADE_) } func (s *Foreign_key_clauseContext) CASCADE_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCASCADE_, i) } func (s *Foreign_key_clauseContext) AllRESTRICT_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserRESTRICT_) } func (s *Foreign_key_clauseContext) RESTRICT_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserRESTRICT_, i) } func (s *Foreign_key_clauseContext) AllNO_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserNO_) } func (s *Foreign_key_clauseContext) NO_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserNO_, i) } func (s *Foreign_key_clauseContext) AllACTION_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserACTION_) } func (s *Foreign_key_clauseContext) ACTION_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserACTION_, i) } func (s *Foreign_key_clauseContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Foreign_key_clauseContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Foreign_key_clauseContext) AllNULL_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserNULL_) } func (s *Foreign_key_clauseContext) NULL_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserNULL_, i) } func (s *Foreign_key_clauseContext) AllDEFAULT_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserDEFAULT_) } func (s *Foreign_key_clauseContext) DEFAULT_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserDEFAULT_, i) } func (s *Foreign_key_clauseContext) NOT_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_, 0) } func (s *Foreign_key_clauseContext) INITIALLY_() antlr.TerminalNode { return s.GetToken(SQLiteParserINITIALLY_, 0) } func (s *Foreign_key_clauseContext) DEFERRED_() antlr.TerminalNode { return s.GetToken(SQLiteParserDEFERRED_, 0) } func (s *Foreign_key_clauseContext) IMMEDIATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserIMMEDIATE_, 0) } func (s *Foreign_key_clauseContext) GetRuleContext() antlr.RuleContext { return s } func (s *Foreign_key_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Foreign_key_clauseContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterForeign_key_clause(s) } } func (s *Foreign_key_clauseContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitForeign_key_clause(s) } } func (p *SQLiteParser) Foreign_key_clause() (localctx IForeign_key_clauseContext) { localctx = NewForeign_key_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 40, SQLiteParserRULE_foreign_key_clause) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(602) p.Match(SQLiteParserREFERENCES_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(603) p.Foreign_table() } 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) p.Column_name() } 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) p.Column_name() } 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) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserDELETE_ || _la == SQLiteParserUPDATE_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } 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) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserDEFAULT_ || _la == SQLiteParserNULL_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } case SQLiteParserCASCADE_: { 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: 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) p.Name() } default: 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.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) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserDEFERRED_ || _la == SQLiteParserIMMEDIATE_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } } } 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. type IConflict_clauseContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures ON_() antlr.TerminalNode CONFLICT_() antlr.TerminalNode ROLLBACK_() antlr.TerminalNode ABORT_() antlr.TerminalNode FAIL_() antlr.TerminalNode IGNORE_() antlr.TerminalNode REPLACE_() antlr.TerminalNode // IsConflict_clauseContext differentiates from other interfaces. IsConflict_clauseContext() } type Conflict_clauseContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyConflict_clauseContext() *Conflict_clauseContext { var p = new(Conflict_clauseContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_conflict_clause return p } func (s *Conflict_clauseContext) GetParser() antlr.Parser { return s.parser } func (s *Conflict_clauseContext) ON_() antlr.TerminalNode { return s.GetToken(SQLiteParserON_, 0) } func (s *Conflict_clauseContext) CONFLICT_() antlr.TerminalNode { return s.GetToken(SQLiteParserCONFLICT_, 0) } func (s *Conflict_clauseContext) ROLLBACK_() antlr.TerminalNode { return s.GetToken(SQLiteParserROLLBACK_, 0) } func (s *Conflict_clauseContext) ABORT_() antlr.TerminalNode { return s.GetToken(SQLiteParserABORT_, 0) } func (s *Conflict_clauseContext) FAIL_() antlr.TerminalNode { return s.GetToken(SQLiteParserFAIL_, 0) } func (s *Conflict_clauseContext) IGNORE_() antlr.TerminalNode { return s.GetToken(SQLiteParserIGNORE_, 0) } func (s *Conflict_clauseContext) REPLACE_() antlr.TerminalNode { return s.GetToken(SQLiteParserREPLACE_, 0) } func (s *Conflict_clauseContext) GetRuleContext() antlr.RuleContext { return s } func (s *Conflict_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Conflict_clauseContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterConflict_clause(s) } } func (s *Conflict_clauseContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitConflict_clause(s) } } func (p *SQLiteParser) Conflict_clause() (localctx IConflict_clauseContext) { localctx = NewConflict_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 42, SQLiteParserRULE_conflict_clause) var _la int 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-74)) & ^0x3f) == 0 && ((int64(1)<<(_la-74))&19140298416325121) != 0)) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } 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. type ICreate_trigger_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures CREATE_() antlr.TerminalNode TRIGGER_() antlr.TerminalNode Trigger_name() ITrigger_nameContext ON_() antlr.TerminalNode Table_name() ITable_nameContext BEGIN_() antlr.TerminalNode END_() antlr.TerminalNode DELETE_() antlr.TerminalNode INSERT_() antlr.TerminalNode UPDATE_() antlr.TerminalNode IF_() antlr.TerminalNode NOT_() antlr.TerminalNode EXISTS_() antlr.TerminalNode Schema_name() ISchema_nameContext DOT() antlr.TerminalNode BEFORE_() antlr.TerminalNode AFTER_() antlr.TerminalNode INSTEAD_() antlr.TerminalNode AllOF_() []antlr.TerminalNode OF_(i int) antlr.TerminalNode FOR_() antlr.TerminalNode EACH_() antlr.TerminalNode ROW_() antlr.TerminalNode WHEN_() antlr.TerminalNode Expr() IExprContext AllSCOL() []antlr.TerminalNode SCOL(i int) antlr.TerminalNode TEMP_() antlr.TerminalNode TEMPORARY_() antlr.TerminalNode AllColumn_name() []IColumn_nameContext Column_name(i int) IColumn_nameContext AllUpdate_stmt() []IUpdate_stmtContext Update_stmt(i int) IUpdate_stmtContext AllInsert_stmt() []IInsert_stmtContext Insert_stmt(i int) IInsert_stmtContext AllDelete_stmt() []IDelete_stmtContext Delete_stmt(i int) IDelete_stmtContext AllSelect_stmt() []ISelect_stmtContext Select_stmt(i int) ISelect_stmtContext AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsCreate_trigger_stmtContext differentiates from other interfaces. IsCreate_trigger_stmtContext() } type Create_trigger_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCreate_trigger_stmtContext() *Create_trigger_stmtContext { var p = new(Create_trigger_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_create_trigger_stmt return p } func (s *Create_trigger_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Create_trigger_stmtContext) CREATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCREATE_, 0) } func (s *Create_trigger_stmtContext) TRIGGER_() antlr.TerminalNode { return s.GetToken(SQLiteParserTRIGGER_, 0) } func (s *Create_trigger_stmtContext) Trigger_name() ITrigger_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITrigger_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITrigger_nameContext) } func (s *Create_trigger_stmtContext) ON_() antlr.TerminalNode { return s.GetToken(SQLiteParserON_, 0) } func (s *Create_trigger_stmtContext) Table_name() ITable_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_nameContext) } func (s *Create_trigger_stmtContext) BEGIN_() antlr.TerminalNode { return s.GetToken(SQLiteParserBEGIN_, 0) } func (s *Create_trigger_stmtContext) END_() antlr.TerminalNode { return s.GetToken(SQLiteParserEND_, 0) } func (s *Create_trigger_stmtContext) DELETE_() antlr.TerminalNode { return s.GetToken(SQLiteParserDELETE_, 0) } func (s *Create_trigger_stmtContext) INSERT_() antlr.TerminalNode { return s.GetToken(SQLiteParserINSERT_, 0) } func (s *Create_trigger_stmtContext) UPDATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserUPDATE_, 0) } func (s *Create_trigger_stmtContext) IF_() antlr.TerminalNode { return s.GetToken(SQLiteParserIF_, 0) } func (s *Create_trigger_stmtContext) NOT_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_, 0) } func (s *Create_trigger_stmtContext) EXISTS_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXISTS_, 0) } func (s *Create_trigger_stmtContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Create_trigger_stmtContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Create_trigger_stmtContext) BEFORE_() antlr.TerminalNode { return s.GetToken(SQLiteParserBEFORE_, 0) } func (s *Create_trigger_stmtContext) AFTER_() antlr.TerminalNode { return s.GetToken(SQLiteParserAFTER_, 0) } func (s *Create_trigger_stmtContext) INSTEAD_() antlr.TerminalNode { return s.GetToken(SQLiteParserINSTEAD_, 0) } func (s *Create_trigger_stmtContext) AllOF_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserOF_) } func (s *Create_trigger_stmtContext) OF_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserOF_, i) } func (s *Create_trigger_stmtContext) FOR_() antlr.TerminalNode { return s.GetToken(SQLiteParserFOR_, 0) } func (s *Create_trigger_stmtContext) EACH_() antlr.TerminalNode { return s.GetToken(SQLiteParserEACH_, 0) } func (s *Create_trigger_stmtContext) ROW_() antlr.TerminalNode { return s.GetToken(SQLiteParserROW_, 0) } func (s *Create_trigger_stmtContext) WHEN_() antlr.TerminalNode { return s.GetToken(SQLiteParserWHEN_, 0) } func (s *Create_trigger_stmtContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Create_trigger_stmtContext) AllSCOL() []antlr.TerminalNode { return s.GetTokens(SQLiteParserSCOL) } func (s *Create_trigger_stmtContext) SCOL(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserSCOL, i) } func (s *Create_trigger_stmtContext) TEMP_() antlr.TerminalNode { return s.GetToken(SQLiteParserTEMP_, 0) } func (s *Create_trigger_stmtContext) TEMPORARY_() antlr.TerminalNode { return s.GetToken(SQLiteParserTEMPORARY_, 0) } func (s *Create_trigger_stmtContext) AllColumn_name() []IColumn_nameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_nameContext); ok { len++ } } tst := make([]IColumn_nameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_nameContext); ok { tst[i] = t.(IColumn_nameContext) i++ } } return tst } func (s *Create_trigger_stmtContext) Column_name(i int) IColumn_nameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Create_trigger_stmtContext) AllUpdate_stmt() []IUpdate_stmtContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IUpdate_stmtContext); ok { len++ } } tst := make([]IUpdate_stmtContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IUpdate_stmtContext); ok { tst[i] = t.(IUpdate_stmtContext) i++ } } return tst } func (s *Create_trigger_stmtContext) Update_stmt(i int) IUpdate_stmtContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IUpdate_stmtContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IUpdate_stmtContext) } func (s *Create_trigger_stmtContext) AllInsert_stmt() []IInsert_stmtContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IInsert_stmtContext); ok { len++ } } tst := make([]IInsert_stmtContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IInsert_stmtContext); ok { tst[i] = t.(IInsert_stmtContext) i++ } } return tst } func (s *Create_trigger_stmtContext) Insert_stmt(i int) IInsert_stmtContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IInsert_stmtContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IInsert_stmtContext) } func (s *Create_trigger_stmtContext) AllDelete_stmt() []IDelete_stmtContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IDelete_stmtContext); ok { len++ } } tst := make([]IDelete_stmtContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IDelete_stmtContext); ok { tst[i] = t.(IDelete_stmtContext) i++ } } return tst } func (s *Create_trigger_stmtContext) Delete_stmt(i int) IDelete_stmtContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IDelete_stmtContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IDelete_stmtContext) } func (s *Create_trigger_stmtContext) AllSelect_stmt() []ISelect_stmtContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(ISelect_stmtContext); ok { len++ } } tst := make([]ISelect_stmtContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(ISelect_stmtContext); ok { tst[i] = t.(ISelect_stmtContext) i++ } } return tst } func (s *Create_trigger_stmtContext) Select_stmt(i int) ISelect_stmtContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISelect_stmtContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(ISelect_stmtContext) } func (s *Create_trigger_stmtContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Create_trigger_stmtContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Create_trigger_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Create_trigger_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Create_trigger_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterCreate_trigger_stmt(s) } } func (s *Create_trigger_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitCreate_trigger_stmt(s) } } func (p *SQLiteParser) Create_trigger_stmt() (localctx ICreate_trigger_stmtContext) { localctx = NewCreate_trigger_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 44, SQLiteParserRULE_create_trigger_stmt) var _la int 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_ { { p.SetState(649) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } } { 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.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.BaseParser, p.GetTokenStream(), 73, p.GetParserRuleContext()) == 1 { { p.SetState(658) p.Schema_name() } { 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) p.Trigger_name() } 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_: default: } 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) p.Column_name() } 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) p.Column_name() } p.SetState(681) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } } default: 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) p.Table_name() } 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) p.expr(0) } } { 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 == SQLiteParserDELETE_ || ((int64((_la-90)) & ^0x3f) == 0 && ((int64(1)<<(_la-90))&4773820020239106049) != 0) { p.SetState(702) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 80, p.GetParserRuleContext()) { case 1: { p.SetState(698) p.Update_stmt() } case 2: { p.SetState(699) p.Insert_stmt() } case 3: { p.SetState(700) p.Delete_stmt() } case 4: { p.SetState(701) 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. type ICreate_view_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures CREATE_() antlr.TerminalNode VIEW_() antlr.TerminalNode View_name() IView_nameContext AS_() antlr.TerminalNode Select_stmt() ISelect_stmtContext IF_() antlr.TerminalNode NOT_() antlr.TerminalNode EXISTS_() antlr.TerminalNode Schema_name() ISchema_nameContext DOT() antlr.TerminalNode OPEN_PAR() antlr.TerminalNode AllColumn_name() []IColumn_nameContext Column_name(i int) IColumn_nameContext CLOSE_PAR() antlr.TerminalNode TEMP_() antlr.TerminalNode TEMPORARY_() antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsCreate_view_stmtContext differentiates from other interfaces. IsCreate_view_stmtContext() } type Create_view_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCreate_view_stmtContext() *Create_view_stmtContext { var p = new(Create_view_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_create_view_stmt return p } func (s *Create_view_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Create_view_stmtContext) CREATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCREATE_, 0) } func (s *Create_view_stmtContext) VIEW_() antlr.TerminalNode { return s.GetToken(SQLiteParserVIEW_, 0) } func (s *Create_view_stmtContext) View_name() IView_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IView_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IView_nameContext) } func (s *Create_view_stmtContext) AS_() antlr.TerminalNode { return s.GetToken(SQLiteParserAS_, 0) } func (s *Create_view_stmtContext) Select_stmt() ISelect_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISelect_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISelect_stmtContext) } func (s *Create_view_stmtContext) IF_() antlr.TerminalNode { return s.GetToken(SQLiteParserIF_, 0) } func (s *Create_view_stmtContext) NOT_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_, 0) } func (s *Create_view_stmtContext) EXISTS_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXISTS_, 0) } func (s *Create_view_stmtContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Create_view_stmtContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Create_view_stmtContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Create_view_stmtContext) AllColumn_name() []IColumn_nameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_nameContext); ok { len++ } } tst := make([]IColumn_nameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_nameContext); ok { tst[i] = t.(IColumn_nameContext) i++ } } return tst } func (s *Create_view_stmtContext) Column_name(i int) IColumn_nameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Create_view_stmtContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Create_view_stmtContext) TEMP_() antlr.TerminalNode { return s.GetToken(SQLiteParserTEMP_, 0) } func (s *Create_view_stmtContext) TEMPORARY_() antlr.TerminalNode { return s.GetToken(SQLiteParserTEMPORARY_, 0) } func (s *Create_view_stmtContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Create_view_stmtContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Create_view_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Create_view_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Create_view_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterCreate_view_stmt(s) } } func (s *Create_view_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitCreate_view_stmt(s) } } func (p *SQLiteParser) Create_view_stmt() (localctx ICreate_view_stmtContext) { localctx = NewCreate_view_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 46, SQLiteParserRULE_create_view_stmt) var _la int 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_ { { p.SetState(713) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } } { 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.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.BaseParser, p.GetTokenStream(), 84, p.GetParserRuleContext()) == 1 { { p.SetState(722) p.Schema_name() } { 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) p.View_name() } 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) p.Column_name() } 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) p.Column_name() } 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. type ICreate_virtual_table_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures CREATE_() antlr.TerminalNode VIRTUAL_() antlr.TerminalNode TABLE_() antlr.TerminalNode Table_name() ITable_nameContext USING_() antlr.TerminalNode Module_name() IModule_nameContext IF_() antlr.TerminalNode NOT_() antlr.TerminalNode EXISTS_() antlr.TerminalNode Schema_name() ISchema_nameContext DOT() antlr.TerminalNode OPEN_PAR() antlr.TerminalNode AllModule_argument() []IModule_argumentContext Module_argument(i int) IModule_argumentContext CLOSE_PAR() antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsCreate_virtual_table_stmtContext differentiates from other interfaces. IsCreate_virtual_table_stmtContext() } type Create_virtual_table_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCreate_virtual_table_stmtContext() *Create_virtual_table_stmtContext { var p = new(Create_virtual_table_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_create_virtual_table_stmt return p } func (s *Create_virtual_table_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Create_virtual_table_stmtContext) CREATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCREATE_, 0) } func (s *Create_virtual_table_stmtContext) VIRTUAL_() antlr.TerminalNode { return s.GetToken(SQLiteParserVIRTUAL_, 0) } func (s *Create_virtual_table_stmtContext) TABLE_() antlr.TerminalNode { return s.GetToken(SQLiteParserTABLE_, 0) } func (s *Create_virtual_table_stmtContext) Table_name() ITable_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_nameContext) } func (s *Create_virtual_table_stmtContext) USING_() antlr.TerminalNode { return s.GetToken(SQLiteParserUSING_, 0) } func (s *Create_virtual_table_stmtContext) Module_name() IModule_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IModule_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IModule_nameContext) } func (s *Create_virtual_table_stmtContext) IF_() antlr.TerminalNode { return s.GetToken(SQLiteParserIF_, 0) } func (s *Create_virtual_table_stmtContext) NOT_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_, 0) } func (s *Create_virtual_table_stmtContext) EXISTS_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXISTS_, 0) } func (s *Create_virtual_table_stmtContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Create_virtual_table_stmtContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Create_virtual_table_stmtContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Create_virtual_table_stmtContext) AllModule_argument() []IModule_argumentContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IModule_argumentContext); ok { len++ } } tst := make([]IModule_argumentContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IModule_argumentContext); ok { tst[i] = t.(IModule_argumentContext) i++ } } return tst } func (s *Create_virtual_table_stmtContext) Module_argument(i int) IModule_argumentContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IModule_argumentContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IModule_argumentContext) } func (s *Create_virtual_table_stmtContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Create_virtual_table_stmtContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Create_virtual_table_stmtContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Create_virtual_table_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Create_virtual_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Create_virtual_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterCreate_virtual_table_stmt(s) } } func (s *Create_virtual_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitCreate_virtual_table_stmt(s) } } func (p *SQLiteParser) Create_virtual_table_stmt() (localctx ICreate_virtual_table_stmtContext) { localctx = NewCreate_virtual_table_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 48, SQLiteParserRULE_create_virtual_table_stmt) var _la int 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.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.BaseParser, p.GetTokenStream(), 88, p.GetParserRuleContext()) == 1 { { p.SetState(752) p.Schema_name() } { 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) p.Table_name() } { p.SetState(758) p.Match(SQLiteParserUSING_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(759) p.Module_name() } 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) p.Module_argument() } 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) p.Module_argument() } 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. type IWith_clauseContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures WITH_() antlr.TerminalNode AllCte_table_name() []ICte_table_nameContext Cte_table_name(i int) ICte_table_nameContext AllAS_() []antlr.TerminalNode AS_(i int) antlr.TerminalNode AllOPEN_PAR() []antlr.TerminalNode OPEN_PAR(i int) antlr.TerminalNode AllSelect_stmt() []ISelect_stmtContext Select_stmt(i int) ISelect_stmtContext AllCLOSE_PAR() []antlr.TerminalNode CLOSE_PAR(i int) antlr.TerminalNode RECURSIVE_() antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsWith_clauseContext differentiates from other interfaces. IsWith_clauseContext() } type With_clauseContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyWith_clauseContext() *With_clauseContext { var p = new(With_clauseContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_with_clause return p } func (s *With_clauseContext) GetParser() antlr.Parser { return s.parser } func (s *With_clauseContext) WITH_() antlr.TerminalNode { return s.GetToken(SQLiteParserWITH_, 0) } func (s *With_clauseContext) AllCte_table_name() []ICte_table_nameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(ICte_table_nameContext); ok { len++ } } tst := make([]ICte_table_nameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(ICte_table_nameContext); ok { tst[i] = t.(ICte_table_nameContext) i++ } } return tst } func (s *With_clauseContext) Cte_table_name(i int) ICte_table_nameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICte_table_nameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(ICte_table_nameContext) } func (s *With_clauseContext) AllAS_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserAS_) } func (s *With_clauseContext) AS_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserAS_, i) } func (s *With_clauseContext) AllOPEN_PAR() []antlr.TerminalNode { return s.GetTokens(SQLiteParserOPEN_PAR) } func (s *With_clauseContext) OPEN_PAR(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, i) } func (s *With_clauseContext) AllSelect_stmt() []ISelect_stmtContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(ISelect_stmtContext); ok { len++ } } tst := make([]ISelect_stmtContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(ISelect_stmtContext); ok { tst[i] = t.(ISelect_stmtContext) i++ } } return tst } func (s *With_clauseContext) Select_stmt(i int) ISelect_stmtContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISelect_stmtContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(ISelect_stmtContext) } func (s *With_clauseContext) AllCLOSE_PAR() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCLOSE_PAR) } func (s *With_clauseContext) CLOSE_PAR(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, i) } func (s *With_clauseContext) RECURSIVE_() antlr.TerminalNode { return s.GetToken(SQLiteParserRECURSIVE_, 0) } func (s *With_clauseContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *With_clauseContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *With_clauseContext) GetRuleContext() antlr.RuleContext { return s } func (s *With_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *With_clauseContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterWith_clause(s) } } func (s *With_clauseContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitWith_clause(s) } } func (p *SQLiteParser) With_clause() (localctx IWith_clauseContext) { localctx = NewWith_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 50, SQLiteParserRULE_with_clause) var _la int 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.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) p.Cte_table_name() } { 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) p.Select_stmt() } { 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) p.Cte_table_name() } { 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) p.Select_stmt() } { 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. type ICte_table_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Table_name() ITable_nameContext OPEN_PAR() antlr.TerminalNode AllColumn_name() []IColumn_nameContext Column_name(i int) IColumn_nameContext CLOSE_PAR() antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsCte_table_nameContext differentiates from other interfaces. IsCte_table_nameContext() } type Cte_table_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCte_table_nameContext() *Cte_table_nameContext { var p = new(Cte_table_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_cte_table_name return p } func (s *Cte_table_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Cte_table_nameContext) Table_name() ITable_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_nameContext) } func (s *Cte_table_nameContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Cte_table_nameContext) AllColumn_name() []IColumn_nameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_nameContext); ok { len++ } } tst := make([]IColumn_nameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_nameContext); ok { tst[i] = t.(IColumn_nameContext) i++ } } return tst } func (s *Cte_table_nameContext) Column_name(i int) IColumn_nameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Cte_table_nameContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Cte_table_nameContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Cte_table_nameContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Cte_table_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Cte_table_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Cte_table_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterCte_table_name(s) } } func (s *Cte_table_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitCte_table_name(s) } } func (p *SQLiteParser) Cte_table_name() (localctx ICte_table_nameContext) { localctx = NewCte_table_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 52, SQLiteParserRULE_cte_table_name) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(794) p.Table_name() } 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) p.Column_name() } 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) p.Column_name() } 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. type IRecursive_cteContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Cte_table_name() ICte_table_nameContext AS_() antlr.TerminalNode OPEN_PAR() antlr.TerminalNode Initial_select() IInitial_selectContext UNION_() antlr.TerminalNode Recursive__select() IRecursive__selectContext CLOSE_PAR() antlr.TerminalNode ALL_() antlr.TerminalNode // IsRecursive_cteContext differentiates from other interfaces. IsRecursive_cteContext() } type Recursive_cteContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyRecursive_cteContext() *Recursive_cteContext { var p = new(Recursive_cteContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_recursive_cte return p } func (s *Recursive_cteContext) GetParser() antlr.Parser { return s.parser } func (s *Recursive_cteContext) Cte_table_name() ICte_table_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICte_table_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ICte_table_nameContext) } func (s *Recursive_cteContext) AS_() antlr.TerminalNode { return s.GetToken(SQLiteParserAS_, 0) } func (s *Recursive_cteContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Recursive_cteContext) Initial_select() IInitial_selectContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IInitial_selectContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IInitial_selectContext) } func (s *Recursive_cteContext) UNION_() antlr.TerminalNode { return s.GetToken(SQLiteParserUNION_, 0) } func (s *Recursive_cteContext) Recursive__select() IRecursive__selectContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IRecursive__selectContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IRecursive__selectContext) } func (s *Recursive_cteContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Recursive_cteContext) ALL_() antlr.TerminalNode { return s.GetToken(SQLiteParserALL_, 0) } func (s *Recursive_cteContext) GetRuleContext() antlr.RuleContext { return s } func (s *Recursive_cteContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Recursive_cteContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterRecursive_cte(s) } } func (s *Recursive_cteContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitRecursive_cte(s) } } func (p *SQLiteParser) Recursive_cte() (localctx IRecursive_cteContext) { localctx = NewRecursive_cteContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 54, SQLiteParserRULE_recursive_cte) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(808) p.Cte_table_name() } { 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) p.Initial_select() } { 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 } } } { p.SetState(816) p.Recursive__select() } { 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. type ICommon_table_expressionContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Table_name() ITable_nameContext AS_() antlr.TerminalNode AllOPEN_PAR() []antlr.TerminalNode OPEN_PAR(i int) antlr.TerminalNode Select_stmt() ISelect_stmtContext AllCLOSE_PAR() []antlr.TerminalNode CLOSE_PAR(i int) antlr.TerminalNode AllColumn_name() []IColumn_nameContext Column_name(i int) IColumn_nameContext AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsCommon_table_expressionContext differentiates from other interfaces. IsCommon_table_expressionContext() } type Common_table_expressionContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCommon_table_expressionContext() *Common_table_expressionContext { var p = new(Common_table_expressionContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_common_table_expression return p } func (s *Common_table_expressionContext) GetParser() antlr.Parser { return s.parser } func (s *Common_table_expressionContext) Table_name() ITable_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_nameContext) } func (s *Common_table_expressionContext) AS_() antlr.TerminalNode { return s.GetToken(SQLiteParserAS_, 0) } func (s *Common_table_expressionContext) AllOPEN_PAR() []antlr.TerminalNode { return s.GetTokens(SQLiteParserOPEN_PAR) } func (s *Common_table_expressionContext) OPEN_PAR(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, i) } func (s *Common_table_expressionContext) Select_stmt() ISelect_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISelect_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISelect_stmtContext) } func (s *Common_table_expressionContext) AllCLOSE_PAR() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCLOSE_PAR) } func (s *Common_table_expressionContext) CLOSE_PAR(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, i) } func (s *Common_table_expressionContext) AllColumn_name() []IColumn_nameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_nameContext); ok { len++ } } tst := make([]IColumn_nameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_nameContext); ok { tst[i] = t.(IColumn_nameContext) i++ } } return tst } func (s *Common_table_expressionContext) Column_name(i int) IColumn_nameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Common_table_expressionContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Common_table_expressionContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Common_table_expressionContext) GetRuleContext() antlr.RuleContext { return s } func (s *Common_table_expressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Common_table_expressionContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterCommon_table_expression(s) } } func (s *Common_table_expressionContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitCommon_table_expression(s) } } func (p *SQLiteParser) Common_table_expression() (localctx ICommon_table_expressionContext) { localctx = NewCommon_table_expressionContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 56, SQLiteParserRULE_common_table_expression) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(819) p.Table_name() } 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) p.Column_name() } 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) p.Column_name() } 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) p.Select_stmt() } { 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. type IReturning_clauseContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures RETURNING_() antlr.TerminalNode AllSTAR() []antlr.TerminalNode STAR(i int) antlr.TerminalNode AllExpr() []IExprContext Expr(i int) IExprContext AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode AllColumn_alias() []IColumn_aliasContext Column_alias(i int) IColumn_aliasContext AllAS_() []antlr.TerminalNode AS_(i int) antlr.TerminalNode // IsReturning_clauseContext differentiates from other interfaces. IsReturning_clauseContext() } type Returning_clauseContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyReturning_clauseContext() *Returning_clauseContext { var p = new(Returning_clauseContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_returning_clause return p } func (s *Returning_clauseContext) GetParser() antlr.Parser { return s.parser } func (s *Returning_clauseContext) RETURNING_() antlr.TerminalNode { return s.GetToken(SQLiteParserRETURNING_, 0) } func (s *Returning_clauseContext) AllSTAR() []antlr.TerminalNode { return s.GetTokens(SQLiteParserSTAR) } func (s *Returning_clauseContext) STAR(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserSTAR, i) } func (s *Returning_clauseContext) 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 *Returning_clauseContext) 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 *Returning_clauseContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Returning_clauseContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Returning_clauseContext) AllColumn_alias() []IColumn_aliasContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_aliasContext); ok { len++ } } tst := make([]IColumn_aliasContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_aliasContext); ok { tst[i] = t.(IColumn_aliasContext) i++ } } return tst } func (s *Returning_clauseContext) Column_alias(i int) IColumn_aliasContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_aliasContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_aliasContext) } func (s *Returning_clauseContext) AllAS_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserAS_) } func (s *Returning_clauseContext) AS_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserAS_, i) } func (s *Returning_clauseContext) GetRuleContext() antlr.RuleContext { return s } func (s *Returning_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Returning_clauseContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterReturning_clause(s) } } func (s *Returning_clauseContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitReturning_clause(s) } } func (p *SQLiteParser) Returning_clause() (localctx IReturning_clauseContext) { localctx = NewReturning_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 58, SQLiteParserRULE_returning_clause) var _la int 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: { p.SetState(840) p.expr(0) } 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 } } } { p.SetState(844) p.Column_alias() } } default: 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: { p.SetState(851) p.expr(0) } 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 } } } { p.SetState(855) p.Column_alias() } } default: 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. type IDelete_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures DELETE_() antlr.TerminalNode FROM_() antlr.TerminalNode Qualified_table_name() IQualified_table_nameContext With_clause() IWith_clauseContext WHERE_() antlr.TerminalNode Expr() IExprContext Returning_clause() IReturning_clauseContext // IsDelete_stmtContext differentiates from other interfaces. IsDelete_stmtContext() } type Delete_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyDelete_stmtContext() *Delete_stmtContext { var p = new(Delete_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_delete_stmt return p } func (s *Delete_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Delete_stmtContext) DELETE_() antlr.TerminalNode { return s.GetToken(SQLiteParserDELETE_, 0) } func (s *Delete_stmtContext) FROM_() antlr.TerminalNode { return s.GetToken(SQLiteParserFROM_, 0) } func (s *Delete_stmtContext) Qualified_table_name() IQualified_table_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IQualified_table_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IQualified_table_nameContext) } func (s *Delete_stmtContext) With_clause() IWith_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IWith_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IWith_clauseContext) } func (s *Delete_stmtContext) WHERE_() antlr.TerminalNode { return s.GetToken(SQLiteParserWHERE_, 0) } func (s *Delete_stmtContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Delete_stmtContext) Returning_clause() IReturning_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IReturning_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IReturning_clauseContext) } func (s *Delete_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Delete_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Delete_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterDelete_stmt(s) } } func (s *Delete_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitDelete_stmt(s) } } func (p *SQLiteParser) Delete_stmt() (localctx IDelete_stmtContext) { localctx = NewDelete_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 60, SQLiteParserRULE_delete_stmt) var _la int p.EnterOuterAlt(localctx, 1) p.SetState(866) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWITH_ { { p.SetState(865) p.With_clause() } } { 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) p.Qualified_table_name() } 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) p.expr(0) } } p.SetState(876) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserRETURNING_ { { p.SetState(875) 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 } // IDelete_stmt_limitedContext is an interface to support dynamic dispatch. type IDelete_stmt_limitedContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures DELETE_() antlr.TerminalNode FROM_() antlr.TerminalNode Qualified_table_name() IQualified_table_nameContext With_clause() IWith_clauseContext WHERE_() antlr.TerminalNode Expr() IExprContext Limit_stmt() ILimit_stmtContext Returning_clause() IReturning_clauseContext Order_by_stmt() IOrder_by_stmtContext // IsDelete_stmt_limitedContext differentiates from other interfaces. IsDelete_stmt_limitedContext() } type Delete_stmt_limitedContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyDelete_stmt_limitedContext() *Delete_stmt_limitedContext { var p = new(Delete_stmt_limitedContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_delete_stmt_limited return p } func (s *Delete_stmt_limitedContext) GetParser() antlr.Parser { return s.parser } func (s *Delete_stmt_limitedContext) DELETE_() antlr.TerminalNode { return s.GetToken(SQLiteParserDELETE_, 0) } func (s *Delete_stmt_limitedContext) FROM_() antlr.TerminalNode { return s.GetToken(SQLiteParserFROM_, 0) } func (s *Delete_stmt_limitedContext) Qualified_table_name() IQualified_table_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IQualified_table_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IQualified_table_nameContext) } func (s *Delete_stmt_limitedContext) With_clause() IWith_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IWith_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IWith_clauseContext) } func (s *Delete_stmt_limitedContext) WHERE_() antlr.TerminalNode { return s.GetToken(SQLiteParserWHERE_, 0) } func (s *Delete_stmt_limitedContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Delete_stmt_limitedContext) Limit_stmt() ILimit_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ILimit_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ILimit_stmtContext) } func (s *Delete_stmt_limitedContext) Returning_clause() IReturning_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IReturning_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IReturning_clauseContext) } func (s *Delete_stmt_limitedContext) Order_by_stmt() IOrder_by_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOrder_by_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IOrder_by_stmtContext) } func (s *Delete_stmt_limitedContext) GetRuleContext() antlr.RuleContext { return s } func (s *Delete_stmt_limitedContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Delete_stmt_limitedContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterDelete_stmt_limited(s) } } func (s *Delete_stmt_limitedContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitDelete_stmt_limited(s) } } func (p *SQLiteParser) Delete_stmt_limited() (localctx IDelete_stmt_limitedContext) { localctx = NewDelete_stmt_limitedContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 62, SQLiteParserRULE_delete_stmt_limited) var _la int p.EnterOuterAlt(localctx, 1) p.SetState(879) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWITH_ { { p.SetState(878) p.With_clause() } } { 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) p.Qualified_table_name() } 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) p.expr(0) } } 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_ { { p.SetState(888) p.Order_by_stmt() } } { p.SetState(891) p.Limit_stmt() } } p.SetState(895) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserRETURNING_ { { p.SetState(894) 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 } // IDetach_stmtContext is an interface to support dynamic dispatch. type IDetach_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures DETACH_() antlr.TerminalNode Schema_name() ISchema_nameContext DATABASE_() antlr.TerminalNode // IsDetach_stmtContext differentiates from other interfaces. IsDetach_stmtContext() } type Detach_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyDetach_stmtContext() *Detach_stmtContext { var p = new(Detach_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_detach_stmt return p } func (s *Detach_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Detach_stmtContext) DETACH_() antlr.TerminalNode { return s.GetToken(SQLiteParserDETACH_, 0) } func (s *Detach_stmtContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Detach_stmtContext) DATABASE_() antlr.TerminalNode { return s.GetToken(SQLiteParserDATABASE_, 0) } func (s *Detach_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Detach_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Detach_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterDetach_stmt(s) } } func (s *Detach_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitDetach_stmt(s) } } func (p *SQLiteParser) Detach_stmt() (localctx IDetach_stmtContext) { localctx = NewDetach_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 64, SQLiteParserRULE_detach_stmt) 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.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. type IDrop_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // GetObject returns the object token. GetObject() antlr.Token // SetObject sets the object token. SetObject(antlr.Token) // Getter signatures DROP_() antlr.TerminalNode Any_name() IAny_nameContext INDEX_() antlr.TerminalNode TABLE_() antlr.TerminalNode TRIGGER_() antlr.TerminalNode VIEW_() antlr.TerminalNode IF_() antlr.TerminalNode EXISTS_() antlr.TerminalNode Schema_name() ISchema_nameContext DOT() antlr.TerminalNode // IsDrop_stmtContext differentiates from other interfaces. IsDrop_stmtContext() } type Drop_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser object antlr.Token } func NewEmptyDrop_stmtContext() *Drop_stmtContext { var p = new(Drop_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_drop_stmt return p } func (s *Drop_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Drop_stmtContext) GetObject() antlr.Token { return s.object } func (s *Drop_stmtContext) SetObject(v antlr.Token) { s.object = v } func (s *Drop_stmtContext) DROP_() antlr.TerminalNode { return s.GetToken(SQLiteParserDROP_, 0) } func (s *Drop_stmtContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Drop_stmtContext) INDEX_() antlr.TerminalNode { return s.GetToken(SQLiteParserINDEX_, 0) } func (s *Drop_stmtContext) TABLE_() antlr.TerminalNode { return s.GetToken(SQLiteParserTABLE_, 0) } func (s *Drop_stmtContext) TRIGGER_() antlr.TerminalNode { return s.GetToken(SQLiteParserTRIGGER_, 0) } func (s *Drop_stmtContext) VIEW_() antlr.TerminalNode { return s.GetToken(SQLiteParserVIEW_, 0) } func (s *Drop_stmtContext) IF_() antlr.TerminalNode { return s.GetToken(SQLiteParserIF_, 0) } func (s *Drop_stmtContext) EXISTS_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXISTS_, 0) } func (s *Drop_stmtContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Drop_stmtContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Drop_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Drop_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Drop_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterDrop_stmt(s) } } func (s *Drop_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitDrop_stmt(s) } } func (p *SQLiteParser) Drop_stmt() (localctx IDrop_stmtContext) { localctx = NewDrop_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 66, SQLiteParserRULE_drop_stmt) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(903) p.Match(SQLiteParserDROP_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(904) var _lt = p.GetTokenStream().LT(1) localctx.(*Drop_stmtContext).object = _lt _la = p.GetTokenStream().LA(1) if !((int64((_la-86)) & ^0x3f) == 0 && ((int64(1)<<(_la-86))&4648277765399773185) != 0) { var _ri = p.GetErrorHandler().RecoverInline(p) localctx.(*Drop_stmtContext).object = _ri } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } p.SetState(907) p.GetErrorHandler().Sync(p) 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.BaseParser, p.GetTokenStream(), 115, p.GetParserRuleContext()) == 1 { { p.SetState(909) p.Schema_name() } { 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. type IExprContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsExprContext differentiates from other interfaces. IsExprContext() } type ExprContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyExprContext() *ExprContext { var p = new(ExprContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_expr return p } func (s *ExprContext) GetParser() antlr.Parser { return s.parser } func (s *ExprContext) CopyAll(ctx *ExprContext) { s.CopyFrom(&ctx.BaseParserRuleContext) } func (s *ExprContext) GetRuleContext() antlr.RuleContext { return s } func (s *ExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } type Expr_caseContext struct { ExprContext } func NewExpr_caseContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_caseContext { var p = new(Expr_caseContext) InitEmptyExprContext(&p.ExprContext) p.parser = parser p.CopyAll(ctx.(*ExprContext)) return p } func (s *Expr_caseContext) GetRuleContext() antlr.RuleContext { return s } func (s *Expr_caseContext) CASE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCASE_, 0) } func (s *Expr_caseContext) END_() antlr.TerminalNode { return s.GetToken(SQLiteParserEND_, 0) } func (s *Expr_caseContext) 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_caseContext) 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_caseContext) AllWHEN_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserWHEN_) } func (s *Expr_caseContext) WHEN_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserWHEN_, i) } func (s *Expr_caseContext) AllTHEN_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserTHEN_) } func (s *Expr_caseContext) THEN_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserTHEN_, i) } func (s *Expr_caseContext) ELSE_() antlr.TerminalNode { return s.GetToken(SQLiteParserELSE_, 0) } func (s *Expr_caseContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterExpr_case(s) } } func (s *Expr_caseContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitExpr_case(s) } } type Expr_raiseContext struct { ExprContext } func NewExpr_raiseContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_raiseContext { var p = new(Expr_raiseContext) InitEmptyExprContext(&p.ExprContext) p.parser = parser p.CopyAll(ctx.(*ExprContext)) return p } func (s *Expr_raiseContext) GetRuleContext() antlr.RuleContext { return s } func (s *Expr_raiseContext) Raise_function() IRaise_functionContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IRaise_functionContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IRaise_functionContext) } func (s *Expr_raiseContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterExpr_raise(s) } } func (s *Expr_raiseContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitExpr_raise(s) } } type Expr_functionContext struct { ExprContext } func NewExpr_functionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_functionContext { var p = new(Expr_functionContext) InitEmptyExprContext(&p.ExprContext) p.parser = parser p.CopyAll(ctx.(*ExprContext)) return p } func (s *Expr_functionContext) GetRuleContext() antlr.RuleContext { return s } func (s *Expr_functionContext) Qualified_function_name() IQualified_function_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IQualified_function_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IQualified_function_nameContext) } func (s *Expr_functionContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Expr_functionContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Expr_functionContext) STAR() antlr.TerminalNode { return s.GetToken(SQLiteParserSTAR, 0) } func (s *Expr_functionContext) Filter_clause() IFilter_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IFilter_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IFilter_clauseContext) } func (s *Expr_functionContext) Over_clause() IOver_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOver_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IOver_clauseContext) } func (s *Expr_functionContext) 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_functionContext) 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_functionContext) DISTINCT_() antlr.TerminalNode { return s.GetToken(SQLiteParserDISTINCT_, 0) } func (s *Expr_functionContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Expr_functionContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Expr_functionContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterExpr_function(s) } } func (s *Expr_functionContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitExpr_function(s) } } type Expr_comparisonContext struct { ExprContext } func NewExpr_comparisonContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_comparisonContext { var p = new(Expr_comparisonContext) InitEmptyExprContext(&p.ExprContext) p.parser = parser p.CopyAll(ctx.(*ExprContext)) return p } func (s *Expr_comparisonContext) GetRuleContext() antlr.RuleContext { return s } func (s *Expr_comparisonContext) 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_comparisonContext) 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_comparisonContext) LT2() antlr.TerminalNode { return s.GetToken(SQLiteParserLT2, 0) } func (s *Expr_comparisonContext) GT2() antlr.TerminalNode { return s.GetToken(SQLiteParserGT2, 0) } func (s *Expr_comparisonContext) AMP() antlr.TerminalNode { return s.GetToken(SQLiteParserAMP, 0) } func (s *Expr_comparisonContext) PIPE() antlr.TerminalNode { return s.GetToken(SQLiteParserPIPE, 0) } func (s *Expr_comparisonContext) LT() antlr.TerminalNode { return s.GetToken(SQLiteParserLT, 0) } func (s *Expr_comparisonContext) LT_EQ() antlr.TerminalNode { return s.GetToken(SQLiteParserLT_EQ, 0) } func (s *Expr_comparisonContext) GT() antlr.TerminalNode { return s.GetToken(SQLiteParserGT, 0) } func (s *Expr_comparisonContext) GT_EQ() antlr.TerminalNode { return s.GetToken(SQLiteParserGT_EQ, 0) } func (s *Expr_comparisonContext) ASSIGN() antlr.TerminalNode { return s.GetToken(SQLiteParserASSIGN, 0) } func (s *Expr_comparisonContext) EQ() antlr.TerminalNode { return s.GetToken(SQLiteParserEQ, 0) } func (s *Expr_comparisonContext) NOT_EQ1() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_EQ1, 0) } func (s *Expr_comparisonContext) NOT_EQ2() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_EQ2, 0) } func (s *Expr_comparisonContext) IS_() antlr.TerminalNode { return s.GetToken(SQLiteParserIS_, 0) } func (s *Expr_comparisonContext) NOT_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_, 0) } func (s *Expr_comparisonContext) IN_() antlr.TerminalNode { return s.GetToken(SQLiteParserIN_, 0) } func (s *Expr_comparisonContext) LIKE_() antlr.TerminalNode { return s.GetToken(SQLiteParserLIKE_, 0) } func (s *Expr_comparisonContext) GLOB_() antlr.TerminalNode { return s.GetToken(SQLiteParserGLOB_, 0) } func (s *Expr_comparisonContext) MATCH_() antlr.TerminalNode { return s.GetToken(SQLiteParserMATCH_, 0) } func (s *Expr_comparisonContext) REGEXP_() antlr.TerminalNode { return s.GetToken(SQLiteParserREGEXP_, 0) } func (s *Expr_comparisonContext) ESCAPE_() antlr.TerminalNode { return s.GetToken(SQLiteParserESCAPE_, 0) } func (s *Expr_comparisonContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterExpr_comparison(s) } } func (s *Expr_comparisonContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitExpr_comparison(s) } } type Expr_boolContext struct { ExprContext } func NewExpr_boolContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_boolContext { var p = new(Expr_boolContext) InitEmptyExprContext(&p.ExprContext) p.parser = parser p.CopyAll(ctx.(*ExprContext)) return p } func (s *Expr_boolContext) GetRuleContext() antlr.RuleContext { return s } func (s *Expr_boolContext) 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_boolContext) 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_boolContext) AND_() antlr.TerminalNode { return s.GetToken(SQLiteParserAND_, 0) } func (s *Expr_boolContext) OR_() antlr.TerminalNode { return s.GetToken(SQLiteParserOR_, 0) } func (s *Expr_boolContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterExpr_bool(s) } } func (s *Expr_boolContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitExpr_bool(s) } } type Expr_binaryContext struct { ExprContext } func NewExpr_binaryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_binaryContext { var p = new(Expr_binaryContext) InitEmptyExprContext(&p.ExprContext) p.parser = parser p.CopyAll(ctx.(*ExprContext)) return p } func (s *Expr_binaryContext) GetRuleContext() antlr.RuleContext { return s } 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.(IExprContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IExprContext) } func (s *Expr_binaryContext) PIPE2() antlr.TerminalNode { return s.GetToken(SQLiteParserPIPE2, 0) } func (s *Expr_binaryContext) PTR() antlr.TerminalNode { return s.GetToken(SQLiteParserPTR, 0) } func (s *Expr_binaryContext) PTR2() antlr.TerminalNode { return s.GetToken(SQLiteParserPTR2, 0) } func (s *Expr_binaryContext) STAR() antlr.TerminalNode { return s.GetToken(SQLiteParserSTAR, 0) } 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 { return s } func (s *Expr_castContext) CAST_() antlr.TerminalNode { return s.GetToken(SQLiteParserCAST_, 0) } func (s *Expr_castContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Expr_castContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Expr_castContext) AS_() antlr.TerminalNode { return s.GetToken(SQLiteParserAS_, 0) } func (s *Expr_castContext) Type_name() IType_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IType_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IType_nameContext) } func (s *Expr_castContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Expr_castContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterExpr_cast(s) } } func (s *Expr_castContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitExpr_cast(s) } } type Expr_in_selectContext struct { ExprContext } func NewExpr_in_selectContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_in_selectContext { var p = new(Expr_in_selectContext) InitEmptyExprContext(&p.ExprContext) p.parser = parser p.CopyAll(ctx.(*ExprContext)) return p } func (s *Expr_in_selectContext) GetRuleContext() antlr.RuleContext { return s } func (s *Expr_in_selectContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Expr_in_selectContext) Select_stmt() ISelect_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISelect_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISelect_stmtContext) } func (s *Expr_in_selectContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Expr_in_selectContext) EXISTS_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXISTS_, 0) } func (s *Expr_in_selectContext) NOT_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_, 0) } func (s *Expr_in_selectContext) 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_in_selectContext) 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_in_selectContext) IN_() antlr.TerminalNode { return s.GetToken(SQLiteParserIN_, 0) } func (s *Expr_in_selectContext) Table_name() ITable_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_nameContext) } func (s *Expr_in_selectContext) Table_function_name() ITable_function_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_function_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_function_nameContext) } func (s *Expr_in_selectContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Expr_in_selectContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Expr_in_selectContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Expr_in_selectContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Expr_in_selectContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterExpr_in_select(s) } } func (s *Expr_in_selectContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitExpr_in_select(s) } } type Expr_listContext struct { ExprContext } func NewExpr_listContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_listContext { var p = new(Expr_listContext) InitEmptyExprContext(&p.ExprContext) p.parser = parser p.CopyAll(ctx.(*ExprContext)) return p } func (s *Expr_listContext) GetRuleContext() antlr.RuleContext { return s } func (s *Expr_listContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Expr_listContext) 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_listContext) 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_listContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Expr_listContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Expr_listContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Expr_listContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterExpr_list(s) } } func (s *Expr_listContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitExpr_list(s) } } type Expr_betweenContext struct { ExprContext } func NewExpr_betweenContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_betweenContext { var p = new(Expr_betweenContext) InitEmptyExprContext(&p.ExprContext) p.parser = parser p.CopyAll(ctx.(*ExprContext)) return p } func (s *Expr_betweenContext) GetRuleContext() antlr.RuleContext { return s } func (s *Expr_betweenContext) 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_betweenContext) 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_betweenContext) BETWEEN_() antlr.TerminalNode { return s.GetToken(SQLiteParserBETWEEN_, 0) } func (s *Expr_betweenContext) AND_() antlr.TerminalNode { return s.GetToken(SQLiteParserAND_, 0) } func (s *Expr_betweenContext) NOT_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_, 0) } func (s *Expr_betweenContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterExpr_between(s) } } func (s *Expr_betweenContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitExpr_between(s) } } type Expr_collateContext struct { ExprContext } func NewExpr_collateContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_collateContext { var p = new(Expr_collateContext) InitEmptyExprContext(&p.ExprContext) p.parser = parser p.CopyAll(ctx.(*ExprContext)) return p } func (s *Expr_collateContext) GetRuleContext() antlr.RuleContext { return s } func (s *Expr_collateContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Expr_collateContext) COLLATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCOLLATE_, 0) } func (s *Expr_collateContext) Collation_name() ICollation_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICollation_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ICollation_nameContext) } func (s *Expr_collateContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterExpr_collate(s) } } func (s *Expr_collateContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitExpr_collate(s) } } type Expr_qualified_column_nameContext struct { ExprContext } func NewExpr_qualified_column_nameContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_qualified_column_nameContext { var p = new(Expr_qualified_column_nameContext) InitEmptyExprContext(&p.ExprContext) p.parser = parser p.CopyAll(ctx.(*ExprContext)) return p } func (s *Expr_qualified_column_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Expr_qualified_column_nameContext) Column_name() IColumn_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Expr_qualified_column_nameContext) Table_name() ITable_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_nameContext) } func (s *Expr_qualified_column_nameContext) AllDOT() []antlr.TerminalNode { return s.GetTokens(SQLiteParserDOT) } func (s *Expr_qualified_column_nameContext) DOT(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, i) } func (s *Expr_qualified_column_nameContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Expr_qualified_column_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterExpr_qualified_column_name(s) } } func (s *Expr_qualified_column_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitExpr_qualified_column_name(s) } } type Expr_unaryContext struct { ExprContext } func NewExpr_unaryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_unaryContext { var p = new(Expr_unaryContext) InitEmptyExprContext(&p.ExprContext) p.parser = parser p.CopyAll(ctx.(*ExprContext)) return p } func (s *Expr_unaryContext) GetRuleContext() antlr.RuleContext { return s } func (s *Expr_unaryContext) Unary_operator() IUnary_operatorContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IUnary_operatorContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IUnary_operatorContext) } func (s *Expr_unaryContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Expr_unaryContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterExpr_unary(s) } } func (s *Expr_unaryContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitExpr_unary(s) } } type Expr_null_compContext struct { ExprContext } func NewExpr_null_compContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_null_compContext { var p = new(Expr_null_compContext) InitEmptyExprContext(&p.ExprContext) p.parser = parser p.CopyAll(ctx.(*ExprContext)) return p } func (s *Expr_null_compContext) GetRuleContext() antlr.RuleContext { return s } func (s *Expr_null_compContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Expr_null_compContext) ISNULL_() antlr.TerminalNode { return s.GetToken(SQLiteParserISNULL_, 0) } func (s *Expr_null_compContext) NOTNULL_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOTNULL_, 0) } func (s *Expr_null_compContext) NOT_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_, 0) } func (s *Expr_null_compContext) NULL_() antlr.TerminalNode { return s.GetToken(SQLiteParserNULL_, 0) } func (s *Expr_null_compContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterExpr_null_comp(s) } } func (s *Expr_null_compContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitExpr_null_comp(s) } } type Expr_bindContext struct { ExprContext } func NewExpr_bindContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_bindContext { var p = new(Expr_bindContext) InitEmptyExprContext(&p.ExprContext) p.parser = parser p.CopyAll(ctx.(*ExprContext)) return p } func (s *Expr_bindContext) GetRuleContext() antlr.RuleContext { return s } func (s *Expr_bindContext) NUMBERED_BIND_PARAMETER() antlr.TerminalNode { return s.GetToken(SQLiteParserNUMBERED_BIND_PARAMETER, 0) } func (s *Expr_bindContext) NAMED_BIND_PARAMETER() antlr.TerminalNode { return s.GetToken(SQLiteParserNAMED_BIND_PARAMETER, 0) } func (s *Expr_bindContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterExpr_bind(s) } } func (s *Expr_bindContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitExpr_bind(s) } } func (p *SQLiteParser) Expr() (localctx IExprContext) { return p.expr(0) } func (p *SQLiteParser) expr(_p int) (localctx IExprContext) { var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() _parentState := p.GetState() localctx = NewExprContext(p, p.GetParserRuleContext(), _parentState) var _prevctx IExprContext = localctx var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. _startState := 68 p.EnterRecursionRule(localctx, 68, SQLiteParserRULE_expr, _p) var _la int var _alt int p.EnterOuterAlt(localctx, 1) p.SetState(1005) p.GetErrorHandler().Sync(p) 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) _prevctx = localctx { p.SetState(917) p.Literal_value() } case 2: localctx = NewExpr_bindContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx { p.SetState(918) p.Match(SQLiteParserNUMBERED_BIND_PARAMETER) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 3: localctx = NewExpr_bindContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx { p.SetState(919) p.Match(SQLiteParserNAMED_BIND_PARAMETER) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 4: localctx = NewExpr_qualified_column_nameContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx p.SetState(928) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 117, p.GetParserRuleContext()) == 1 { p.SetState(923) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 116, p.GetParserRuleContext()) == 1 { { p.SetState(920) p.Schema_name() } { 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) p.Table_name() } { 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) p.Column_name() } case 5: localctx = NewExpr_unaryContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx { p.SetState(931) p.Unary_operator() } { p.SetState(932) p.expr(21) } case 6: localctx = NewExpr_functionContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx { p.SetState(934) p.Qualified_function_name() } { 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.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) p.expr(0) } 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) p.expr(0) } p.SetState(946) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } case SQLiteParserSTAR: { p.SetState(947) p.Match(SQLiteParserSTAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserCLOSE_PAR: default: } { 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.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.BaseParser, p.GetTokenStream(), 122, p.GetParserRuleContext()) == 1 { { p.SetState(954) p.Over_clause() } } else if p.HasError() { // JIM goto errorExit } case 7: localctx = NewExpr_listContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx { p.SetState(957) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(958) p.expr(0) } 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) p.expr(0) } 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: localctx = NewExpr_castContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx { 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) p.expr(0) } { p.SetState(971) p.Match(SQLiteParserAS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(972) p.Type_name() } { p.SetState(973) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 9: localctx = NewExpr_in_selectContext(p, localctx) p.SetParserRuleContext(localctx) _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) p.Select_stmt() } { p.SetState(983) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 10: localctx = NewExpr_caseContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx { 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.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) p.expr(0) } { p.SetState(991) p.Match(SQLiteParserTHEN_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(992) p.expr(0) } 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) p.expr(0) } } { p.SetState(1002) p.Match(SQLiteParserEND_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 11: localctx = NewExpr_raiseContext(p, localctx) p.SetParserRuleContext(localctx) _prevctx = localctx { p.SetState(1004) p.Raise_function() } case antlr.ATNInvalidAltNumber: goto errorExit } p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) p.SetState(1126) p.GetErrorHandler().Sync(p) 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(1124) p.GetErrorHandler().Sync(p) 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(), 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(21) } case 2: localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1010) 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 !(_la == SQLiteParserPTR2 || _la == SQLiteParserPTR) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } { p.SetState(1012) p.expr(20) } case 3: localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1013) 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 !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&49280) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } { p.SetState(1015) p.expr(19) } case 4: localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1016) 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 !(_la == SQLiteParserPLUS || _la == SQLiteParserMINUS) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } { p.SetState(1018) p.expr(18) } case 5: localctx = NewExpr_comparisonContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1019) 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)&983040) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } { p.SetState(1021) p.expr(17) } case 6: localctx = NewExpr_comparisonContext(p, NewExprContext(p, _parentctx, _parentState)) 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)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 14)", "")) goto errorExit } p.SetState(1041) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 131, p.GetParserRuleContext()) { case 1: { p.SetState(1026) p.Match(SQLiteParserASSIGN) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 2: { p.SetState(1027) p.Match(SQLiteParserEQ) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 3: { p.SetState(1028) p.Match(SQLiteParserNOT_EQ1) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 4: { p.SetState(1029) p.Match(SQLiteParserNOT_EQ2) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 5: { p.SetState(1030) p.Match(SQLiteParserIS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 6: { p.SetState(1031) p.Match(SQLiteParserIS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1032) p.Match(SQLiteParserNOT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 7: p.SetState(1034) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserNOT_ { { p.SetState(1033) p.Match(SQLiteParserNOT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } { p.SetState(1036) p.Match(SQLiteParserIN_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 8: { p.SetState(1037) p.Match(SQLiteParserLIKE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 9: { p.SetState(1038) p.Match(SQLiteParserGLOB_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 10: { p.SetState(1039) p.Match(SQLiteParserMATCH_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 11: { p.SetState(1040) p.Match(SQLiteParserREGEXP_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case antlr.ATNInvalidAltNumber: goto errorExit } { p.SetState(1043) p.expr(15) } case 8: localctx = NewExpr_boolContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1044) if !(p.Precpred(p.GetParserRuleContext(), 12)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 12)", "")) goto errorExit } { p.SetState(1045) p.Match(SQLiteParserAND_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1046) p.expr(13) } case 9: localctx = NewExpr_boolContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1047) if !(p.Precpred(p.GetParserRuleContext(), 11)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 11)", "")) goto errorExit } { p.SetState(1048) p.Match(SQLiteParserOR_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1049) p.expr(12) } case 10: localctx = NewExpr_betweenContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1050) if !(p.Precpred(p.GetParserRuleContext(), 4)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", "")) goto errorExit } p.SetState(1052) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserNOT_ { { p.SetState(1051) p.Match(SQLiteParserNOT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } { p.SetState(1054) p.Match(SQLiteParserBETWEEN_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1055) p.expr(0) } { p.SetState(1056) p.Match(SQLiteParserAND_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1057) p.expr(5) } case 11: localctx = NewExpr_in_selectContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1059) if !(p.Precpred(p.GetParserRuleContext(), 13)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 13)", "")) goto errorExit } p.SetState(1061) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserNOT_ { { p.SetState(1060) p.Match(SQLiteParserNOT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } { p.SetState(1063) p.Match(SQLiteParserIN_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1102) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 140, p.GetParserRuleContext()) { case 1: { p.SetState(1064) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1074) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 135, p.GetParserRuleContext()) == 1 { { p.SetState(1065) p.Select_stmt() } } else if p.HasError() { // JIM goto errorExit } else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 135, p.GetParserRuleContext()) == 2 { { p.SetState(1066) p.expr(0) } p.SetState(1071) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1067) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1068) p.expr(0) } 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(1076) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 2: p.SetState(1080) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 136, p.GetParserRuleContext()) == 1 { { p.SetState(1077) p.Schema_name() } { p.SetState(1078) p.Match(SQLiteParserDOT) if p.HasError() { // Recognition error - abort rule goto errorExit } } } else if p.HasError() { // JIM goto errorExit } { p.SetState(1082) p.Table_name() } case 3: p.SetState(1086) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 137, p.GetParserRuleContext()) == 1 { { p.SetState(1083) p.Schema_name() } { p.SetState(1084) p.Match(SQLiteParserDOT) if p.HasError() { // Recognition error - abort rule goto errorExit } } } else if p.HasError() { // JIM goto errorExit } { p.SetState(1088) p.Table_function_name() } { p.SetState(1089) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1098) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) 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(1090) p.expr(0) } p.SetState(1095) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1091) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1092) p.expr(0) } p.SetState(1097) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } } { p.SetState(1100) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } case antlr.ATNInvalidAltNumber: goto errorExit } case 12: localctx = NewExpr_collateContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1104) if !(p.Precpred(p.GetParserRuleContext(), 7)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 7)", "")) goto errorExit } { p.SetState(1105) p.Match(SQLiteParserCOLLATE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1106) p.Collation_name() } case 13: localctx = NewExpr_comparisonContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1107) if !(p.Precpred(p.GetParserRuleContext(), 6)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 6)", "")) goto errorExit } p.SetState(1109) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserNOT_ { { p.SetState(1108) p.Match(SQLiteParserNOT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } { p.SetState(1111) _la = p.GetTokenStream().LA(1) if !((int64((_la-79)) & ^0x3f) == 0 && ((int64(1)<<(_la-79))&2199028498433) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } { p.SetState(1112) p.expr(0) } p.SetState(1115) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 142, p.GetParserRuleContext()) == 1 { { p.SetState(1113) p.Match(SQLiteParserESCAPE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1114) p.expr(0) } } else if p.HasError() { // JIM goto errorExit } case 14: localctx = NewExpr_null_compContext(p, NewExprContext(p, _parentctx, _parentState)) p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr) p.SetState(1117) if !(p.Precpred(p.GetParserRuleContext(), 5)) { p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", "")) goto errorExit } p.SetState(1122) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetTokenStream().LA(1) { case SQLiteParserISNULL_: { p.SetState(1118) p.Match(SQLiteParserISNULL_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserNOTNULL_: { p.SetState(1119) p.Match(SQLiteParserNOTNULL_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserNOT_: { p.SetState(1120) p.Match(SQLiteParserNOT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1121) p.Match(SQLiteParserNULL_) if p.HasError() { // Recognition error - abort rule goto errorExit } } default: p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) goto errorExit } case antlr.ATNInvalidAltNumber: goto errorExit } } p.SetState(1128) p.GetErrorHandler().Sync(p) 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. type IRaise_functionContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures RAISE_() antlr.TerminalNode OPEN_PAR() antlr.TerminalNode CLOSE_PAR() antlr.TerminalNode IGNORE_() antlr.TerminalNode COMMA() antlr.TerminalNode Error_message() IError_messageContext ROLLBACK_() antlr.TerminalNode ABORT_() antlr.TerminalNode FAIL_() antlr.TerminalNode // IsRaise_functionContext differentiates from other interfaces. IsRaise_functionContext() } type Raise_functionContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyRaise_functionContext() *Raise_functionContext { var p = new(Raise_functionContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_raise_function return p } func (s *Raise_functionContext) GetParser() antlr.Parser { return s.parser } func (s *Raise_functionContext) RAISE_() antlr.TerminalNode { return s.GetToken(SQLiteParserRAISE_, 0) } func (s *Raise_functionContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Raise_functionContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Raise_functionContext) IGNORE_() antlr.TerminalNode { return s.GetToken(SQLiteParserIGNORE_, 0) } func (s *Raise_functionContext) COMMA() antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, 0) } func (s *Raise_functionContext) Error_message() IError_messageContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IError_messageContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IError_messageContext) } func (s *Raise_functionContext) ROLLBACK_() antlr.TerminalNode { return s.GetToken(SQLiteParserROLLBACK_, 0) } func (s *Raise_functionContext) ABORT_() antlr.TerminalNode { return s.GetToken(SQLiteParserABORT_, 0) } func (s *Raise_functionContext) FAIL_() antlr.TerminalNode { return s.GetToken(SQLiteParserFAIL_, 0) } func (s *Raise_functionContext) GetRuleContext() antlr.RuleContext { return s } func (s *Raise_functionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Raise_functionContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterRaise_function(s) } } func (s *Raise_functionContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitRaise_function(s) } } func (p *SQLiteParser) Raise_function() (localctx IRaise_functionContext) { localctx = NewRaise_functionContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 70, SQLiteParserRULE_raise_function) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1129) p.Match(SQLiteParserRAISE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1130) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1135) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetTokenStream().LA(1) { case SQLiteParserIGNORE_: { p.SetState(1131) p.Match(SQLiteParserIGNORE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserABORT_, SQLiteParserFAIL_, SQLiteParserROLLBACK_: { p.SetState(1132) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserABORT_ || _la == SQLiteParserFAIL_ || _la == SQLiteParserROLLBACK_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } { p.SetState(1133) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1134) p.Error_message() } default: p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) goto errorExit } { 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. type ILiteral_valueContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures NUMERIC_LITERAL() antlr.TerminalNode STRING_LITERAL() antlr.TerminalNode BLOB_LITERAL() antlr.TerminalNode NULL_() antlr.TerminalNode TRUE_() antlr.TerminalNode FALSE_() antlr.TerminalNode CURRENT_TIME_() antlr.TerminalNode CURRENT_DATE_() antlr.TerminalNode CURRENT_TIMESTAMP_() antlr.TerminalNode // IsLiteral_valueContext differentiates from other interfaces. IsLiteral_valueContext() } type Literal_valueContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyLiteral_valueContext() *Literal_valueContext { var p = new(Literal_valueContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_literal_value return p } func (s *Literal_valueContext) GetParser() antlr.Parser { return s.parser } func (s *Literal_valueContext) NUMERIC_LITERAL() antlr.TerminalNode { return s.GetToken(SQLiteParserNUMERIC_LITERAL, 0) } func (s *Literal_valueContext) STRING_LITERAL() antlr.TerminalNode { return s.GetToken(SQLiteParserSTRING_LITERAL, 0) } func (s *Literal_valueContext) BLOB_LITERAL() antlr.TerminalNode { return s.GetToken(SQLiteParserBLOB_LITERAL, 0) } func (s *Literal_valueContext) NULL_() antlr.TerminalNode { return s.GetToken(SQLiteParserNULL_, 0) } func (s *Literal_valueContext) TRUE_() antlr.TerminalNode { return s.GetToken(SQLiteParserTRUE_, 0) } func (s *Literal_valueContext) FALSE_() antlr.TerminalNode { return s.GetToken(SQLiteParserFALSE_, 0) } func (s *Literal_valueContext) CURRENT_TIME_() antlr.TerminalNode { return s.GetToken(SQLiteParserCURRENT_TIME_, 0) } func (s *Literal_valueContext) CURRENT_DATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCURRENT_DATE_, 0) } func (s *Literal_valueContext) CURRENT_TIMESTAMP_() antlr.TerminalNode { return s.GetToken(SQLiteParserCURRENT_TIMESTAMP_, 0) } func (s *Literal_valueContext) GetRuleContext() antlr.RuleContext { return s } func (s *Literal_valueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Literal_valueContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterLiteral_value(s) } } func (s *Literal_valueContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitLiteral_value(s) } } func (p *SQLiteParser) Literal_value() (localctx ILiteral_valueContext) { localctx = NewLiteral_valueContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 72, SQLiteParserRULE_literal_value) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1139) _la = p.GetTokenStream().LA(1) 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) p.Consume() } } 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. type IInsert_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures INTO_() antlr.TerminalNode Table_name() ITable_nameContext INSERT_() antlr.TerminalNode REPLACE_() antlr.TerminalNode OR_() antlr.TerminalNode With_clause() IWith_clauseContext ROLLBACK_() antlr.TerminalNode ABORT_() antlr.TerminalNode FAIL_() antlr.TerminalNode IGNORE_() antlr.TerminalNode Schema_name() ISchema_nameContext DOT() antlr.TerminalNode AS_() antlr.TerminalNode Table_alias() ITable_aliasContext AllOPEN_PAR() []antlr.TerminalNode OPEN_PAR(i int) antlr.TerminalNode AllColumn_name() []IColumn_nameContext Column_name(i int) IColumn_nameContext AllCLOSE_PAR() []antlr.TerminalNode CLOSE_PAR(i int) antlr.TerminalNode VALUES_() antlr.TerminalNode 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 // IsInsert_stmtContext differentiates from other interfaces. IsInsert_stmtContext() } type Insert_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyInsert_stmtContext() *Insert_stmtContext { var p = new(Insert_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_insert_stmt return p } func (s *Insert_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Insert_stmtContext) INTO_() antlr.TerminalNode { return s.GetToken(SQLiteParserINTO_, 0) } func (s *Insert_stmtContext) Table_name() ITable_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_nameContext) } func (s *Insert_stmtContext) INSERT_() antlr.TerminalNode { return s.GetToken(SQLiteParserINSERT_, 0) } func (s *Insert_stmtContext) REPLACE_() antlr.TerminalNode { return s.GetToken(SQLiteParserREPLACE_, 0) } func (s *Insert_stmtContext) OR_() antlr.TerminalNode { return s.GetToken(SQLiteParserOR_, 0) } func (s *Insert_stmtContext) With_clause() IWith_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IWith_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IWith_clauseContext) } func (s *Insert_stmtContext) ROLLBACK_() antlr.TerminalNode { return s.GetToken(SQLiteParserROLLBACK_, 0) } func (s *Insert_stmtContext) ABORT_() antlr.TerminalNode { return s.GetToken(SQLiteParserABORT_, 0) } func (s *Insert_stmtContext) FAIL_() antlr.TerminalNode { return s.GetToken(SQLiteParserFAIL_, 0) } func (s *Insert_stmtContext) IGNORE_() antlr.TerminalNode { return s.GetToken(SQLiteParserIGNORE_, 0) } func (s *Insert_stmtContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Insert_stmtContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Insert_stmtContext) AS_() antlr.TerminalNode { return s.GetToken(SQLiteParserAS_, 0) } func (s *Insert_stmtContext) Table_alias() ITable_aliasContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_aliasContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_aliasContext) } func (s *Insert_stmtContext) AllOPEN_PAR() []antlr.TerminalNode { return s.GetTokens(SQLiteParserOPEN_PAR) } func (s *Insert_stmtContext) OPEN_PAR(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, i) } func (s *Insert_stmtContext) AllColumn_name() []IColumn_nameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_nameContext); ok { len++ } } tst := make([]IColumn_nameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_nameContext); ok { tst[i] = t.(IColumn_nameContext) i++ } } return tst } func (s *Insert_stmtContext) Column_name(i int) IColumn_nameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Insert_stmtContext) AllCLOSE_PAR() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCLOSE_PAR) } func (s *Insert_stmtContext) CLOSE_PAR(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, i) } func (s *Insert_stmtContext) VALUES_() antlr.TerminalNode { return s.GetToken(SQLiteParserVALUES_, 0) } func (s *Insert_stmtContext) 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 *Insert_stmtContext) 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 *Insert_stmtContext) Select_stmt() ISelect_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISelect_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } 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() { if _, ok := ctx.(IUpsert_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IUpsert_clauseContext) } func (s *Insert_stmtContext) Returning_clause() IReturning_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IReturning_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IReturning_clauseContext) } func (s *Insert_stmtContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Insert_stmtContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Insert_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Insert_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Insert_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterInsert_stmt(s) } } func (s *Insert_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitInsert_stmt(s) } } func (p *SQLiteParser) Insert_stmt() (localctx IInsert_stmtContext) { localctx = NewInsert_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 74, SQLiteParserRULE_insert_stmt) var _la int p.EnterOuterAlt(localctx, 1) p.SetState(1142) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWITH_ { { p.SetState(1141) p.With_clause() } } p.SetState(1149) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } 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 } } case 2: { p.SetState(1145) p.Match(SQLiteParserREPLACE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 3: { p.SetState(1146) p.Match(SQLiteParserINSERT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1147) p.Match(SQLiteParserOR_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1148) _la = p.GetTokenStream().LA(1) 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(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.Table_name() } p.SetState(1160) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) 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(1168) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1164) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1165) p.Column_name() } 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 } } } 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(1176) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1177) p.expr(0) } p.SetState(1182) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1178) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1179) p.expr(0) } 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(1186) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1187) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1188) p.expr(0) } p.SetState(1193) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _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(1190) p.expr(0) } p.SetState(1195) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } { p.SetState(1196) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1202) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } case 2: { p.SetState(1203) p.Select_stmt() } case 3: { p.SetState(1204) p.Match(SQLiteParserDEFAULT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { 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() } } 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. type IUpsert_clauseContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures ON_() antlr.TerminalNode CONFLICT_() antlr.TerminalNode DO_() antlr.TerminalNode NOTHING_() antlr.TerminalNode UPDATE_() antlr.TerminalNode SET_() antlr.TerminalNode OPEN_PAR() antlr.TerminalNode AllIndexed_column() []IIndexed_columnContext Indexed_column(i int) IIndexed_columnContext CLOSE_PAR() antlr.TerminalNode AllASSIGN() []antlr.TerminalNode ASSIGN(i int) antlr.TerminalNode AllExpr() []IExprContext Expr(i int) IExprContext AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode AllWHERE_() []antlr.TerminalNode WHERE_(i int) antlr.TerminalNode AllColumn_name() []IColumn_nameContext Column_name(i int) IColumn_nameContext AllColumn_name_list() []IColumn_name_listContext Column_name_list(i int) IColumn_name_listContext // IsUpsert_clauseContext differentiates from other interfaces. IsUpsert_clauseContext() } type Upsert_clauseContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyUpsert_clauseContext() *Upsert_clauseContext { var p = new(Upsert_clauseContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_upsert_clause return p } func (s *Upsert_clauseContext) GetParser() antlr.Parser { return s.parser } func (s *Upsert_clauseContext) ON_() antlr.TerminalNode { return s.GetToken(SQLiteParserON_, 0) } func (s *Upsert_clauseContext) CONFLICT_() antlr.TerminalNode { return s.GetToken(SQLiteParserCONFLICT_, 0) } func (s *Upsert_clauseContext) DO_() antlr.TerminalNode { return s.GetToken(SQLiteParserDO_, 0) } func (s *Upsert_clauseContext) NOTHING_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOTHING_, 0) } func (s *Upsert_clauseContext) UPDATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserUPDATE_, 0) } func (s *Upsert_clauseContext) SET_() antlr.TerminalNode { return s.GetToken(SQLiteParserSET_, 0) } func (s *Upsert_clauseContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Upsert_clauseContext) AllIndexed_column() []IIndexed_columnContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IIndexed_columnContext); ok { len++ } } tst := make([]IIndexed_columnContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IIndexed_columnContext); ok { tst[i] = t.(IIndexed_columnContext) i++ } } return tst } func (s *Upsert_clauseContext) Indexed_column(i int) IIndexed_columnContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IIndexed_columnContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IIndexed_columnContext) } func (s *Upsert_clauseContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Upsert_clauseContext) AllASSIGN() []antlr.TerminalNode { return s.GetTokens(SQLiteParserASSIGN) } func (s *Upsert_clauseContext) ASSIGN(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserASSIGN, i) } func (s *Upsert_clauseContext) 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 *Upsert_clauseContext) 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 *Upsert_clauseContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Upsert_clauseContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Upsert_clauseContext) AllWHERE_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserWHERE_) } func (s *Upsert_clauseContext) WHERE_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserWHERE_, i) } func (s *Upsert_clauseContext) AllColumn_name() []IColumn_nameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_nameContext); ok { len++ } } tst := make([]IColumn_nameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_nameContext); ok { tst[i] = t.(IColumn_nameContext) i++ } } return tst } func (s *Upsert_clauseContext) Column_name(i int) IColumn_nameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Upsert_clauseContext) AllColumn_name_list() []IColumn_name_listContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_name_listContext); ok { len++ } } tst := make([]IColumn_name_listContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_name_listContext); ok { tst[i] = t.(IColumn_name_listContext) i++ } } return tst } func (s *Upsert_clauseContext) Column_name_list(i int) IColumn_name_listContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_name_listContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_name_listContext) } func (s *Upsert_clauseContext) GetRuleContext() antlr.RuleContext { return s } func (s *Upsert_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Upsert_clauseContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterUpsert_clause(s) } } func (s *Upsert_clauseContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitUpsert_clause(s) } } func (p *SQLiteParser) Upsert_clause() (localctx IUpsert_clauseContext) { localctx = NewUpsert_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 76, SQLiteParserRULE_upsert_clause) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1214) p.Match(SQLiteParserON_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1215) p.Match(SQLiteParserCONFLICT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1230) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserOPEN_PAR { { p.SetState(1216) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1217) p.Indexed_column() } p.SetState(1222) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1218) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1219) p.Indexed_column() } p.SetState(1224) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } { p.SetState(1225) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1228) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWHERE_ { { p.SetState(1226) p.Match(SQLiteParserWHERE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1227) p.expr(0) } } } { p.SetState(1232) p.Match(SQLiteParserDO_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1259) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetTokenStream().LA(1) { case SQLiteParserNOTHING_: { p.SetState(1233) p.Match(SQLiteParserNOTHING_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserUPDATE_: { p.SetState(1234) p.Match(SQLiteParserUPDATE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1235) p.Match(SQLiteParserSET_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1238) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 162, p.GetParserRuleContext()) { case 1: { p.SetState(1236) p.Column_name() } case 2: { p.SetState(1237) p.Column_name_list() } case antlr.ATNInvalidAltNumber: goto errorExit } { p.SetState(1240) p.Match(SQLiteParserASSIGN) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1241) p.expr(0) } p.SetState(1252) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1242) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1245) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 163, p.GetParserRuleContext()) { case 1: { p.SetState(1243) p.Column_name() } case 2: { p.SetState(1244) p.Column_name_list() } case antlr.ATNInvalidAltNumber: goto errorExit } { p.SetState(1247) p.Match(SQLiteParserASSIGN) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1248) p.expr(0) } p.SetState(1254) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } p.SetState(1257) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWHERE_ { { p.SetState(1255) p.Match(SQLiteParserWHERE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1256) p.expr(0) } } default: 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. type IPragma_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures PRAGMA_() antlr.TerminalNode Pragma_name() IPragma_nameContext Schema_name() ISchema_nameContext DOT() antlr.TerminalNode ASSIGN() antlr.TerminalNode Pragma_value() IPragma_valueContext OPEN_PAR() antlr.TerminalNode CLOSE_PAR() antlr.TerminalNode // IsPragma_stmtContext differentiates from other interfaces. IsPragma_stmtContext() } type Pragma_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyPragma_stmtContext() *Pragma_stmtContext { var p = new(Pragma_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_pragma_stmt return p } func (s *Pragma_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Pragma_stmtContext) PRAGMA_() antlr.TerminalNode { return s.GetToken(SQLiteParserPRAGMA_, 0) } func (s *Pragma_stmtContext) Pragma_name() IPragma_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IPragma_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IPragma_nameContext) } func (s *Pragma_stmtContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Pragma_stmtContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Pragma_stmtContext) ASSIGN() antlr.TerminalNode { return s.GetToken(SQLiteParserASSIGN, 0) } func (s *Pragma_stmtContext) Pragma_value() IPragma_valueContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IPragma_valueContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IPragma_valueContext) } func (s *Pragma_stmtContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Pragma_stmtContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Pragma_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Pragma_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Pragma_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterPragma_stmt(s) } } func (s *Pragma_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitPragma_stmt(s) } } func (p *SQLiteParser) Pragma_stmt() (localctx IPragma_stmtContext) { localctx = NewPragma_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 78, SQLiteParserRULE_pragma_stmt) p.EnterOuterAlt(localctx, 1) { p.SetState(1261) p.Match(SQLiteParserPRAGMA_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1265) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 167, p.GetParserRuleContext()) == 1 { { p.SetState(1262) p.Schema_name() } { p.SetState(1263) p.Match(SQLiteParserDOT) if p.HasError() { // Recognition error - abort rule goto errorExit } } } else if p.HasError() { // JIM goto errorExit } { p.SetState(1267) p.Pragma_name() } p.SetState(1274) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetTokenStream().LA(1) { case SQLiteParserASSIGN: { p.SetState(1268) p.Match(SQLiteParserASSIGN) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1269) p.Pragma_value() } case SQLiteParserOPEN_PAR: { p.SetState(1270) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1271) p.Pragma_value() } { 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_, 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. type IPragma_valueContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Signed_number() ISigned_numberContext Name() INameContext STRING_LITERAL() antlr.TerminalNode // IsPragma_valueContext differentiates from other interfaces. IsPragma_valueContext() } type Pragma_valueContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyPragma_valueContext() *Pragma_valueContext { var p = new(Pragma_valueContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_pragma_value return p } func (s *Pragma_valueContext) GetParser() antlr.Parser { return s.parser } func (s *Pragma_valueContext) Signed_number() ISigned_numberContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISigned_numberContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISigned_numberContext) } func (s *Pragma_valueContext) Name() INameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(INameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(INameContext) } func (s *Pragma_valueContext) STRING_LITERAL() antlr.TerminalNode { return s.GetToken(SQLiteParserSTRING_LITERAL, 0) } func (s *Pragma_valueContext) GetRuleContext() antlr.RuleContext { return s } func (s *Pragma_valueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Pragma_valueContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterPragma_value(s) } } func (s *Pragma_valueContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitPragma_value(s) } } func (p *SQLiteParser) Pragma_value() (localctx IPragma_valueContext) { localctx = NewPragma_valueContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 80, SQLiteParserRULE_pragma_value) p.SetState(1279) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 169, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { p.SetState(1276) p.Signed_number() } case 2: p.EnterOuterAlt(localctx, 2) { p.SetState(1277) p.Name() } case 3: p.EnterOuterAlt(localctx, 3) { 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. type IReindex_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures REINDEX_() antlr.TerminalNode Collation_name() ICollation_nameContext Table_name() ITable_nameContext Index_name() IIndex_nameContext Schema_name() ISchema_nameContext DOT() antlr.TerminalNode // IsReindex_stmtContext differentiates from other interfaces. IsReindex_stmtContext() } type Reindex_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyReindex_stmtContext() *Reindex_stmtContext { var p = new(Reindex_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_reindex_stmt return p } func (s *Reindex_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Reindex_stmtContext) REINDEX_() antlr.TerminalNode { return s.GetToken(SQLiteParserREINDEX_, 0) } func (s *Reindex_stmtContext) Collation_name() ICollation_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICollation_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ICollation_nameContext) } func (s *Reindex_stmtContext) Table_name() ITable_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_nameContext) } func (s *Reindex_stmtContext) Index_name() IIndex_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IIndex_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IIndex_nameContext) } func (s *Reindex_stmtContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Reindex_stmtContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Reindex_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Reindex_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Reindex_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterReindex_stmt(s) } } func (s *Reindex_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitReindex_stmt(s) } } func (p *SQLiteParser) Reindex_stmt() (localctx IReindex_stmtContext) { localctx = NewReindex_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 82, SQLiteParserRULE_reindex_stmt) p.EnterOuterAlt(localctx, 1) { p.SetState(1281) p.Match(SQLiteParserREINDEX_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1292) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 172, p.GetParserRuleContext()) == 1 { { p.SetState(1282) p.Collation_name() } } 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.BaseParser, p.GetTokenStream(), 170, p.GetParserRuleContext()) == 1 { { p.SetState(1283) p.Schema_name() } { p.SetState(1284) p.Match(SQLiteParserDOT) if p.HasError() { // Recognition error - abort rule goto errorExit } } } else if p.HasError() { // JIM goto errorExit } p.SetState(1290) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 171, p.GetParserRuleContext()) { case 1: { p.SetState(1288) p.Table_name() } case 2: { 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. type ISelect_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures AllSelect_core() []ISelect_coreContext Select_core(i int) ISelect_coreContext Common_table_stmt() ICommon_table_stmtContext AllCompound_operator() []ICompound_operatorContext Compound_operator(i int) ICompound_operatorContext Order_by_stmt() IOrder_by_stmtContext Limit_stmt() ILimit_stmtContext // IsSelect_stmtContext differentiates from other interfaces. IsSelect_stmtContext() } type Select_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySelect_stmtContext() *Select_stmtContext { var p = new(Select_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_select_stmt return p } func (s *Select_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Select_stmtContext) AllSelect_core() []ISelect_coreContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(ISelect_coreContext); ok { len++ } } tst := make([]ISelect_coreContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(ISelect_coreContext); ok { tst[i] = t.(ISelect_coreContext) i++ } } return tst } func (s *Select_stmtContext) Select_core(i int) ISelect_coreContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISelect_coreContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(ISelect_coreContext) } func (s *Select_stmtContext) Common_table_stmt() ICommon_table_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICommon_table_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ICommon_table_stmtContext) } func (s *Select_stmtContext) AllCompound_operator() []ICompound_operatorContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(ICompound_operatorContext); ok { len++ } } tst := make([]ICompound_operatorContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(ICompound_operatorContext); ok { tst[i] = t.(ICompound_operatorContext) i++ } } return tst } func (s *Select_stmtContext) Compound_operator(i int) ICompound_operatorContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICompound_operatorContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(ICompound_operatorContext) } func (s *Select_stmtContext) Order_by_stmt() IOrder_by_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOrder_by_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IOrder_by_stmtContext) } func (s *Select_stmtContext) Limit_stmt() ILimit_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ILimit_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ILimit_stmtContext) } func (s *Select_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Select_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterSelect_stmt(s) } } func (s *Select_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitSelect_stmt(s) } } func (p *SQLiteParser) Select_stmt() (localctx ISelect_stmtContext) { localctx = NewSelect_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 84, SQLiteParserRULE_select_stmt) var _la int var _alt int p.EnterOuterAlt(localctx, 1) p.SetState(1295) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWITH_ { { p.SetState(1294) p.Common_table_stmt() } } { p.SetState(1297) p.Select_core() } p.SetState(1303) p.GetErrorHandler().Sync(p) 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(1298) p.Compound_operator() } { p.SetState(1299) p.Select_core() } } p.SetState(1305) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 174, p.GetParserRuleContext()) if p.HasError() { goto errorExit } } p.SetState(1307) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserORDER_ { { p.SetState(1306) p.Order_by_stmt() } } p.SetState(1310) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserLIMIT_ { { 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. type IJoin_clauseContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures AllTable_or_subquery() []ITable_or_subqueryContext Table_or_subquery(i int) ITable_or_subqueryContext AllJoin_operator() []IJoin_operatorContext Join_operator(i int) IJoin_operatorContext AllJoin_constraint() []IJoin_constraintContext Join_constraint(i int) IJoin_constraintContext // IsJoin_clauseContext differentiates from other interfaces. IsJoin_clauseContext() } type Join_clauseContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyJoin_clauseContext() *Join_clauseContext { var p = new(Join_clauseContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_join_clause return p } func (s *Join_clauseContext) GetParser() antlr.Parser { return s.parser } func (s *Join_clauseContext) AllTable_or_subquery() []ITable_or_subqueryContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(ITable_or_subqueryContext); ok { len++ } } tst := make([]ITable_or_subqueryContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(ITable_or_subqueryContext); ok { tst[i] = t.(ITable_or_subqueryContext) i++ } } return tst } func (s *Join_clauseContext) Table_or_subquery(i int) ITable_or_subqueryContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_or_subqueryContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(ITable_or_subqueryContext) } func (s *Join_clauseContext) AllJoin_operator() []IJoin_operatorContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IJoin_operatorContext); ok { len++ } } tst := make([]IJoin_operatorContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IJoin_operatorContext); ok { tst[i] = t.(IJoin_operatorContext) i++ } } return tst } func (s *Join_clauseContext) Join_operator(i int) IJoin_operatorContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IJoin_operatorContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IJoin_operatorContext) } func (s *Join_clauseContext) AllJoin_constraint() []IJoin_constraintContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IJoin_constraintContext); ok { len++ } } tst := make([]IJoin_constraintContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IJoin_constraintContext); ok { tst[i] = t.(IJoin_constraintContext) i++ } } return tst } func (s *Join_clauseContext) Join_constraint(i int) IJoin_constraintContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IJoin_constraintContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IJoin_constraintContext) } func (s *Join_clauseContext) GetRuleContext() antlr.RuleContext { return s } func (s *Join_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Join_clauseContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterJoin_clause(s) } } func (s *Join_clauseContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitJoin_clause(s) } } func (p *SQLiteParser) Join_clause() (localctx IJoin_clauseContext) { localctx = NewJoin_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 86, SQLiteParserRULE_join_clause) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1312) p.Table_or_subquery() } p.SetState(1319) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA || _la == SQLiteParserCROSS_ || ((int64((_la-78)) & ^0x3f) == 0 && ((int64(1)<<(_la-78))&562949971511297) != 0) { { p.SetState(1313) p.Join_operator() } { p.SetState(1314) p.Table_or_subquery() } { p.SetState(1315) p.Join_constraint() } 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. type ISelect_coreContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures SELECT_() antlr.TerminalNode AllResult_column() []IResult_columnContext Result_column(i int) IResult_columnContext AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode FROM_() antlr.TerminalNode WHERE_() antlr.TerminalNode AllExpr() []IExprContext Expr(i int) IExprContext GROUP_() antlr.TerminalNode BY_() antlr.TerminalNode WINDOW_() antlr.TerminalNode AllWindow_name() []IWindow_nameContext Window_name(i int) IWindow_nameContext AllAS_() []antlr.TerminalNode AS_(i int) antlr.TerminalNode AllWindow_defn() []IWindow_defnContext Window_defn(i int) IWindow_defnContext DISTINCT_() antlr.TerminalNode ALL_() antlr.TerminalNode AllTable_or_subquery() []ITable_or_subqueryContext Table_or_subquery(i int) ITable_or_subqueryContext Join_clause() IJoin_clauseContext HAVING_() antlr.TerminalNode VALUES_() antlr.TerminalNode AllOPEN_PAR() []antlr.TerminalNode OPEN_PAR(i int) antlr.TerminalNode AllCLOSE_PAR() []antlr.TerminalNode CLOSE_PAR(i int) antlr.TerminalNode // IsSelect_coreContext differentiates from other interfaces. IsSelect_coreContext() } type Select_coreContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySelect_coreContext() *Select_coreContext { var p = new(Select_coreContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_select_core return p } func (s *Select_coreContext) GetParser() antlr.Parser { return s.parser } func (s *Select_coreContext) SELECT_() antlr.TerminalNode { return s.GetToken(SQLiteParserSELECT_, 0) } func (s *Select_coreContext) AllResult_column() []IResult_columnContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IResult_columnContext); ok { len++ } } tst := make([]IResult_columnContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IResult_columnContext); ok { tst[i] = t.(IResult_columnContext) i++ } } return tst } func (s *Select_coreContext) Result_column(i int) IResult_columnContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IResult_columnContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IResult_columnContext) } func (s *Select_coreContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Select_coreContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Select_coreContext) FROM_() antlr.TerminalNode { return s.GetToken(SQLiteParserFROM_, 0) } func (s *Select_coreContext) WHERE_() antlr.TerminalNode { return s.GetToken(SQLiteParserWHERE_, 0) } func (s *Select_coreContext) 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 *Select_coreContext) 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 *Select_coreContext) GROUP_() antlr.TerminalNode { return s.GetToken(SQLiteParserGROUP_, 0) } func (s *Select_coreContext) BY_() antlr.TerminalNode { return s.GetToken(SQLiteParserBY_, 0) } func (s *Select_coreContext) WINDOW_() antlr.TerminalNode { return s.GetToken(SQLiteParserWINDOW_, 0) } func (s *Select_coreContext) AllWindow_name() []IWindow_nameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IWindow_nameContext); ok { len++ } } tst := make([]IWindow_nameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IWindow_nameContext); ok { tst[i] = t.(IWindow_nameContext) i++ } } return tst } func (s *Select_coreContext) Window_name(i int) IWindow_nameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IWindow_nameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IWindow_nameContext) } func (s *Select_coreContext) AllAS_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserAS_) } func (s *Select_coreContext) AS_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserAS_, i) } func (s *Select_coreContext) AllWindow_defn() []IWindow_defnContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IWindow_defnContext); ok { len++ } } tst := make([]IWindow_defnContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IWindow_defnContext); ok { tst[i] = t.(IWindow_defnContext) i++ } } return tst } func (s *Select_coreContext) Window_defn(i int) IWindow_defnContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IWindow_defnContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IWindow_defnContext) } func (s *Select_coreContext) DISTINCT_() antlr.TerminalNode { return s.GetToken(SQLiteParserDISTINCT_, 0) } func (s *Select_coreContext) ALL_() antlr.TerminalNode { return s.GetToken(SQLiteParserALL_, 0) } func (s *Select_coreContext) AllTable_or_subquery() []ITable_or_subqueryContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(ITable_or_subqueryContext); ok { len++ } } tst := make([]ITable_or_subqueryContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(ITable_or_subqueryContext); ok { tst[i] = t.(ITable_or_subqueryContext) i++ } } return tst } func (s *Select_coreContext) Table_or_subquery(i int) ITable_or_subqueryContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_or_subqueryContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(ITable_or_subqueryContext) } func (s *Select_coreContext) Join_clause() IJoin_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IJoin_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IJoin_clauseContext) } func (s *Select_coreContext) HAVING_() antlr.TerminalNode { return s.GetToken(SQLiteParserHAVING_, 0) } func (s *Select_coreContext) VALUES_() antlr.TerminalNode { return s.GetToken(SQLiteParserVALUES_, 0) } func (s *Select_coreContext) AllOPEN_PAR() []antlr.TerminalNode { return s.GetTokens(SQLiteParserOPEN_PAR) } func (s *Select_coreContext) OPEN_PAR(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, i) } func (s *Select_coreContext) AllCLOSE_PAR() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCLOSE_PAR) } func (s *Select_coreContext) CLOSE_PAR(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, i) } func (s *Select_coreContext) GetRuleContext() antlr.RuleContext { return s } func (s *Select_coreContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Select_coreContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterSelect_core(s) } } func (s *Select_coreContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitSelect_core(s) } } func (p *SQLiteParser) Select_core() (localctx ISelect_coreContext) { localctx = NewSelect_coreContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 88, SQLiteParserRULE_select_core) var _la int 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(1322) p.Match(SQLiteParserSELECT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1324) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 178, p.GetParserRuleContext()) == 1 { { p.SetState(1323) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserALL_ || _la == SQLiteParserDISTINCT_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } } else if p.HasError() { // JIM goto errorExit } { p.SetState(1326) p.Result_column() } p.SetState(1331) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1327) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1328) p.Result_column() } p.SetState(1333) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } p.SetState(1346) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserFROM_ { { p.SetState(1334) p.Match(SQLiteParserFROM_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1344) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 181, p.GetParserRuleContext()) { case 1: { p.SetState(1335) p.Table_or_subquery() } p.SetState(1340) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1336) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1337) p.Table_or_subquery() } p.SetState(1342) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } case 2: { p.SetState(1343) p.Join_clause() } case antlr.ATNInvalidAltNumber: goto errorExit } } p.SetState(1350) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWHERE_ { { p.SetState(1348) p.Match(SQLiteParserWHERE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1349) p.expr(0) } } p.SetState(1366) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserGROUP_ { { p.SetState(1352) p.Match(SQLiteParserGROUP_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1353) p.Match(SQLiteParserBY_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1354) p.expr(0) } p.SetState(1359) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1355) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1356) p.expr(0) } p.SetState(1361) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } p.SetState(1364) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserHAVING_ { { p.SetState(1362) p.Match(SQLiteParserHAVING_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1363) p.expr(0) } } } p.SetState(1382) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWINDOW_ { { p.SetState(1368) p.Match(SQLiteParserWINDOW_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1369) p.Window_name() } { p.SetState(1370) p.Match(SQLiteParserAS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1371) p.Window_defn() } p.SetState(1379) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1372) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1373) p.Window_name() } { p.SetState(1374) p.Match(SQLiteParserAS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1375) p.Window_defn() } p.SetState(1381) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } } case SQLiteParserVALUES_: p.EnterOuterAlt(localctx, 2) { p.SetState(1384) p.Match(SQLiteParserVALUES_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1385) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1386) p.expr(0) } p.SetState(1391) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1387) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1388) p.expr(0) } p.SetState(1393) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } { p.SetState(1394) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1409) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1395) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1396) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1397) p.expr(0) } p.SetState(1402) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1398) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1399) p.expr(0) } p.SetState(1404) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } { p.SetState(1405) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1411) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } default: 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. type IFactored_select_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Select_stmt() ISelect_stmtContext // IsFactored_select_stmtContext differentiates from other interfaces. IsFactored_select_stmtContext() } type Factored_select_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFactored_select_stmtContext() *Factored_select_stmtContext { var p = new(Factored_select_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_factored_select_stmt return p } func (s *Factored_select_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Factored_select_stmtContext) Select_stmt() ISelect_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISelect_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISelect_stmtContext) } func (s *Factored_select_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Factored_select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Factored_select_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterFactored_select_stmt(s) } } func (s *Factored_select_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitFactored_select_stmt(s) } } func (p *SQLiteParser) Factored_select_stmt() (localctx IFactored_select_stmtContext) { localctx = NewFactored_select_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 90, SQLiteParserRULE_factored_select_stmt) p.EnterOuterAlt(localctx, 1) { 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. type ISimple_select_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Select_core() ISelect_coreContext Common_table_stmt() ICommon_table_stmtContext Order_by_stmt() IOrder_by_stmtContext Limit_stmt() ILimit_stmtContext // IsSimple_select_stmtContext differentiates from other interfaces. IsSimple_select_stmtContext() } type Simple_select_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySimple_select_stmtContext() *Simple_select_stmtContext { var p = new(Simple_select_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_simple_select_stmt return p } func (s *Simple_select_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Simple_select_stmtContext) Select_core() ISelect_coreContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISelect_coreContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISelect_coreContext) } func (s *Simple_select_stmtContext) Common_table_stmt() ICommon_table_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICommon_table_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ICommon_table_stmtContext) } func (s *Simple_select_stmtContext) Order_by_stmt() IOrder_by_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOrder_by_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IOrder_by_stmtContext) } func (s *Simple_select_stmtContext) Limit_stmt() ILimit_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ILimit_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ILimit_stmtContext) } func (s *Simple_select_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Simple_select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Simple_select_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterSimple_select_stmt(s) } } func (s *Simple_select_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitSimple_select_stmt(s) } } func (p *SQLiteParser) Simple_select_stmt() (localctx ISimple_select_stmtContext) { localctx = NewSimple_select_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 92, SQLiteParserRULE_simple_select_stmt) var _la int p.EnterOuterAlt(localctx, 1) p.SetState(1417) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWITH_ { { p.SetState(1416) p.Common_table_stmt() } } { p.SetState(1419) p.Select_core() } p.SetState(1421) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserORDER_ { { p.SetState(1420) p.Order_by_stmt() } } p.SetState(1424) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserLIMIT_ { { 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. type ICompound_select_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures AllSelect_core() []ISelect_coreContext Select_core(i int) ISelect_coreContext Common_table_stmt() ICommon_table_stmtContext Order_by_stmt() IOrder_by_stmtContext Limit_stmt() ILimit_stmtContext AllUNION_() []antlr.TerminalNode UNION_(i int) antlr.TerminalNode AllINTERSECT_() []antlr.TerminalNode INTERSECT_(i int) antlr.TerminalNode AllEXCEPT_() []antlr.TerminalNode EXCEPT_(i int) antlr.TerminalNode AllALL_() []antlr.TerminalNode ALL_(i int) antlr.TerminalNode // IsCompound_select_stmtContext differentiates from other interfaces. IsCompound_select_stmtContext() } type Compound_select_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCompound_select_stmtContext() *Compound_select_stmtContext { var p = new(Compound_select_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_compound_select_stmt return p } func (s *Compound_select_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Compound_select_stmtContext) AllSelect_core() []ISelect_coreContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(ISelect_coreContext); ok { len++ } } tst := make([]ISelect_coreContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(ISelect_coreContext); ok { tst[i] = t.(ISelect_coreContext) i++ } } return tst } func (s *Compound_select_stmtContext) Select_core(i int) ISelect_coreContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISelect_coreContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(ISelect_coreContext) } func (s *Compound_select_stmtContext) Common_table_stmt() ICommon_table_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICommon_table_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ICommon_table_stmtContext) } func (s *Compound_select_stmtContext) Order_by_stmt() IOrder_by_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOrder_by_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IOrder_by_stmtContext) } func (s *Compound_select_stmtContext) Limit_stmt() ILimit_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ILimit_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ILimit_stmtContext) } func (s *Compound_select_stmtContext) AllUNION_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserUNION_) } func (s *Compound_select_stmtContext) UNION_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserUNION_, i) } func (s *Compound_select_stmtContext) AllINTERSECT_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserINTERSECT_) } func (s *Compound_select_stmtContext) INTERSECT_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserINTERSECT_, i) } func (s *Compound_select_stmtContext) AllEXCEPT_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserEXCEPT_) } func (s *Compound_select_stmtContext) EXCEPT_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserEXCEPT_, i) } func (s *Compound_select_stmtContext) AllALL_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserALL_) } func (s *Compound_select_stmtContext) ALL_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserALL_, i) } func (s *Compound_select_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Compound_select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Compound_select_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterCompound_select_stmt(s) } } func (s *Compound_select_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitCompound_select_stmt(s) } } func (p *SQLiteParser) Compound_select_stmt() (localctx ICompound_select_stmtContext) { localctx = NewCompound_select_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 94, SQLiteParserRULE_compound_select_stmt) var _la int p.EnterOuterAlt(localctx, 1) p.SetState(1427) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWITH_ { { p.SetState(1426) p.Common_table_stmt() } } { p.SetState(1429) p.Select_core() } 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(1436) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetTokenStream().LA(1) { case SQLiteParserUNION_: { p.SetState(1430) p.Match(SQLiteParserUNION_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1432) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserALL_ { { p.SetState(1431) p.Match(SQLiteParserALL_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } case SQLiteParserINTERSECT_: { p.SetState(1434) p.Match(SQLiteParserINTERSECT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserEXCEPT_: { p.SetState(1435) p.Match(SQLiteParserEXCEPT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } default: p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) goto errorExit } { p.SetState(1438) p.Select_core() } p.SetState(1441) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } p.SetState(1444) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserORDER_ { { p.SetState(1443) p.Order_by_stmt() } } p.SetState(1447) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserLIMIT_ { { 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. type ITable_or_subqueryContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Table_name() ITable_nameContext Schema_name() ISchema_nameContext DOT() antlr.TerminalNode Table_alias() ITable_aliasContext INDEXED_() antlr.TerminalNode BY_() antlr.TerminalNode Index_name() IIndex_nameContext NOT_() antlr.TerminalNode AS_() antlr.TerminalNode Table_function_name() ITable_function_nameContext OPEN_PAR() antlr.TerminalNode AllExpr() []IExprContext Expr(i int) IExprContext CLOSE_PAR() antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode AllTable_or_subquery() []ITable_or_subqueryContext Table_or_subquery(i int) ITable_or_subqueryContext Join_clause() IJoin_clauseContext Select_stmt() ISelect_stmtContext Table_alias_fallback() ITable_alias_fallbackContext // IsTable_or_subqueryContext differentiates from other interfaces. IsTable_or_subqueryContext() } type Table_or_subqueryContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTable_or_subqueryContext() *Table_or_subqueryContext { var p = new(Table_or_subqueryContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_or_subquery return p } func (s *Table_or_subqueryContext) GetParser() antlr.Parser { return s.parser } func (s *Table_or_subqueryContext) Table_name() ITable_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_nameContext) } func (s *Table_or_subqueryContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Table_or_subqueryContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Table_or_subqueryContext) Table_alias() ITable_aliasContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_aliasContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_aliasContext) } func (s *Table_or_subqueryContext) INDEXED_() antlr.TerminalNode { return s.GetToken(SQLiteParserINDEXED_, 0) } func (s *Table_or_subqueryContext) BY_() antlr.TerminalNode { return s.GetToken(SQLiteParserBY_, 0) } func (s *Table_or_subqueryContext) Index_name() IIndex_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IIndex_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IIndex_nameContext) } func (s *Table_or_subqueryContext) NOT_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_, 0) } func (s *Table_or_subqueryContext) AS_() antlr.TerminalNode { return s.GetToken(SQLiteParserAS_, 0) } func (s *Table_or_subqueryContext) Table_function_name() ITable_function_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_function_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_function_nameContext) } func (s *Table_or_subqueryContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Table_or_subqueryContext) 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 *Table_or_subqueryContext) 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 *Table_or_subqueryContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Table_or_subqueryContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Table_or_subqueryContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Table_or_subqueryContext) AllTable_or_subquery() []ITable_or_subqueryContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(ITable_or_subqueryContext); ok { len++ } } tst := make([]ITable_or_subqueryContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(ITable_or_subqueryContext); ok { tst[i] = t.(ITable_or_subqueryContext) i++ } } return tst } func (s *Table_or_subqueryContext) Table_or_subquery(i int) ITable_or_subqueryContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_or_subqueryContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(ITable_or_subqueryContext) } func (s *Table_or_subqueryContext) Join_clause() IJoin_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IJoin_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IJoin_clauseContext) } func (s *Table_or_subqueryContext) Select_stmt() ISelect_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISelect_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISelect_stmtContext) } func (s *Table_or_subqueryContext) Table_alias_fallback() ITable_alias_fallbackContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_alias_fallbackContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_alias_fallbackContext) } func (s *Table_or_subqueryContext) GetRuleContext() antlr.RuleContext { return s } func (s *Table_or_subqueryContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Table_or_subqueryContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterTable_or_subquery(s) } } func (s *Table_or_subqueryContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitTable_or_subquery(s) } } func (p *SQLiteParser) Table_or_subquery() (localctx ITable_or_subqueryContext) { localctx = NewTable_or_subqueryContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 96, SQLiteParserRULE_table_or_subquery) var _la int p.SetState(1577) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 226, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) p.SetState(1452) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 202, p.GetParserRuleContext()) == 1 { { p.SetState(1449) p.Schema_name() } { p.SetState(1450) p.Match(SQLiteParserDOT) if p.HasError() { // Recognition error - abort rule goto errorExit } } } else if p.HasError() { // JIM goto errorExit } { p.SetState(1454) p.Table_name() } 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(1456) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ { { p.SetState(1455) p.Match(SQLiteParserAS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } { p.SetState(1458) p.Table_alias() } } p.SetState(1466) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetTokenStream().LA(1) { case SQLiteParserINDEXED_: { p.SetState(1461) p.Match(SQLiteParserINDEXED_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1462) p.Match(SQLiteParserBY_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1463) p.Index_name() } case SQLiteParserNOT_: { p.SetState(1464) p.Match(SQLiteParserNOT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { 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_, 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(1471) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 206, p.GetParserRuleContext()) == 1 { { p.SetState(1468) p.Schema_name() } { p.SetState(1469) p.Match(SQLiteParserDOT) if p.HasError() { // Recognition error - abort rule goto errorExit } } } else if p.HasError() { // JIM goto errorExit } { p.SetState(1473) p.Table_function_name() } { p.SetState(1474) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1475) p.expr(0) } p.SetState(1480) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1476) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1477) p.expr(0) } p.SetState(1482) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } { p.SetState(1483) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } 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(1485) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ { { p.SetState(1484) p.Match(SQLiteParserAS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } { p.SetState(1487) p.Table_alias() } } case 3: p.EnterOuterAlt(localctx, 3) { p.SetState(1490) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1500) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 211, p.GetParserRuleContext()) { case 1: { p.SetState(1491) p.Table_or_subquery() } p.SetState(1496) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1492) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1493) p.Table_or_subquery() } p.SetState(1498) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } case 2: { p.SetState(1499) p.Join_clause() } case antlr.ATNInvalidAltNumber: goto errorExit } { p.SetState(1502) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 4: p.EnterOuterAlt(localctx, 4) { p.SetState(1504) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1505) p.Select_stmt() } { p.SetState(1506) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } 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(1508) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ { { p.SetState(1507) p.Match(SQLiteParserAS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } { p.SetState(1510) p.Table_alias() } } case 5: p.EnterOuterAlt(localctx, 5) p.SetState(1516) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 214, p.GetParserRuleContext()) == 1 { { p.SetState(1513) p.Schema_name() } { p.SetState(1514) p.Match(SQLiteParserDOT) if p.HasError() { // Recognition error - abort rule goto errorExit } } } else if p.HasError() { // JIM goto errorExit } { p.SetState(1518) p.Table_name() } p.SetState(1523) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 216, p.GetParserRuleContext()) == 1 { p.SetState(1520) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 215, p.GetParserRuleContext()) == 1 { { p.SetState(1519) p.Match(SQLiteParserAS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } else if p.HasError() { // JIM goto errorExit } { p.SetState(1522) p.Table_alias_fallback() } } else if p.HasError() { // JIM goto errorExit } p.SetState(1530) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetTokenStream().LA(1) { case SQLiteParserINDEXED_: { p.SetState(1525) p.Match(SQLiteParserINDEXED_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1526) p.Match(SQLiteParserBY_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1527) p.Index_name() } case SQLiteParserNOT_: { p.SetState(1528) p.Match(SQLiteParserNOT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { 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_, 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(1535) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 218, p.GetParserRuleContext()) == 1 { { p.SetState(1532) p.Schema_name() } { p.SetState(1533) p.Match(SQLiteParserDOT) if p.HasError() { // Recognition error - abort rule goto errorExit } } } else if p.HasError() { // JIM goto errorExit } { p.SetState(1537) p.Table_function_name() } { p.SetState(1538) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1539) p.expr(0) } p.SetState(1544) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1540) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1541) p.expr(0) } p.SetState(1546) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } { p.SetState(1547) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1552) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 221, p.GetParserRuleContext()) == 1 { p.SetState(1549) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 220, p.GetParserRuleContext()) == 1 { { p.SetState(1548) p.Match(SQLiteParserAS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } else if p.HasError() { // JIM goto errorExit } { p.SetState(1551) p.Table_alias_fallback() } } else if p.HasError() { // JIM goto errorExit } case 7: p.EnterOuterAlt(localctx, 7) { p.SetState(1554) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1564) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 223, p.GetParserRuleContext()) { case 1: { p.SetState(1555) p.Table_or_subquery() } p.SetState(1560) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1556) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1557) p.Table_or_subquery() } p.SetState(1562) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } case 2: { p.SetState(1563) p.Join_clause() } case antlr.ATNInvalidAltNumber: goto errorExit } { p.SetState(1566) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 8: p.EnterOuterAlt(localctx, 8) { p.SetState(1568) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1569) p.Select_stmt() } { p.SetState(1570) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1575) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 225, p.GetParserRuleContext()) == 1 { p.SetState(1572) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 224, p.GetParserRuleContext()) == 1 { { p.SetState(1571) p.Match(SQLiteParserAS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } else if p.HasError() { // JIM goto errorExit } { 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. type IResult_columnContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures STAR() antlr.TerminalNode Table_name() ITable_nameContext DOT() antlr.TerminalNode Expr() IExprContext Column_alias() IColumn_aliasContext AS_() antlr.TerminalNode // IsResult_columnContext differentiates from other interfaces. IsResult_columnContext() } type Result_columnContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyResult_columnContext() *Result_columnContext { var p = new(Result_columnContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_result_column return p } func (s *Result_columnContext) GetParser() antlr.Parser { return s.parser } func (s *Result_columnContext) STAR() antlr.TerminalNode { return s.GetToken(SQLiteParserSTAR, 0) } func (s *Result_columnContext) Table_name() ITable_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_nameContext) } func (s *Result_columnContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Result_columnContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Result_columnContext) Column_alias() IColumn_aliasContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_aliasContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IColumn_aliasContext) } func (s *Result_columnContext) AS_() antlr.TerminalNode { return s.GetToken(SQLiteParserAS_, 0) } func (s *Result_columnContext) GetRuleContext() antlr.RuleContext { return s } func (s *Result_columnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Result_columnContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterResult_column(s) } } func (s *Result_columnContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitResult_column(s) } } func (p *SQLiteParser) Result_column() (localctx IResult_columnContext) { localctx = NewResult_columnContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 98, SQLiteParserRULE_result_column) var _la int p.SetState(1591) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 229, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { p.SetState(1579) p.Match(SQLiteParserSTAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 2: p.EnterOuterAlt(localctx, 2) { p.SetState(1580) p.Table_name() } { p.SetState(1581) p.Match(SQLiteParserDOT) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1582) p.Match(SQLiteParserSTAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 3: p.EnterOuterAlt(localctx, 3) { p.SetState(1584) p.expr(0) } 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(1586) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ { { p.SetState(1585) p.Match(SQLiteParserAS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } { 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. type IJoin_operatorContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures COMMA() antlr.TerminalNode JOIN_() antlr.TerminalNode NATURAL_() antlr.TerminalNode INNER_() antlr.TerminalNode LEFT_() antlr.TerminalNode RIGHT_() antlr.TerminalNode FULL_() antlr.TerminalNode OUTER_() antlr.TerminalNode CROSS_() antlr.TerminalNode // IsJoin_operatorContext differentiates from other interfaces. IsJoin_operatorContext() } type Join_operatorContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyJoin_operatorContext() *Join_operatorContext { var p = new(Join_operatorContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_join_operator return p } func (s *Join_operatorContext) GetParser() antlr.Parser { return s.parser } func (s *Join_operatorContext) COMMA() antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, 0) } func (s *Join_operatorContext) JOIN_() antlr.TerminalNode { return s.GetToken(SQLiteParserJOIN_, 0) } func (s *Join_operatorContext) NATURAL_() antlr.TerminalNode { return s.GetToken(SQLiteParserNATURAL_, 0) } func (s *Join_operatorContext) INNER_() antlr.TerminalNode { return s.GetToken(SQLiteParserINNER_, 0) } func (s *Join_operatorContext) LEFT_() antlr.TerminalNode { return s.GetToken(SQLiteParserLEFT_, 0) } func (s *Join_operatorContext) RIGHT_() antlr.TerminalNode { return s.GetToken(SQLiteParserRIGHT_, 0) } func (s *Join_operatorContext) FULL_() antlr.TerminalNode { return s.GetToken(SQLiteParserFULL_, 0) } func (s *Join_operatorContext) OUTER_() antlr.TerminalNode { return s.GetToken(SQLiteParserOUTER_, 0) } func (s *Join_operatorContext) CROSS_() antlr.TerminalNode { return s.GetToken(SQLiteParserCROSS_, 0) } func (s *Join_operatorContext) GetRuleContext() antlr.RuleContext { return s } func (s *Join_operatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Join_operatorContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterJoin_operator(s) } } func (s *Join_operatorContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitJoin_operator(s) } } func (p *SQLiteParser) Join_operator() (localctx IJoin_operatorContext) { localctx = NewJoin_operatorContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 100, SQLiteParserRULE_join_operator) var _la int 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(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(1595) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserNATURAL_ { { p.SetState(1594) p.Match(SQLiteParserNATURAL_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } p.SetState(1602) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetTokenStream().LA(1) { case SQLiteParserFULL_, SQLiteParserLEFT_, SQLiteParserRIGHT_: { p.SetState(1597) _la = p.GetTokenStream().LA(1) 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(1599) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserOUTER_ { { p.SetState(1598) p.Match(SQLiteParserOUTER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } case SQLiteParserINNER_: { p.SetState(1601) p.Match(SQLiteParserINNER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserJOIN_: default: } { p.SetState(1604) p.Match(SQLiteParserJOIN_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserCROSS_: p.EnterOuterAlt(localctx, 3) { p.SetState(1605) p.Match(SQLiteParserCROSS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1606) p.Match(SQLiteParserJOIN_) if p.HasError() { // Recognition error - abort rule goto errorExit } } default: 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. type IJoin_constraintContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures ON_() antlr.TerminalNode Expr() IExprContext USING_() antlr.TerminalNode OPEN_PAR() antlr.TerminalNode AllColumn_name() []IColumn_nameContext Column_name(i int) IColumn_nameContext CLOSE_PAR() antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsJoin_constraintContext differentiates from other interfaces. IsJoin_constraintContext() } type Join_constraintContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyJoin_constraintContext() *Join_constraintContext { var p = new(Join_constraintContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_join_constraint return p } func (s *Join_constraintContext) GetParser() antlr.Parser { return s.parser } func (s *Join_constraintContext) ON_() antlr.TerminalNode { return s.GetToken(SQLiteParserON_, 0) } func (s *Join_constraintContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Join_constraintContext) USING_() antlr.TerminalNode { return s.GetToken(SQLiteParserUSING_, 0) } func (s *Join_constraintContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Join_constraintContext) AllColumn_name() []IColumn_nameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_nameContext); ok { len++ } } tst := make([]IColumn_nameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_nameContext); ok { tst[i] = t.(IColumn_nameContext) i++ } } return tst } func (s *Join_constraintContext) Column_name(i int) IColumn_nameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Join_constraintContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Join_constraintContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Join_constraintContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Join_constraintContext) GetRuleContext() antlr.RuleContext { return s } func (s *Join_constraintContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Join_constraintContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterJoin_constraint(s) } } func (s *Join_constraintContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitJoin_constraint(s) } } func (p *SQLiteParser) Join_constraint() (localctx IJoin_constraintContext) { localctx = NewJoin_constraintContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 102, SQLiteParserRULE_join_constraint) var _la int p.EnterOuterAlt(localctx, 1) p.SetState(1623) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 235, p.GetParserRuleContext()) == 1 { { p.SetState(1609) p.Match(SQLiteParserON_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1610) p.expr(0) } } else if p.HasError() { // JIM goto errorExit } else if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 235, p.GetParserRuleContext()) == 2 { { p.SetState(1611) p.Match(SQLiteParserUSING_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1612) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1613) p.Column_name() } p.SetState(1618) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1614) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1615) p.Column_name() } p.SetState(1620) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } { 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. type ICompound_operatorContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures UNION_() antlr.TerminalNode ALL_() antlr.TerminalNode INTERSECT_() antlr.TerminalNode EXCEPT_() antlr.TerminalNode // IsCompound_operatorContext differentiates from other interfaces. IsCompound_operatorContext() } type Compound_operatorContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCompound_operatorContext() *Compound_operatorContext { var p = new(Compound_operatorContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_compound_operator return p } func (s *Compound_operatorContext) GetParser() antlr.Parser { return s.parser } func (s *Compound_operatorContext) UNION_() antlr.TerminalNode { return s.GetToken(SQLiteParserUNION_, 0) } func (s *Compound_operatorContext) ALL_() antlr.TerminalNode { return s.GetToken(SQLiteParserALL_, 0) } func (s *Compound_operatorContext) INTERSECT_() antlr.TerminalNode { return s.GetToken(SQLiteParserINTERSECT_, 0) } func (s *Compound_operatorContext) EXCEPT_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXCEPT_, 0) } func (s *Compound_operatorContext) GetRuleContext() antlr.RuleContext { return s } func (s *Compound_operatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Compound_operatorContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterCompound_operator(s) } } func (s *Compound_operatorContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitCompound_operator(s) } } func (p *SQLiteParser) Compound_operator() (localctx ICompound_operatorContext) { localctx = NewCompound_operatorContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 104, SQLiteParserRULE_compound_operator) var _la int 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(1625) p.Match(SQLiteParserUNION_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1627) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserALL_ { { p.SetState(1626) p.Match(SQLiteParserALL_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } case SQLiteParserINTERSECT_: p.EnterOuterAlt(localctx, 2) { p.SetState(1629) p.Match(SQLiteParserINTERSECT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserEXCEPT_: p.EnterOuterAlt(localctx, 3) { p.SetState(1630) p.Match(SQLiteParserEXCEPT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } default: 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. type IUpdate_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures UPDATE_() antlr.TerminalNode Qualified_table_name() IQualified_table_nameContext SET_() antlr.TerminalNode AllASSIGN() []antlr.TerminalNode ASSIGN(i int) antlr.TerminalNode AllExpr() []IExprContext Expr(i int) IExprContext AllColumn_name() []IColumn_nameContext Column_name(i int) IColumn_nameContext AllColumn_name_list() []IColumn_name_listContext Column_name_list(i int) IColumn_name_listContext With_clause() IWith_clauseContext OR_() antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode WHERE_() antlr.TerminalNode Returning_clause() IReturning_clauseContext ROLLBACK_() antlr.TerminalNode ABORT_() antlr.TerminalNode REPLACE_() antlr.TerminalNode FAIL_() antlr.TerminalNode IGNORE_() antlr.TerminalNode // IsUpdate_stmtContext differentiates from other interfaces. IsUpdate_stmtContext() } type Update_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyUpdate_stmtContext() *Update_stmtContext { var p = new(Update_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_update_stmt return p } func (s *Update_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Update_stmtContext) UPDATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserUPDATE_, 0) } func (s *Update_stmtContext) Qualified_table_name() IQualified_table_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IQualified_table_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IQualified_table_nameContext) } func (s *Update_stmtContext) SET_() antlr.TerminalNode { return s.GetToken(SQLiteParserSET_, 0) } func (s *Update_stmtContext) AllASSIGN() []antlr.TerminalNode { return s.GetTokens(SQLiteParserASSIGN) } func (s *Update_stmtContext) ASSIGN(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserASSIGN, i) } func (s *Update_stmtContext) 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 *Update_stmtContext) 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 *Update_stmtContext) AllColumn_name() []IColumn_nameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_nameContext); ok { len++ } } tst := make([]IColumn_nameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_nameContext); ok { tst[i] = t.(IColumn_nameContext) i++ } } return tst } func (s *Update_stmtContext) Column_name(i int) IColumn_nameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Update_stmtContext) AllColumn_name_list() []IColumn_name_listContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_name_listContext); ok { len++ } } tst := make([]IColumn_name_listContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_name_listContext); ok { tst[i] = t.(IColumn_name_listContext) i++ } } return tst } func (s *Update_stmtContext) Column_name_list(i int) IColumn_name_listContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_name_listContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_name_listContext) } func (s *Update_stmtContext) With_clause() IWith_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IWith_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IWith_clauseContext) } func (s *Update_stmtContext) OR_() antlr.TerminalNode { return s.GetToken(SQLiteParserOR_, 0) } func (s *Update_stmtContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Update_stmtContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Update_stmtContext) WHERE_() antlr.TerminalNode { return s.GetToken(SQLiteParserWHERE_, 0) } func (s *Update_stmtContext) Returning_clause() IReturning_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IReturning_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IReturning_clauseContext) } func (s *Update_stmtContext) ROLLBACK_() antlr.TerminalNode { return s.GetToken(SQLiteParserROLLBACK_, 0) } func (s *Update_stmtContext) ABORT_() antlr.TerminalNode { return s.GetToken(SQLiteParserABORT_, 0) } func (s *Update_stmtContext) REPLACE_() antlr.TerminalNode { return s.GetToken(SQLiteParserREPLACE_, 0) } func (s *Update_stmtContext) FAIL_() antlr.TerminalNode { return s.GetToken(SQLiteParserFAIL_, 0) } func (s *Update_stmtContext) IGNORE_() antlr.TerminalNode { return s.GetToken(SQLiteParserIGNORE_, 0) } func (s *Update_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Update_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Update_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterUpdate_stmt(s) } } func (s *Update_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitUpdate_stmt(s) } } func (p *SQLiteParser) Update_stmt() (localctx IUpdate_stmtContext) { localctx = NewUpdate_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 106, SQLiteParserRULE_update_stmt) var _la int p.EnterOuterAlt(localctx, 1) p.SetState(1634) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWITH_ { { p.SetState(1633) p.With_clause() } } { p.SetState(1636) p.Match(SQLiteParserUPDATE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1639) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 239, p.GetParserRuleContext()) == 1 { { p.SetState(1637) p.Match(SQLiteParserOR_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1638) _la = p.GetTokenStream().LA(1) 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() } } } else if p.HasError() { // JIM goto errorExit } { p.SetState(1641) p.Qualified_table_name() } { p.SetState(1642) p.Match(SQLiteParserSET_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1645) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 240, p.GetParserRuleContext()) { case 1: { p.SetState(1643) p.Column_name() } case 2: { p.SetState(1644) p.Column_name_list() } case antlr.ATNInvalidAltNumber: goto errorExit } { p.SetState(1647) p.Match(SQLiteParserASSIGN) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1648) p.expr(0) } p.SetState(1659) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1649) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1652) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 241, p.GetParserRuleContext()) { case 1: { p.SetState(1650) p.Column_name() } case 2: { p.SetState(1651) p.Column_name_list() } case antlr.ATNInvalidAltNumber: goto errorExit } { p.SetState(1654) p.Match(SQLiteParserASSIGN) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1655) p.expr(0) } p.SetState(1661) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } p.SetState(1664) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWHERE_ { { p.SetState(1662) p.Match(SQLiteParserWHERE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1663) p.expr(0) } } p.SetState(1667) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserRETURNING_ { { 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. type IColumn_name_listContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures OPEN_PAR() antlr.TerminalNode AllColumn_name() []IColumn_nameContext Column_name(i int) IColumn_nameContext CLOSE_PAR() antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsColumn_name_listContext differentiates from other interfaces. IsColumn_name_listContext() } type Column_name_listContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyColumn_name_listContext() *Column_name_listContext { var p = new(Column_name_listContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_column_name_list return p } func (s *Column_name_listContext) GetParser() antlr.Parser { return s.parser } func (s *Column_name_listContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Column_name_listContext) AllColumn_name() []IColumn_nameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_nameContext); ok { len++ } } tst := make([]IColumn_nameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_nameContext); ok { tst[i] = t.(IColumn_nameContext) i++ } } return tst } func (s *Column_name_listContext) Column_name(i int) IColumn_nameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Column_name_listContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Column_name_listContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Column_name_listContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Column_name_listContext) GetRuleContext() antlr.RuleContext { return s } func (s *Column_name_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Column_name_listContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterColumn_name_list(s) } } func (s *Column_name_listContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitColumn_name_list(s) } } func (p *SQLiteParser) Column_name_list() (localctx IColumn_name_listContext) { localctx = NewColumn_name_listContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 108, SQLiteParserRULE_column_name_list) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1669) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1670) p.Column_name() } p.SetState(1675) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1671) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1672) p.Column_name() } p.SetState(1677) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } { 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. type IUpdate_stmt_limitedContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures UPDATE_() antlr.TerminalNode Qualified_table_name() IQualified_table_nameContext SET_() antlr.TerminalNode AllASSIGN() []antlr.TerminalNode ASSIGN(i int) antlr.TerminalNode AllExpr() []IExprContext Expr(i int) IExprContext AllColumn_name() []IColumn_nameContext Column_name(i int) IColumn_nameContext AllColumn_name_list() []IColumn_name_listContext Column_name_list(i int) IColumn_name_listContext With_clause() IWith_clauseContext OR_() antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode WHERE_() antlr.TerminalNode Limit_stmt() ILimit_stmtContext ROLLBACK_() antlr.TerminalNode ABORT_() antlr.TerminalNode REPLACE_() antlr.TerminalNode FAIL_() antlr.TerminalNode IGNORE_() antlr.TerminalNode Order_by_stmt() IOrder_by_stmtContext // IsUpdate_stmt_limitedContext differentiates from other interfaces. IsUpdate_stmt_limitedContext() } type Update_stmt_limitedContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyUpdate_stmt_limitedContext() *Update_stmt_limitedContext { var p = new(Update_stmt_limitedContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_update_stmt_limited return p } func (s *Update_stmt_limitedContext) GetParser() antlr.Parser { return s.parser } func (s *Update_stmt_limitedContext) UPDATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserUPDATE_, 0) } func (s *Update_stmt_limitedContext) Qualified_table_name() IQualified_table_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IQualified_table_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IQualified_table_nameContext) } func (s *Update_stmt_limitedContext) SET_() antlr.TerminalNode { return s.GetToken(SQLiteParserSET_, 0) } func (s *Update_stmt_limitedContext) AllASSIGN() []antlr.TerminalNode { return s.GetTokens(SQLiteParserASSIGN) } func (s *Update_stmt_limitedContext) ASSIGN(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserASSIGN, i) } func (s *Update_stmt_limitedContext) 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 *Update_stmt_limitedContext) 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 *Update_stmt_limitedContext) AllColumn_name() []IColumn_nameContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_nameContext); ok { len++ } } tst := make([]IColumn_nameContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_nameContext); ok { tst[i] = t.(IColumn_nameContext) i++ } } return tst } func (s *Update_stmt_limitedContext) Column_name(i int) IColumn_nameContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_nameContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_nameContext) } func (s *Update_stmt_limitedContext) AllColumn_name_list() []IColumn_name_listContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IColumn_name_listContext); ok { len++ } } tst := make([]IColumn_name_listContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IColumn_name_listContext); ok { tst[i] = t.(IColumn_name_listContext) i++ } } return tst } func (s *Update_stmt_limitedContext) Column_name_list(i int) IColumn_name_listContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_name_listContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IColumn_name_listContext) } func (s *Update_stmt_limitedContext) With_clause() IWith_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IWith_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IWith_clauseContext) } func (s *Update_stmt_limitedContext) OR_() antlr.TerminalNode { return s.GetToken(SQLiteParserOR_, 0) } func (s *Update_stmt_limitedContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Update_stmt_limitedContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Update_stmt_limitedContext) WHERE_() antlr.TerminalNode { return s.GetToken(SQLiteParserWHERE_, 0) } func (s *Update_stmt_limitedContext) Limit_stmt() ILimit_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ILimit_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ILimit_stmtContext) } func (s *Update_stmt_limitedContext) ROLLBACK_() antlr.TerminalNode { return s.GetToken(SQLiteParserROLLBACK_, 0) } func (s *Update_stmt_limitedContext) ABORT_() antlr.TerminalNode { return s.GetToken(SQLiteParserABORT_, 0) } func (s *Update_stmt_limitedContext) REPLACE_() antlr.TerminalNode { return s.GetToken(SQLiteParserREPLACE_, 0) } func (s *Update_stmt_limitedContext) FAIL_() antlr.TerminalNode { return s.GetToken(SQLiteParserFAIL_, 0) } func (s *Update_stmt_limitedContext) IGNORE_() antlr.TerminalNode { return s.GetToken(SQLiteParserIGNORE_, 0) } func (s *Update_stmt_limitedContext) Order_by_stmt() IOrder_by_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOrder_by_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IOrder_by_stmtContext) } func (s *Update_stmt_limitedContext) GetRuleContext() antlr.RuleContext { return s } func (s *Update_stmt_limitedContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Update_stmt_limitedContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterUpdate_stmt_limited(s) } } func (s *Update_stmt_limitedContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitUpdate_stmt_limited(s) } } func (p *SQLiteParser) Update_stmt_limited() (localctx IUpdate_stmt_limitedContext) { localctx = NewUpdate_stmt_limitedContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 110, SQLiteParserRULE_update_stmt_limited) var _la int p.EnterOuterAlt(localctx, 1) p.SetState(1681) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWITH_ { { p.SetState(1680) p.With_clause() } } { p.SetState(1683) p.Match(SQLiteParserUPDATE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1686) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 247, p.GetParserRuleContext()) == 1 { { p.SetState(1684) p.Match(SQLiteParserOR_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1685) _la = p.GetTokenStream().LA(1) 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() } } } else if p.HasError() { // JIM goto errorExit } { p.SetState(1688) p.Qualified_table_name() } { p.SetState(1689) p.Match(SQLiteParserSET_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1692) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 248, p.GetParserRuleContext()) { case 1: { p.SetState(1690) p.Column_name() } case 2: { p.SetState(1691) p.Column_name_list() } case antlr.ATNInvalidAltNumber: goto errorExit } { p.SetState(1694) p.Match(SQLiteParserASSIGN) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1695) p.expr(0) } p.SetState(1706) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1696) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1699) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 249, p.GetParserRuleContext()) { case 1: { p.SetState(1697) p.Column_name() } case 2: { p.SetState(1698) p.Column_name_list() } case antlr.ATNInvalidAltNumber: goto errorExit } { p.SetState(1701) p.Match(SQLiteParserASSIGN) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1702) p.expr(0) } p.SetState(1708) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } p.SetState(1711) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserWHERE_ { { p.SetState(1709) p.Match(SQLiteParserWHERE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1710) p.expr(0) } } p.SetState(1717) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserLIMIT_ || _la == SQLiteParserORDER_ { p.SetState(1714) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserORDER_ { { p.SetState(1713) p.Order_by_stmt() } } { 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. type IQualified_table_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Table_name() ITable_nameContext Schema_name() ISchema_nameContext DOT() antlr.TerminalNode AS_() antlr.TerminalNode Alias() IAliasContext INDEXED_() antlr.TerminalNode BY_() antlr.TerminalNode Index_name() IIndex_nameContext NOT_() antlr.TerminalNode // IsQualified_table_nameContext differentiates from other interfaces. IsQualified_table_nameContext() } type Qualified_table_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyQualified_table_nameContext() *Qualified_table_nameContext { var p = new(Qualified_table_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_qualified_table_name return p } func (s *Qualified_table_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Qualified_table_nameContext) Table_name() ITable_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ITable_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ITable_nameContext) } func (s *Qualified_table_nameContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Qualified_table_nameContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Qualified_table_nameContext) AS_() antlr.TerminalNode { return s.GetToken(SQLiteParserAS_, 0) } func (s *Qualified_table_nameContext) Alias() IAliasContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAliasContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAliasContext) } func (s *Qualified_table_nameContext) INDEXED_() antlr.TerminalNode { return s.GetToken(SQLiteParserINDEXED_, 0) } func (s *Qualified_table_nameContext) BY_() antlr.TerminalNode { return s.GetToken(SQLiteParserBY_, 0) } func (s *Qualified_table_nameContext) Index_name() IIndex_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IIndex_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IIndex_nameContext) } func (s *Qualified_table_nameContext) NOT_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_, 0) } func (s *Qualified_table_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Qualified_table_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Qualified_table_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterQualified_table_name(s) } } func (s *Qualified_table_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitQualified_table_name(s) } } func (p *SQLiteParser) Qualified_table_name() (localctx IQualified_table_nameContext) { localctx = NewQualified_table_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 112, SQLiteParserRULE_qualified_table_name) var _la int p.EnterOuterAlt(localctx, 1) p.SetState(1722) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 254, p.GetParserRuleContext()) == 1 { { p.SetState(1719) p.Schema_name() } { p.SetState(1720) p.Match(SQLiteParserDOT) if p.HasError() { // Recognition error - abort rule goto errorExit } } } else if p.HasError() { // JIM goto errorExit } { p.SetState(1724) p.Table_name() } p.SetState(1727) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserAS_ { { p.SetState(1725) p.Match(SQLiteParserAS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1726) p.Alias() } } p.SetState(1734) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetTokenStream().LA(1) { case SQLiteParserINDEXED_: { p.SetState(1729) p.Match(SQLiteParserINDEXED_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1730) p.Match(SQLiteParserBY_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1731) p.Index_name() } case SQLiteParserNOT_: { p.SetState(1732) p.Match(SQLiteParserNOT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1733) p.Match(SQLiteParserINDEXED_) if p.HasError() { // Recognition error - abort rule goto errorExit } } 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. type IVacuum_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures VACUUM_() antlr.TerminalNode Schema_name() ISchema_nameContext INTO_() antlr.TerminalNode Filename() IFilenameContext // IsVacuum_stmtContext differentiates from other interfaces. IsVacuum_stmtContext() } type Vacuum_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyVacuum_stmtContext() *Vacuum_stmtContext { var p = new(Vacuum_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_vacuum_stmt return p } func (s *Vacuum_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Vacuum_stmtContext) VACUUM_() antlr.TerminalNode { return s.GetToken(SQLiteParserVACUUM_, 0) } func (s *Vacuum_stmtContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Vacuum_stmtContext) INTO_() antlr.TerminalNode { return s.GetToken(SQLiteParserINTO_, 0) } func (s *Vacuum_stmtContext) Filename() IFilenameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IFilenameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IFilenameContext) } func (s *Vacuum_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Vacuum_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Vacuum_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterVacuum_stmt(s) } } func (s *Vacuum_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitVacuum_stmt(s) } } func (p *SQLiteParser) Vacuum_stmt() (localctx IVacuum_stmtContext) { localctx = NewVacuum_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 114, SQLiteParserRULE_vacuum_stmt) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1736) p.Match(SQLiteParserVACUUM_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1738) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 257, p.GetParserRuleContext()) == 1 { { p.SetState(1737) p.Schema_name() } } else if p.HasError() { // JIM goto errorExit } p.SetState(1742) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserINTO_ { { p.SetState(1740) p.Match(SQLiteParserINTO_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { 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. type IFilter_clauseContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures FILTER_() antlr.TerminalNode OPEN_PAR() antlr.TerminalNode WHERE_() antlr.TerminalNode Expr() IExprContext CLOSE_PAR() antlr.TerminalNode // IsFilter_clauseContext differentiates from other interfaces. IsFilter_clauseContext() } type Filter_clauseContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFilter_clauseContext() *Filter_clauseContext { var p = new(Filter_clauseContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_filter_clause return p } func (s *Filter_clauseContext) GetParser() antlr.Parser { return s.parser } func (s *Filter_clauseContext) FILTER_() antlr.TerminalNode { return s.GetToken(SQLiteParserFILTER_, 0) } func (s *Filter_clauseContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Filter_clauseContext) WHERE_() antlr.TerminalNode { return s.GetToken(SQLiteParserWHERE_, 0) } func (s *Filter_clauseContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Filter_clauseContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Filter_clauseContext) GetRuleContext() antlr.RuleContext { return s } func (s *Filter_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Filter_clauseContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterFilter_clause(s) } } func (s *Filter_clauseContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitFilter_clause(s) } } func (p *SQLiteParser) Filter_clause() (localctx IFilter_clauseContext) { localctx = NewFilter_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 116, SQLiteParserRULE_filter_clause) p.EnterOuterAlt(localctx, 1) { p.SetState(1744) p.Match(SQLiteParserFILTER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1745) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1746) p.Match(SQLiteParserWHERE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1747) p.expr(0) } { 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. type IWindow_defnContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures OPEN_PAR() antlr.TerminalNode CLOSE_PAR() antlr.TerminalNode ORDER_() antlr.TerminalNode AllBY_() []antlr.TerminalNode BY_(i int) antlr.TerminalNode AllOrdering_term() []IOrdering_termContext Ordering_term(i int) IOrdering_termContext Base_window_name() IBase_window_nameContext PARTITION_() antlr.TerminalNode AllExpr() []IExprContext Expr(i int) IExprContext Frame_spec() IFrame_specContext AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsWindow_defnContext differentiates from other interfaces. IsWindow_defnContext() } type Window_defnContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyWindow_defnContext() *Window_defnContext { var p = new(Window_defnContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_window_defn return p } func (s *Window_defnContext) GetParser() antlr.Parser { return s.parser } func (s *Window_defnContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Window_defnContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Window_defnContext) ORDER_() antlr.TerminalNode { return s.GetToken(SQLiteParserORDER_, 0) } func (s *Window_defnContext) AllBY_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserBY_) } func (s *Window_defnContext) BY_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserBY_, i) } func (s *Window_defnContext) AllOrdering_term() []IOrdering_termContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IOrdering_termContext); ok { len++ } } tst := make([]IOrdering_termContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IOrdering_termContext); ok { tst[i] = t.(IOrdering_termContext) i++ } } return tst } func (s *Window_defnContext) Ordering_term(i int) IOrdering_termContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOrdering_termContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IOrdering_termContext) } func (s *Window_defnContext) Base_window_name() IBase_window_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IBase_window_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IBase_window_nameContext) } func (s *Window_defnContext) PARTITION_() antlr.TerminalNode { return s.GetToken(SQLiteParserPARTITION_, 0) } func (s *Window_defnContext) 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 *Window_defnContext) 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 *Window_defnContext) Frame_spec() IFrame_specContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IFrame_specContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IFrame_specContext) } func (s *Window_defnContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Window_defnContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Window_defnContext) GetRuleContext() antlr.RuleContext { return s } func (s *Window_defnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Window_defnContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterWindow_defn(s) } } func (s *Window_defnContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitWindow_defn(s) } } func (p *SQLiteParser) Window_defn() (localctx IWindow_defnContext) { localctx = NewWindow_defnContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 118, SQLiteParserRULE_window_defn) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1750) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1752) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 259, p.GetParserRuleContext()) == 1 { { p.SetState(1751) p.Base_window_name() } } else if p.HasError() { // JIM goto errorExit } p.SetState(1764) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { p.SetState(1754) p.Match(SQLiteParserPARTITION_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1755) p.Match(SQLiteParserBY_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1756) p.expr(0) } p.SetState(1761) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1757) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1758) p.expr(0) } p.SetState(1763) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } } { p.SetState(1766) p.Match(SQLiteParserORDER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1767) p.Match(SQLiteParserBY_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1768) p.Ordering_term() } p.SetState(1773) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1769) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1770) p.Ordering_term() } p.SetState(1775) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } p.SetState(1777) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 { { p.SetState(1776) p.Frame_spec() } } { 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. type IOver_clauseContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures OVER_() antlr.TerminalNode Window_name() IWindow_nameContext OPEN_PAR() antlr.TerminalNode CLOSE_PAR() antlr.TerminalNode Base_window_name() IBase_window_nameContext PARTITION_() antlr.TerminalNode AllBY_() []antlr.TerminalNode BY_(i int) antlr.TerminalNode AllExpr() []IExprContext Expr(i int) IExprContext ORDER_() antlr.TerminalNode AllOrdering_term() []IOrdering_termContext Ordering_term(i int) IOrdering_termContext Frame_spec() IFrame_specContext AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsOver_clauseContext differentiates from other interfaces. IsOver_clauseContext() } type Over_clauseContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyOver_clauseContext() *Over_clauseContext { var p = new(Over_clauseContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_over_clause return p } func (s *Over_clauseContext) GetParser() antlr.Parser { return s.parser } func (s *Over_clauseContext) OVER_() antlr.TerminalNode { return s.GetToken(SQLiteParserOVER_, 0) } func (s *Over_clauseContext) Window_name() IWindow_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IWindow_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IWindow_nameContext) } func (s *Over_clauseContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Over_clauseContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Over_clauseContext) Base_window_name() IBase_window_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IBase_window_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IBase_window_nameContext) } func (s *Over_clauseContext) PARTITION_() antlr.TerminalNode { return s.GetToken(SQLiteParserPARTITION_, 0) } func (s *Over_clauseContext) AllBY_() []antlr.TerminalNode { return s.GetTokens(SQLiteParserBY_) } func (s *Over_clauseContext) BY_(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserBY_, i) } func (s *Over_clauseContext) 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 *Over_clauseContext) 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 *Over_clauseContext) ORDER_() antlr.TerminalNode { return s.GetToken(SQLiteParserORDER_, 0) } func (s *Over_clauseContext) AllOrdering_term() []IOrdering_termContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IOrdering_termContext); ok { len++ } } tst := make([]IOrdering_termContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IOrdering_termContext); ok { tst[i] = t.(IOrdering_termContext) i++ } } return tst } func (s *Over_clauseContext) Ordering_term(i int) IOrdering_termContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOrdering_termContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IOrdering_termContext) } func (s *Over_clauseContext) Frame_spec() IFrame_specContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IFrame_specContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IFrame_specContext) } func (s *Over_clauseContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Over_clauseContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Over_clauseContext) GetRuleContext() antlr.RuleContext { return s } func (s *Over_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Over_clauseContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterOver_clause(s) } } func (s *Over_clauseContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitOver_clause(s) } } func (p *SQLiteParser) Over_clause() (localctx IOver_clauseContext) { localctx = NewOver_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 120, SQLiteParserRULE_over_clause) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1781) p.Match(SQLiteParserOVER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1815) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 270, p.GetParserRuleContext()) { case 1: { p.SetState(1782) p.Window_name() } case 2: { p.SetState(1783) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1785) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 264, p.GetParserRuleContext()) == 1 { { p.SetState(1784) p.Base_window_name() } } else if p.HasError() { // JIM goto errorExit } p.SetState(1797) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { p.SetState(1787) p.Match(SQLiteParserPARTITION_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1788) p.Match(SQLiteParserBY_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1789) p.expr(0) } p.SetState(1794) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1790) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1791) p.expr(0) } p.SetState(1796) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } } p.SetState(1809) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserORDER_ { { p.SetState(1799) p.Match(SQLiteParserORDER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1800) p.Match(SQLiteParserBY_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1801) p.Ordering_term() } p.SetState(1806) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1802) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1803) p.Ordering_term() } p.SetState(1808) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } } p.SetState(1812) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 { { p.SetState(1811) p.Frame_spec() } } { 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. type IFrame_specContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Frame_clause() IFrame_clauseContext EXCLUDE_() antlr.TerminalNode CURRENT_() antlr.TerminalNode ROW_() antlr.TerminalNode GROUP_() antlr.TerminalNode TIES_() antlr.TerminalNode NO_() antlr.TerminalNode OTHERS_() antlr.TerminalNode // IsFrame_specContext differentiates from other interfaces. IsFrame_specContext() } type Frame_specContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFrame_specContext() *Frame_specContext { var p = new(Frame_specContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_frame_spec return p } func (s *Frame_specContext) GetParser() antlr.Parser { return s.parser } func (s *Frame_specContext) Frame_clause() IFrame_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IFrame_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IFrame_clauseContext) } func (s *Frame_specContext) EXCLUDE_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXCLUDE_, 0) } func (s *Frame_specContext) CURRENT_() antlr.TerminalNode { return s.GetToken(SQLiteParserCURRENT_, 0) } func (s *Frame_specContext) ROW_() antlr.TerminalNode { return s.GetToken(SQLiteParserROW_, 0) } func (s *Frame_specContext) GROUP_() antlr.TerminalNode { return s.GetToken(SQLiteParserGROUP_, 0) } func (s *Frame_specContext) TIES_() antlr.TerminalNode { return s.GetToken(SQLiteParserTIES_, 0) } func (s *Frame_specContext) NO_() antlr.TerminalNode { return s.GetToken(SQLiteParserNO_, 0) } func (s *Frame_specContext) OTHERS_() antlr.TerminalNode { return s.GetToken(SQLiteParserOTHERS_, 0) } func (s *Frame_specContext) GetRuleContext() antlr.RuleContext { return s } func (s *Frame_specContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Frame_specContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterFrame_spec(s) } } func (s *Frame_specContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitFrame_spec(s) } } func (p *SQLiteParser) Frame_spec() (localctx IFrame_specContext) { localctx = NewFrame_specContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 122, SQLiteParserRULE_frame_spec) p.EnterOuterAlt(localctx, 1) { p.SetState(1817) p.Frame_clause() } p.SetState(1825) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetTokenStream().LA(1) { case SQLiteParserEXCLUDE_: { p.SetState(1818) p.Match(SQLiteParserEXCLUDE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1819) p.Match(SQLiteParserNO_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1820) p.Match(SQLiteParserOTHERS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserCURRENT_: { p.SetState(1821) p.Match(SQLiteParserCURRENT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1822) p.Match(SQLiteParserROW_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserGROUP_: { p.SetState(1823) p.Match(SQLiteParserGROUP_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserTIES_: { p.SetState(1824) p.Match(SQLiteParserTIES_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserCLOSE_PAR: 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. type IFrame_clauseContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures RANGE_() antlr.TerminalNode ROWS_() antlr.TerminalNode GROUPS_() antlr.TerminalNode Frame_single() IFrame_singleContext BETWEEN_() antlr.TerminalNode Frame_left() IFrame_leftContext AND_() antlr.TerminalNode Frame_right() IFrame_rightContext // IsFrame_clauseContext differentiates from other interfaces. IsFrame_clauseContext() } type Frame_clauseContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFrame_clauseContext() *Frame_clauseContext { var p = new(Frame_clauseContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_frame_clause return p } func (s *Frame_clauseContext) GetParser() antlr.Parser { return s.parser } func (s *Frame_clauseContext) RANGE_() antlr.TerminalNode { return s.GetToken(SQLiteParserRANGE_, 0) } func (s *Frame_clauseContext) ROWS_() antlr.TerminalNode { return s.GetToken(SQLiteParserROWS_, 0) } func (s *Frame_clauseContext) GROUPS_() antlr.TerminalNode { return s.GetToken(SQLiteParserGROUPS_, 0) } func (s *Frame_clauseContext) Frame_single() IFrame_singleContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IFrame_singleContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IFrame_singleContext) } func (s *Frame_clauseContext) BETWEEN_() antlr.TerminalNode { return s.GetToken(SQLiteParserBETWEEN_, 0) } func (s *Frame_clauseContext) Frame_left() IFrame_leftContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IFrame_leftContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IFrame_leftContext) } func (s *Frame_clauseContext) AND_() antlr.TerminalNode { return s.GetToken(SQLiteParserAND_, 0) } func (s *Frame_clauseContext) Frame_right() IFrame_rightContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IFrame_rightContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IFrame_rightContext) } func (s *Frame_clauseContext) GetRuleContext() antlr.RuleContext { return s } func (s *Frame_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Frame_clauseContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterFrame_clause(s) } } func (s *Frame_clauseContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitFrame_clause(s) } } func (p *SQLiteParser) Frame_clause() (localctx IFrame_clauseContext) { localctx = NewFrame_clauseContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 124, SQLiteParserRULE_frame_clause) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1827) _la = p.GetTokenStream().LA(1) 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(1834) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 272, p.GetParserRuleContext()) { case 1: { p.SetState(1828) p.Frame_single() } case 2: { p.SetState(1829) p.Match(SQLiteParserBETWEEN_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1830) p.Frame_left() } { p.SetState(1831) p.Match(SQLiteParserAND_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { 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. type ISimple_function_invocationContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Simple_func() ISimple_funcContext OPEN_PAR() antlr.TerminalNode CLOSE_PAR() antlr.TerminalNode AllExpr() []IExprContext Expr(i int) IExprContext STAR() antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsSimple_function_invocationContext differentiates from other interfaces. IsSimple_function_invocationContext() } type Simple_function_invocationContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySimple_function_invocationContext() *Simple_function_invocationContext { var p = new(Simple_function_invocationContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_simple_function_invocation return p } func (s *Simple_function_invocationContext) GetParser() antlr.Parser { return s.parser } func (s *Simple_function_invocationContext) Simple_func() ISimple_funcContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISimple_funcContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISimple_funcContext) } func (s *Simple_function_invocationContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Simple_function_invocationContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Simple_function_invocationContext) 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 *Simple_function_invocationContext) 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 *Simple_function_invocationContext) STAR() antlr.TerminalNode { return s.GetToken(SQLiteParserSTAR, 0) } func (s *Simple_function_invocationContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Simple_function_invocationContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Simple_function_invocationContext) GetRuleContext() antlr.RuleContext { return s } func (s *Simple_function_invocationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Simple_function_invocationContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterSimple_function_invocation(s) } } func (s *Simple_function_invocationContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitSimple_function_invocation(s) } } func (p *SQLiteParser) Simple_function_invocation() (localctx ISimple_function_invocationContext) { localctx = NewSimple_function_invocationContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 126, SQLiteParserRULE_simple_function_invocation) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1836) p.Simple_func() } { p.SetState(1837) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } 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(1838) p.expr(0) } p.SetState(1843) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1839) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1840) p.expr(0) } p.SetState(1845) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } case SQLiteParserSTAR: { p.SetState(1846) p.Match(SQLiteParserSTAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } default: p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) goto errorExit } { 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. type IAggregate_function_invocationContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Aggregate_func() IAggregate_funcContext OPEN_PAR() antlr.TerminalNode CLOSE_PAR() antlr.TerminalNode AllExpr() []IExprContext Expr(i int) IExprContext STAR() antlr.TerminalNode Filter_clause() IFilter_clauseContext DISTINCT_() antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsAggregate_function_invocationContext differentiates from other interfaces. IsAggregate_function_invocationContext() } type Aggregate_function_invocationContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyAggregate_function_invocationContext() *Aggregate_function_invocationContext { var p = new(Aggregate_function_invocationContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_aggregate_function_invocation return p } func (s *Aggregate_function_invocationContext) GetParser() antlr.Parser { return s.parser } func (s *Aggregate_function_invocationContext) Aggregate_func() IAggregate_funcContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAggregate_funcContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAggregate_funcContext) } func (s *Aggregate_function_invocationContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Aggregate_function_invocationContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Aggregate_function_invocationContext) 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 *Aggregate_function_invocationContext) 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 *Aggregate_function_invocationContext) STAR() antlr.TerminalNode { return s.GetToken(SQLiteParserSTAR, 0) } func (s *Aggregate_function_invocationContext) Filter_clause() IFilter_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IFilter_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IFilter_clauseContext) } func (s *Aggregate_function_invocationContext) DISTINCT_() antlr.TerminalNode { return s.GetToken(SQLiteParserDISTINCT_, 0) } func (s *Aggregate_function_invocationContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Aggregate_function_invocationContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Aggregate_function_invocationContext) GetRuleContext() antlr.RuleContext { return s } func (s *Aggregate_function_invocationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Aggregate_function_invocationContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterAggregate_function_invocation(s) } } func (s *Aggregate_function_invocationContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitAggregate_function_invocation(s) } } func (p *SQLiteParser) Aggregate_function_invocation() (localctx IAggregate_function_invocationContext) { localctx = NewAggregate_function_invocationContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 128, SQLiteParserRULE_aggregate_function_invocation) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1851) p.Aggregate_func() } { p.SetState(1852) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } 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(1854) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 275, p.GetParserRuleContext()) == 1 { { p.SetState(1853) p.Match(SQLiteParserDISTINCT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } else if p.HasError() { // JIM goto errorExit } { p.SetState(1856) p.expr(0) } p.SetState(1861) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1857) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1858) p.expr(0) } p.SetState(1863) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } case SQLiteParserSTAR: { p.SetState(1864) p.Match(SQLiteParserSTAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserCLOSE_PAR: default: } { p.SetState(1867) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1869) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserFILTER_ { { 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. type IWindow_function_invocationContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Window_function() IWindow_functionContext OPEN_PAR() antlr.TerminalNode CLOSE_PAR() antlr.TerminalNode OVER_() antlr.TerminalNode Window_defn() IWindow_defnContext Window_name() IWindow_nameContext AllExpr() []IExprContext Expr(i int) IExprContext STAR() antlr.TerminalNode Filter_clause() IFilter_clauseContext AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsWindow_function_invocationContext differentiates from other interfaces. IsWindow_function_invocationContext() } type Window_function_invocationContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyWindow_function_invocationContext() *Window_function_invocationContext { var p = new(Window_function_invocationContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_window_function_invocation return p } func (s *Window_function_invocationContext) GetParser() antlr.Parser { return s.parser } func (s *Window_function_invocationContext) Window_function() IWindow_functionContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IWindow_functionContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IWindow_functionContext) } func (s *Window_function_invocationContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Window_function_invocationContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Window_function_invocationContext) OVER_() antlr.TerminalNode { return s.GetToken(SQLiteParserOVER_, 0) } func (s *Window_function_invocationContext) Window_defn() IWindow_defnContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IWindow_defnContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IWindow_defnContext) } func (s *Window_function_invocationContext) Window_name() IWindow_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IWindow_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IWindow_nameContext) } func (s *Window_function_invocationContext) 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 *Window_function_invocationContext) 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 *Window_function_invocationContext) STAR() antlr.TerminalNode { return s.GetToken(SQLiteParserSTAR, 0) } func (s *Window_function_invocationContext) Filter_clause() IFilter_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IFilter_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IFilter_clauseContext) } func (s *Window_function_invocationContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Window_function_invocationContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Window_function_invocationContext) GetRuleContext() antlr.RuleContext { return s } func (s *Window_function_invocationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Window_function_invocationContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterWindow_function_invocation(s) } } func (s *Window_function_invocationContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitWindow_function_invocation(s) } } func (p *SQLiteParser) Window_function_invocation() (localctx IWindow_function_invocationContext) { localctx = NewWindow_function_invocationContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 130, SQLiteParserRULE_window_function_invocation) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1871) p.Window_function() } { p.SetState(1872) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } 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(1873) p.expr(0) } p.SetState(1878) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1874) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1875) p.expr(0) } p.SetState(1880) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) } case SQLiteParserSTAR: { p.SetState(1881) p.Match(SQLiteParserSTAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserCLOSE_PAR: default: } { p.SetState(1884) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1886) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserFILTER_ { { p.SetState(1885) p.Filter_clause() } } { p.SetState(1888) p.Match(SQLiteParserOVER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1891) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 282, p.GetParserRuleContext()) { case 1: { p.SetState(1889) p.Window_defn() } case 2: { 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. type ICommon_table_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures WITH_() antlr.TerminalNode AllCommon_table_expression() []ICommon_table_expressionContext Common_table_expression(i int) ICommon_table_expressionContext RECURSIVE_() antlr.TerminalNode AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsCommon_table_stmtContext differentiates from other interfaces. IsCommon_table_stmtContext() } type Common_table_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCommon_table_stmtContext() *Common_table_stmtContext { var p = new(Common_table_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_common_table_stmt return p } func (s *Common_table_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Common_table_stmtContext) WITH_() antlr.TerminalNode { return s.GetToken(SQLiteParserWITH_, 0) } func (s *Common_table_stmtContext) AllCommon_table_expression() []ICommon_table_expressionContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(ICommon_table_expressionContext); ok { len++ } } tst := make([]ICommon_table_expressionContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(ICommon_table_expressionContext); ok { tst[i] = t.(ICommon_table_expressionContext) i++ } } return tst } func (s *Common_table_stmtContext) Common_table_expression(i int) ICommon_table_expressionContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICommon_table_expressionContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(ICommon_table_expressionContext) } func (s *Common_table_stmtContext) RECURSIVE_() antlr.TerminalNode { return s.GetToken(SQLiteParserRECURSIVE_, 0) } func (s *Common_table_stmtContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Common_table_stmtContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Common_table_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Common_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Common_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterCommon_table_stmt(s) } } func (s *Common_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitCommon_table_stmt(s) } } func (p *SQLiteParser) Common_table_stmt() (localctx ICommon_table_stmtContext) { localctx = NewCommon_table_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 132, SQLiteParserRULE_common_table_stmt) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1893) p.Match(SQLiteParserWITH_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1895) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 283, p.GetParserRuleContext()) == 1 { { p.SetState(1894) p.Match(SQLiteParserRECURSIVE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } } else if p.HasError() { // JIM goto errorExit } { p.SetState(1897) p.Common_table_expression() } p.SetState(1902) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1898) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1899) p.Common_table_expression() } 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. type IOrder_by_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures ORDER_() antlr.TerminalNode BY_() antlr.TerminalNode AllOrdering_term() []IOrdering_termContext Ordering_term(i int) IOrdering_termContext AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsOrder_by_stmtContext differentiates from other interfaces. IsOrder_by_stmtContext() } type Order_by_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyOrder_by_stmtContext() *Order_by_stmtContext { var p = new(Order_by_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_order_by_stmt return p } func (s *Order_by_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Order_by_stmtContext) ORDER_() antlr.TerminalNode { return s.GetToken(SQLiteParserORDER_, 0) } func (s *Order_by_stmtContext) BY_() antlr.TerminalNode { return s.GetToken(SQLiteParserBY_, 0) } func (s *Order_by_stmtContext) AllOrdering_term() []IOrdering_termContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IOrdering_termContext); ok { len++ } } tst := make([]IOrdering_termContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IOrdering_termContext); ok { tst[i] = t.(IOrdering_termContext) i++ } } return tst } func (s *Order_by_stmtContext) Ordering_term(i int) IOrdering_termContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOrdering_termContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IOrdering_termContext) } func (s *Order_by_stmtContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Order_by_stmtContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Order_by_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Order_by_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Order_by_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterOrder_by_stmt(s) } } func (s *Order_by_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitOrder_by_stmt(s) } } func (p *SQLiteParser) Order_by_stmt() (localctx IOrder_by_stmtContext) { localctx = NewOrder_by_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 134, SQLiteParserRULE_order_by_stmt) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1905) p.Match(SQLiteParserORDER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1906) p.Match(SQLiteParserBY_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1907) p.Ordering_term() } p.SetState(1912) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(1908) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1909) p.Ordering_term() } 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. type ILimit_stmtContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures LIMIT_() antlr.TerminalNode AllExpr() []IExprContext Expr(i int) IExprContext OFFSET_() antlr.TerminalNode COMMA() antlr.TerminalNode // IsLimit_stmtContext differentiates from other interfaces. IsLimit_stmtContext() } type Limit_stmtContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyLimit_stmtContext() *Limit_stmtContext { var p = new(Limit_stmtContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_limit_stmt return p } func (s *Limit_stmtContext) GetParser() antlr.Parser { return s.parser } func (s *Limit_stmtContext) LIMIT_() antlr.TerminalNode { return s.GetToken(SQLiteParserLIMIT_, 0) } func (s *Limit_stmtContext) 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 *Limit_stmtContext) 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 *Limit_stmtContext) OFFSET_() antlr.TerminalNode { return s.GetToken(SQLiteParserOFFSET_, 0) } func (s *Limit_stmtContext) COMMA() antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, 0) } func (s *Limit_stmtContext) GetRuleContext() antlr.RuleContext { return s } func (s *Limit_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Limit_stmtContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterLimit_stmt(s) } } func (s *Limit_stmtContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitLimit_stmt(s) } } func (p *SQLiteParser) Limit_stmt() (localctx ILimit_stmtContext) { localctx = NewLimit_stmtContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 136, SQLiteParserRULE_limit_stmt) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1915) p.Match(SQLiteParserLIMIT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1916) p.expr(0) } p.SetState(1919) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserCOMMA || _la == SQLiteParserOFFSET_ { { p.SetState(1917) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserCOMMA || _la == SQLiteParserOFFSET_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } { 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. type IOrdering_termContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Expr() IExprContext COLLATE_() antlr.TerminalNode Collation_name() ICollation_nameContext Asc_desc() IAsc_descContext NULLS_() antlr.TerminalNode FIRST_() antlr.TerminalNode LAST_() antlr.TerminalNode // IsOrdering_termContext differentiates from other interfaces. IsOrdering_termContext() } type Ordering_termContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyOrdering_termContext() *Ordering_termContext { var p = new(Ordering_termContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_ordering_term return p } func (s *Ordering_termContext) GetParser() antlr.Parser { return s.parser } func (s *Ordering_termContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Ordering_termContext) COLLATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCOLLATE_, 0) } func (s *Ordering_termContext) Collation_name() ICollation_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ICollation_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ICollation_nameContext) } func (s *Ordering_termContext) Asc_desc() IAsc_descContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAsc_descContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAsc_descContext) } func (s *Ordering_termContext) NULLS_() antlr.TerminalNode { return s.GetToken(SQLiteParserNULLS_, 0) } func (s *Ordering_termContext) FIRST_() antlr.TerminalNode { return s.GetToken(SQLiteParserFIRST_, 0) } func (s *Ordering_termContext) LAST_() antlr.TerminalNode { return s.GetToken(SQLiteParserLAST_, 0) } func (s *Ordering_termContext) GetRuleContext() antlr.RuleContext { return s } func (s *Ordering_termContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Ordering_termContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterOrdering_term(s) } } func (s *Ordering_termContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitOrdering_term(s) } } func (p *SQLiteParser) Ordering_term() (localctx IOrdering_termContext) { localctx = NewOrdering_termContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 138, SQLiteParserRULE_ordering_term) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1921) p.expr(0) } p.SetState(1924) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserCOLLATE_ { { p.SetState(1922) p.Match(SQLiteParserCOLLATE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1923) p.Collation_name() } } p.SetState(1927) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ { { p.SetState(1926) p.Asc_desc() } } p.SetState(1931) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserNULLS_ { { p.SetState(1929) p.Match(SQLiteParserNULLS_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1930) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserFIRST_ || _la == SQLiteParserLAST_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } } 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. type IAsc_descContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures ASC_() antlr.TerminalNode DESC_() antlr.TerminalNode // IsAsc_descContext differentiates from other interfaces. IsAsc_descContext() } type Asc_descContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyAsc_descContext() *Asc_descContext { var p = new(Asc_descContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_asc_desc return p } func (s *Asc_descContext) GetParser() antlr.Parser { return s.parser } func (s *Asc_descContext) ASC_() antlr.TerminalNode { return s.GetToken(SQLiteParserASC_, 0) } func (s *Asc_descContext) DESC_() antlr.TerminalNode { return s.GetToken(SQLiteParserDESC_, 0) } func (s *Asc_descContext) GetRuleContext() antlr.RuleContext { return s } func (s *Asc_descContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Asc_descContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterAsc_desc(s) } } func (s *Asc_descContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitAsc_desc(s) } } func (p *SQLiteParser) Asc_desc() (localctx IAsc_descContext) { localctx = NewAsc_descContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 140, SQLiteParserRULE_asc_desc) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(1933) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserASC_ || _la == SQLiteParserDESC_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } 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. type IFrame_leftContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Expr() IExprContext PRECEDING_() antlr.TerminalNode FOLLOWING_() antlr.TerminalNode CURRENT_() antlr.TerminalNode ROW_() antlr.TerminalNode UNBOUNDED_() antlr.TerminalNode // IsFrame_leftContext differentiates from other interfaces. IsFrame_leftContext() } type Frame_leftContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFrame_leftContext() *Frame_leftContext { var p = new(Frame_leftContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_frame_left return p } func (s *Frame_leftContext) GetParser() antlr.Parser { return s.parser } func (s *Frame_leftContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Frame_leftContext) PRECEDING_() antlr.TerminalNode { return s.GetToken(SQLiteParserPRECEDING_, 0) } func (s *Frame_leftContext) FOLLOWING_() antlr.TerminalNode { return s.GetToken(SQLiteParserFOLLOWING_, 0) } func (s *Frame_leftContext) CURRENT_() antlr.TerminalNode { return s.GetToken(SQLiteParserCURRENT_, 0) } func (s *Frame_leftContext) ROW_() antlr.TerminalNode { return s.GetToken(SQLiteParserROW_, 0) } func (s *Frame_leftContext) UNBOUNDED_() antlr.TerminalNode { return s.GetToken(SQLiteParserUNBOUNDED_, 0) } func (s *Frame_leftContext) GetRuleContext() antlr.RuleContext { return s } func (s *Frame_leftContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Frame_leftContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterFrame_left(s) } } func (s *Frame_leftContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitFrame_left(s) } } func (p *SQLiteParser) Frame_left() (localctx IFrame_leftContext) { localctx = NewFrame_leftContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 142, SQLiteParserRULE_frame_left) p.SetState(1945) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 290, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { p.SetState(1935) p.expr(0) } { p.SetState(1936) p.Match(SQLiteParserPRECEDING_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 2: p.EnterOuterAlt(localctx, 2) { p.SetState(1938) p.expr(0) } { p.SetState(1939) p.Match(SQLiteParserFOLLOWING_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 3: p.EnterOuterAlt(localctx, 3) { p.SetState(1941) p.Match(SQLiteParserCURRENT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1942) p.Match(SQLiteParserROW_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 4: p.EnterOuterAlt(localctx, 4) { p.SetState(1943) p.Match(SQLiteParserUNBOUNDED_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { 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. type IFrame_rightContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Expr() IExprContext PRECEDING_() antlr.TerminalNode FOLLOWING_() antlr.TerminalNode CURRENT_() antlr.TerminalNode ROW_() antlr.TerminalNode UNBOUNDED_() antlr.TerminalNode // IsFrame_rightContext differentiates from other interfaces. IsFrame_rightContext() } type Frame_rightContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFrame_rightContext() *Frame_rightContext { var p = new(Frame_rightContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_frame_right return p } func (s *Frame_rightContext) GetParser() antlr.Parser { return s.parser } func (s *Frame_rightContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Frame_rightContext) PRECEDING_() antlr.TerminalNode { return s.GetToken(SQLiteParserPRECEDING_, 0) } func (s *Frame_rightContext) FOLLOWING_() antlr.TerminalNode { return s.GetToken(SQLiteParserFOLLOWING_, 0) } func (s *Frame_rightContext) CURRENT_() antlr.TerminalNode { return s.GetToken(SQLiteParserCURRENT_, 0) } func (s *Frame_rightContext) ROW_() antlr.TerminalNode { return s.GetToken(SQLiteParserROW_, 0) } func (s *Frame_rightContext) UNBOUNDED_() antlr.TerminalNode { return s.GetToken(SQLiteParserUNBOUNDED_, 0) } func (s *Frame_rightContext) GetRuleContext() antlr.RuleContext { return s } func (s *Frame_rightContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Frame_rightContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterFrame_right(s) } } func (s *Frame_rightContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitFrame_right(s) } } func (p *SQLiteParser) Frame_right() (localctx IFrame_rightContext) { localctx = NewFrame_rightContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 144, SQLiteParserRULE_frame_right) p.SetState(1957) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 291, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { p.SetState(1947) p.expr(0) } { p.SetState(1948) p.Match(SQLiteParserPRECEDING_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 2: p.EnterOuterAlt(localctx, 2) { p.SetState(1950) p.expr(0) } { p.SetState(1951) p.Match(SQLiteParserFOLLOWING_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 3: p.EnterOuterAlt(localctx, 3) { p.SetState(1953) p.Match(SQLiteParserCURRENT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1954) p.Match(SQLiteParserROW_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 4: p.EnterOuterAlt(localctx, 4) { p.SetState(1955) p.Match(SQLiteParserUNBOUNDED_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { 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. type IFrame_singleContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Expr() IExprContext PRECEDING_() antlr.TerminalNode UNBOUNDED_() antlr.TerminalNode CURRENT_() antlr.TerminalNode ROW_() antlr.TerminalNode // IsFrame_singleContext differentiates from other interfaces. IsFrame_singleContext() } type Frame_singleContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFrame_singleContext() *Frame_singleContext { var p = new(Frame_singleContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_frame_single return p } func (s *Frame_singleContext) GetParser() antlr.Parser { return s.parser } func (s *Frame_singleContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Frame_singleContext) PRECEDING_() antlr.TerminalNode { return s.GetToken(SQLiteParserPRECEDING_, 0) } func (s *Frame_singleContext) UNBOUNDED_() antlr.TerminalNode { return s.GetToken(SQLiteParserUNBOUNDED_, 0) } func (s *Frame_singleContext) CURRENT_() antlr.TerminalNode { return s.GetToken(SQLiteParserCURRENT_, 0) } func (s *Frame_singleContext) ROW_() antlr.TerminalNode { return s.GetToken(SQLiteParserROW_, 0) } func (s *Frame_singleContext) GetRuleContext() antlr.RuleContext { return s } func (s *Frame_singleContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Frame_singleContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterFrame_single(s) } } func (s *Frame_singleContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitFrame_single(s) } } func (p *SQLiteParser) Frame_single() (localctx IFrame_singleContext) { localctx = NewFrame_singleContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 146, SQLiteParserRULE_frame_single) p.SetState(1966) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 292, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { p.SetState(1959) p.expr(0) } { p.SetState(1960) p.Match(SQLiteParserPRECEDING_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 2: p.EnterOuterAlt(localctx, 2) { p.SetState(1962) p.Match(SQLiteParserUNBOUNDED_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1963) p.Match(SQLiteParserPRECEDING_) if p.HasError() { // Recognition error - abort rule goto errorExit } } case 3: p.EnterOuterAlt(localctx, 3) { p.SetState(1964) p.Match(SQLiteParserCURRENT_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { 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. type IWindow_functionContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures AllOPEN_PAR() []antlr.TerminalNode OPEN_PAR(i int) antlr.TerminalNode Expr() IExprContext AllCLOSE_PAR() []antlr.TerminalNode CLOSE_PAR(i int) antlr.TerminalNode OVER_() antlr.TerminalNode Order_by_expr_asc_desc() IOrder_by_expr_asc_descContext FIRST_VALUE_() antlr.TerminalNode LAST_VALUE_() antlr.TerminalNode Partition_by() IPartition_byContext Frame_clause() IFrame_clauseContext CUME_DIST_() antlr.TerminalNode PERCENT_RANK_() antlr.TerminalNode Order_by_expr() IOrder_by_exprContext DENSE_RANK_() antlr.TerminalNode RANK_() antlr.TerminalNode ROW_NUMBER_() antlr.TerminalNode LAG_() antlr.TerminalNode LEAD_() antlr.TerminalNode Of_OF_fset() IOf_OF_fsetContext Default_DEFAULT__value() IDefault_DEFAULT__valueContext NTH_VALUE_() antlr.TerminalNode COMMA() antlr.TerminalNode Signed_number() ISigned_numberContext NTILE_() antlr.TerminalNode // IsWindow_functionContext differentiates from other interfaces. IsWindow_functionContext() } type Window_functionContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyWindow_functionContext() *Window_functionContext { var p = new(Window_functionContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_window_function return p } func (s *Window_functionContext) GetParser() antlr.Parser { return s.parser } func (s *Window_functionContext) AllOPEN_PAR() []antlr.TerminalNode { return s.GetTokens(SQLiteParserOPEN_PAR) } func (s *Window_functionContext) OPEN_PAR(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, i) } func (s *Window_functionContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Window_functionContext) AllCLOSE_PAR() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCLOSE_PAR) } func (s *Window_functionContext) CLOSE_PAR(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, i) } func (s *Window_functionContext) OVER_() antlr.TerminalNode { return s.GetToken(SQLiteParserOVER_, 0) } func (s *Window_functionContext) Order_by_expr_asc_desc() IOrder_by_expr_asc_descContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOrder_by_expr_asc_descContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IOrder_by_expr_asc_descContext) } func (s *Window_functionContext) FIRST_VALUE_() antlr.TerminalNode { return s.GetToken(SQLiteParserFIRST_VALUE_, 0) } func (s *Window_functionContext) LAST_VALUE_() antlr.TerminalNode { return s.GetToken(SQLiteParserLAST_VALUE_, 0) } func (s *Window_functionContext) Partition_by() IPartition_byContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IPartition_byContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IPartition_byContext) } func (s *Window_functionContext) Frame_clause() IFrame_clauseContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IFrame_clauseContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IFrame_clauseContext) } func (s *Window_functionContext) CUME_DIST_() antlr.TerminalNode { return s.GetToken(SQLiteParserCUME_DIST_, 0) } func (s *Window_functionContext) PERCENT_RANK_() antlr.TerminalNode { return s.GetToken(SQLiteParserPERCENT_RANK_, 0) } func (s *Window_functionContext) Order_by_expr() IOrder_by_exprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOrder_by_exprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IOrder_by_exprContext) } func (s *Window_functionContext) DENSE_RANK_() antlr.TerminalNode { return s.GetToken(SQLiteParserDENSE_RANK_, 0) } func (s *Window_functionContext) RANK_() antlr.TerminalNode { return s.GetToken(SQLiteParserRANK_, 0) } func (s *Window_functionContext) ROW_NUMBER_() antlr.TerminalNode { return s.GetToken(SQLiteParserROW_NUMBER_, 0) } func (s *Window_functionContext) LAG_() antlr.TerminalNode { return s.GetToken(SQLiteParserLAG_, 0) } func (s *Window_functionContext) LEAD_() antlr.TerminalNode { return s.GetToken(SQLiteParserLEAD_, 0) } func (s *Window_functionContext) Of_OF_fset() IOf_OF_fsetContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOf_OF_fsetContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IOf_OF_fsetContext) } func (s *Window_functionContext) Default_DEFAULT__value() IDefault_DEFAULT__valueContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IDefault_DEFAULT__valueContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IDefault_DEFAULT__valueContext) } func (s *Window_functionContext) NTH_VALUE_() antlr.TerminalNode { return s.GetToken(SQLiteParserNTH_VALUE_, 0) } func (s *Window_functionContext) COMMA() antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, 0) } func (s *Window_functionContext) Signed_number() ISigned_numberContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISigned_numberContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISigned_numberContext) } func (s *Window_functionContext) NTILE_() antlr.TerminalNode { return s.GetToken(SQLiteParserNTILE_, 0) } func (s *Window_functionContext) GetRuleContext() antlr.RuleContext { return s } func (s *Window_functionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Window_functionContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterWindow_function(s) } } func (s *Window_functionContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitWindow_function(s) } } func (p *SQLiteParser) Window_function() (localctx IWindow_functionContext) { localctx = NewWindow_functionContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 148, SQLiteParserRULE_window_function) var _la int 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(1968) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserFIRST_VALUE_ || _la == SQLiteParserLAST_VALUE_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } { p.SetState(1969) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1970) p.expr(0) } { p.SetState(1971) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1972) p.Match(SQLiteParserOVER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1973) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1975) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { p.SetState(1974) p.Partition_by() } } { p.SetState(1977) p.Order_by_expr_asc_desc() } p.SetState(1979) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 { { p.SetState(1978) p.Frame_clause() } } { 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(1983) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserCUME_DIST_ || _la == SQLiteParserPERCENT_RANK_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } { p.SetState(1984) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1985) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1986) p.Match(SQLiteParserOVER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1987) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(1989) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { p.SetState(1988) p.Partition_by() } } p.SetState(1992) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserORDER_ { { p.SetState(1991) p.Order_by_expr() } } { 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(1995) _la = p.GetTokenStream().LA(1) if !((int64((_la-163)) & ^0x3f) == 0 && ((int64(1)<<(_la-163))&385) != 0) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } { p.SetState(1996) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1997) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1998) p.Match(SQLiteParserOVER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(1999) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(2001) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { p.SetState(2000) p.Partition_by() } } { p.SetState(2003) p.Order_by_expr_asc_desc() } { 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(2006) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserLAG_ || _la == SQLiteParserLEAD_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } { p.SetState(2007) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2008) p.expr(0) } p.SetState(2010) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 298, p.GetParserRuleContext()) == 1 { { p.SetState(2009) p.Of_OF_fset() } } else if p.HasError() { // JIM goto errorExit } p.SetState(2013) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserCOMMA { { p.SetState(2012) p.Default_DEFAULT__value() } } { p.SetState(2015) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2016) p.Match(SQLiteParserOVER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2017) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(2019) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { p.SetState(2018) p.Partition_by() } } { p.SetState(2021) p.Order_by_expr_asc_desc() } { 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(2024) p.Match(SQLiteParserNTH_VALUE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2025) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2026) p.expr(0) } { p.SetState(2027) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2028) p.Signed_number() } { p.SetState(2029) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2030) p.Match(SQLiteParserOVER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2031) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(2033) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { p.SetState(2032) p.Partition_by() } } { p.SetState(2035) p.Order_by_expr_asc_desc() } p.SetState(2037) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 { { p.SetState(2036) p.Frame_clause() } } { p.SetState(2039) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } case SQLiteParserNTILE_: p.EnterOuterAlt(localctx, 6) { p.SetState(2041) p.Match(SQLiteParserNTILE_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2042) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2043) p.expr(0) } { p.SetState(2044) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2045) p.Match(SQLiteParserOVER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2046) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(2048) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserPARTITION_ { { p.SetState(2047) p.Partition_by() } } { p.SetState(2050) p.Order_by_expr_asc_desc() } { p.SetState(2051) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } default: 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. type IOf_OF_fsetContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures COMMA() antlr.TerminalNode Signed_number() ISigned_numberContext // IsOf_OF_fsetContext differentiates from other interfaces. IsOf_OF_fsetContext() } type Of_OF_fsetContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyOf_OF_fsetContext() *Of_OF_fsetContext { var p = new(Of_OF_fsetContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_of_OF_fset return p } func (s *Of_OF_fsetContext) GetParser() antlr.Parser { return s.parser } func (s *Of_OF_fsetContext) COMMA() antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, 0) } func (s *Of_OF_fsetContext) Signed_number() ISigned_numberContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISigned_numberContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISigned_numberContext) } func (s *Of_OF_fsetContext) GetRuleContext() antlr.RuleContext { return s } func (s *Of_OF_fsetContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Of_OF_fsetContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterOf_OF_fset(s) } } func (s *Of_OF_fsetContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitOf_OF_fset(s) } } func (p *SQLiteParser) Of_OF_fset() (localctx IOf_OF_fsetContext) { localctx = NewOf_OF_fsetContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 150, SQLiteParserRULE_of_OF_fset) p.EnterOuterAlt(localctx, 1) { p.SetState(2055) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { 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. type IDefault_DEFAULT__valueContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures COMMA() antlr.TerminalNode Signed_number() ISigned_numberContext // IsDefault_DEFAULT__valueContext differentiates from other interfaces. IsDefault_DEFAULT__valueContext() } type Default_DEFAULT__valueContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyDefault_DEFAULT__valueContext() *Default_DEFAULT__valueContext { var p = new(Default_DEFAULT__valueContext) 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 } 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_default_DEFAULT__value return p } func (s *Default_DEFAULT__valueContext) GetParser() antlr.Parser { return s.parser } func (s *Default_DEFAULT__valueContext) COMMA() antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, 0) } func (s *Default_DEFAULT__valueContext) Signed_number() ISigned_numberContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISigned_numberContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISigned_numberContext) } func (s *Default_DEFAULT__valueContext) GetRuleContext() antlr.RuleContext { return s } func (s *Default_DEFAULT__valueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Default_DEFAULT__valueContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterDefault_DEFAULT__value(s) } } func (s *Default_DEFAULT__valueContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitDefault_DEFAULT__value(s) } } func (p *SQLiteParser) Default_DEFAULT__value() (localctx IDefault_DEFAULT__valueContext) { localctx = NewDefault_DEFAULT__valueContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 152, SQLiteParserRULE_default_DEFAULT__value) p.EnterOuterAlt(localctx, 1) { p.SetState(2058) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { 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. type IPartition_byContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures PARTITION_() antlr.TerminalNode BY_() antlr.TerminalNode AllExpr() []IExprContext Expr(i int) IExprContext // IsPartition_byContext differentiates from other interfaces. IsPartition_byContext() } type Partition_byContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyPartition_byContext() *Partition_byContext { var p = new(Partition_byContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_partition_by return p } func (s *Partition_byContext) GetParser() antlr.Parser { return s.parser } func (s *Partition_byContext) PARTITION_() antlr.TerminalNode { return s.GetToken(SQLiteParserPARTITION_, 0) } func (s *Partition_byContext) BY_() antlr.TerminalNode { return s.GetToken(SQLiteParserBY_, 0) } func (s *Partition_byContext) 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 *Partition_byContext) 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 *Partition_byContext) GetRuleContext() antlr.RuleContext { return s } func (s *Partition_byContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Partition_byContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterPartition_by(s) } } func (s *Partition_byContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitPartition_by(s) } } func (p *SQLiteParser) Partition_by() (localctx IPartition_byContext) { localctx = NewPartition_byContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 154, SQLiteParserRULE_partition_by) var _alt int p.EnterOuterAlt(localctx, 1) { p.SetState(2061) p.Match(SQLiteParserPARTITION_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2062) p.Match(SQLiteParserBY_) if p.HasError() { // Recognition error - abort rule goto errorExit } } 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(2063) p.expr(0) } default: p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) goto errorExit } p.SetState(2066) p.GetErrorHandler().Sync(p) _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. type IOrder_by_exprContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures ORDER_() antlr.TerminalNode BY_() antlr.TerminalNode AllExpr() []IExprContext Expr(i int) IExprContext // IsOrder_by_exprContext differentiates from other interfaces. IsOrder_by_exprContext() } type Order_by_exprContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyOrder_by_exprContext() *Order_by_exprContext { var p = new(Order_by_exprContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_order_by_expr return p } func (s *Order_by_exprContext) GetParser() antlr.Parser { return s.parser } func (s *Order_by_exprContext) ORDER_() antlr.TerminalNode { return s.GetToken(SQLiteParserORDER_, 0) } func (s *Order_by_exprContext) BY_() antlr.TerminalNode { return s.GetToken(SQLiteParserBY_, 0) } func (s *Order_by_exprContext) 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 *Order_by_exprContext) 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 *Order_by_exprContext) GetRuleContext() antlr.RuleContext { return s } func (s *Order_by_exprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Order_by_exprContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterOrder_by_expr(s) } } func (s *Order_by_exprContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitOrder_by_expr(s) } } func (p *SQLiteParser) Order_by_expr() (localctx IOrder_by_exprContext) { localctx = NewOrder_by_exprContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 156, SQLiteParserRULE_order_by_expr) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(2068) p.Match(SQLiteParserORDER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2069) p.Match(SQLiteParserBY_) if p.HasError() { // Recognition error - abort rule goto errorExit } } p.SetState(2071) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) 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(2070) p.expr(0) } 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. type IOrder_by_expr_asc_descContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures ORDER_() antlr.TerminalNode BY_() antlr.TerminalNode Order_by_expr_asc_desc() IOrder_by_expr_asc_descContext // IsOrder_by_expr_asc_descContext differentiates from other interfaces. IsOrder_by_expr_asc_descContext() } type Order_by_expr_asc_descContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyOrder_by_expr_asc_descContext() *Order_by_expr_asc_descContext { var p = new(Order_by_expr_asc_descContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_order_by_expr_asc_desc return p } func (s *Order_by_expr_asc_descContext) GetParser() antlr.Parser { return s.parser } func (s *Order_by_expr_asc_descContext) ORDER_() antlr.TerminalNode { return s.GetToken(SQLiteParserORDER_, 0) } func (s *Order_by_expr_asc_descContext) BY_() antlr.TerminalNode { return s.GetToken(SQLiteParserBY_, 0) } func (s *Order_by_expr_asc_descContext) Order_by_expr_asc_desc() IOrder_by_expr_asc_descContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IOrder_by_expr_asc_descContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IOrder_by_expr_asc_descContext) } func (s *Order_by_expr_asc_descContext) GetRuleContext() antlr.RuleContext { return s } func (s *Order_by_expr_asc_descContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Order_by_expr_asc_descContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterOrder_by_expr_asc_desc(s) } } func (s *Order_by_expr_asc_descContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitOrder_by_expr_asc_desc(s) } } func (p *SQLiteParser) Order_by_expr_asc_desc() (localctx IOrder_by_expr_asc_descContext) { localctx = NewOrder_by_expr_asc_descContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 158, SQLiteParserRULE_order_by_expr_asc_desc) p.EnterOuterAlt(localctx, 1) { p.SetState(2075) p.Match(SQLiteParserORDER_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2076) p.Match(SQLiteParserBY_) if p.HasError() { // Recognition error - abort rule goto errorExit } } { 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. type IExpr_asc_descContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures AllExpr() []IExprContext Expr(i int) IExprContext AllAsc_desc() []IAsc_descContext Asc_desc(i int) IAsc_descContext AllCOMMA() []antlr.TerminalNode COMMA(i int) antlr.TerminalNode // IsExpr_asc_descContext differentiates from other interfaces. IsExpr_asc_descContext() } type Expr_asc_descContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyExpr_asc_descContext() *Expr_asc_descContext { var p = new(Expr_asc_descContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_expr_asc_desc return p } func (s *Expr_asc_descContext) GetParser() antlr.Parser { return s.parser } func (s *Expr_asc_descContext) 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_asc_descContext) 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_asc_descContext) AllAsc_desc() []IAsc_descContext { children := s.GetChildren() len := 0 for _, ctx := range children { if _, ok := ctx.(IAsc_descContext); ok { len++ } } tst := make([]IAsc_descContext, len) i := 0 for _, ctx := range children { if t, ok := ctx.(IAsc_descContext); ok { tst[i] = t.(IAsc_descContext) i++ } } return tst } func (s *Expr_asc_descContext) Asc_desc(i int) IAsc_descContext { var t antlr.RuleContext j := 0 for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAsc_descContext); ok { if j == i { t = ctx.(antlr.RuleContext) break } j++ } } if t == nil { return nil } return t.(IAsc_descContext) } func (s *Expr_asc_descContext) AllCOMMA() []antlr.TerminalNode { return s.GetTokens(SQLiteParserCOMMA) } func (s *Expr_asc_descContext) COMMA(i int) antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMA, i) } func (s *Expr_asc_descContext) GetRuleContext() antlr.RuleContext { return s } func (s *Expr_asc_descContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Expr_asc_descContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterExpr_asc_desc(s) } } func (s *Expr_asc_descContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitExpr_asc_desc(s) } } func (p *SQLiteParser) Expr_asc_desc() (localctx IExpr_asc_descContext) { localctx = NewExpr_asc_descContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 160, SQLiteParserRULE_expr_asc_desc) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(2079) p.expr(0) } p.SetState(2081) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ { { p.SetState(2080) p.Asc_desc() } } p.SetState(2090) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) for _la == SQLiteParserCOMMA { { p.SetState(2083) p.Match(SQLiteParserCOMMA) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2084) p.expr(0) } p.SetState(2086) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } _la = p.GetTokenStream().LA(1) if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ { { p.SetState(2085) p.Asc_desc() } } 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. type IInitial_selectContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Select_stmt() ISelect_stmtContext // IsInitial_selectContext differentiates from other interfaces. IsInitial_selectContext() } type Initial_selectContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyInitial_selectContext() *Initial_selectContext { var p = new(Initial_selectContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_initial_select return p } func (s *Initial_selectContext) GetParser() antlr.Parser { return s.parser } func (s *Initial_selectContext) Select_stmt() ISelect_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISelect_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISelect_stmtContext) } func (s *Initial_selectContext) GetRuleContext() antlr.RuleContext { return s } func (s *Initial_selectContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Initial_selectContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterInitial_select(s) } } func (s *Initial_selectContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitInitial_select(s) } } func (p *SQLiteParser) Initial_select() (localctx IInitial_selectContext) { localctx = NewInitial_selectContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 162, SQLiteParserRULE_initial_select) p.EnterOuterAlt(localctx, 1) { 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. type IRecursive__selectContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Select_stmt() ISelect_stmtContext // IsRecursive__selectContext differentiates from other interfaces. IsRecursive__selectContext() } type Recursive__selectContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyRecursive__selectContext() *Recursive__selectContext { var p = new(Recursive__selectContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_recursive__select return p } func (s *Recursive__selectContext) GetParser() antlr.Parser { return s.parser } func (s *Recursive__selectContext) Select_stmt() ISelect_stmtContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISelect_stmtContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISelect_stmtContext) } func (s *Recursive__selectContext) GetRuleContext() antlr.RuleContext { return s } func (s *Recursive__selectContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Recursive__selectContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterRecursive__select(s) } } func (s *Recursive__selectContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitRecursive__select(s) } } func (p *SQLiteParser) Recursive__select() (localctx IRecursive__selectContext) { localctx = NewRecursive__selectContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 164, SQLiteParserRULE_recursive__select) p.EnterOuterAlt(localctx, 1) { 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. type IUnary_operatorContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures MINUS() antlr.TerminalNode PLUS() antlr.TerminalNode TILDE() antlr.TerminalNode NOT_() antlr.TerminalNode // IsUnary_operatorContext differentiates from other interfaces. IsUnary_operatorContext() } type Unary_operatorContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyUnary_operatorContext() *Unary_operatorContext { var p = new(Unary_operatorContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_unary_operator return p } func (s *Unary_operatorContext) GetParser() antlr.Parser { return s.parser } func (s *Unary_operatorContext) MINUS() antlr.TerminalNode { return s.GetToken(SQLiteParserMINUS, 0) } func (s *Unary_operatorContext) PLUS() antlr.TerminalNode { return s.GetToken(SQLiteParserPLUS, 0) } func (s *Unary_operatorContext) TILDE() antlr.TerminalNode { return s.GetToken(SQLiteParserTILDE, 0) } func (s *Unary_operatorContext) NOT_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_, 0) } func (s *Unary_operatorContext) GetRuleContext() antlr.RuleContext { return s } func (s *Unary_operatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Unary_operatorContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterUnary_operator(s) } } func (s *Unary_operatorContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitUnary_operator(s) } } func (p *SQLiteParser) Unary_operator() (localctx IUnary_operatorContext) { localctx = NewUnary_operatorContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 166, SQLiteParserRULE_unary_operator) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(2097) _la = p.GetTokenStream().LA(1) if !(((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&6400) != 0) || _la == SQLiteParserNOT_) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } 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. type IError_messageContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures STRING_LITERAL() antlr.TerminalNode // IsError_messageContext differentiates from other interfaces. IsError_messageContext() } type Error_messageContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyError_messageContext() *Error_messageContext { var p = new(Error_messageContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_error_message return p } func (s *Error_messageContext) GetParser() antlr.Parser { return s.parser } func (s *Error_messageContext) STRING_LITERAL() antlr.TerminalNode { return s.GetToken(SQLiteParserSTRING_LITERAL, 0) } func (s *Error_messageContext) GetRuleContext() antlr.RuleContext { return s } func (s *Error_messageContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Error_messageContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterError_message(s) } } func (s *Error_messageContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitError_message(s) } } func (p *SQLiteParser) Error_message() (localctx IError_messageContext) { localctx = NewError_messageContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 168, SQLiteParserRULE_error_message) p.EnterOuterAlt(localctx, 1) { 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. type IModule_argumentContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Expr() IExprContext Column_def() IColumn_defContext // IsModule_argumentContext differentiates from other interfaces. IsModule_argumentContext() } type Module_argumentContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyModule_argumentContext() *Module_argumentContext { var p = new(Module_argumentContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_module_argument return p } func (s *Module_argumentContext) GetParser() antlr.Parser { return s.parser } func (s *Module_argumentContext) Expr() IExprContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IExprContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IExprContext) } func (s *Module_argumentContext) Column_def() IColumn_defContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IColumn_defContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IColumn_defContext) } func (s *Module_argumentContext) GetRuleContext() antlr.RuleContext { return s } func (s *Module_argumentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Module_argumentContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterModule_argument(s) } } func (s *Module_argumentContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitModule_argument(s) } } func (p *SQLiteParser) Module_argument() (localctx IModule_argumentContext) { localctx = NewModule_argumentContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 170, SQLiteParserRULE_module_argument) p.SetState(2103) p.GetErrorHandler().Sync(p) if p.HasError() { goto errorExit } switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 310, p.GetParserRuleContext()) { case 1: p.EnterOuterAlt(localctx, 1) { p.SetState(2101) p.expr(0) } case 2: p.EnterOuterAlt(localctx, 2) { 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. type IColumn_aliasContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures IDENTIFIER() antlr.TerminalNode STRING_LITERAL() antlr.TerminalNode // IsColumn_aliasContext differentiates from other interfaces. IsColumn_aliasContext() } type Column_aliasContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyColumn_aliasContext() *Column_aliasContext { var p = new(Column_aliasContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_column_alias return p } func (s *Column_aliasContext) GetParser() antlr.Parser { return s.parser } func (s *Column_aliasContext) IDENTIFIER() antlr.TerminalNode { return s.GetToken(SQLiteParserIDENTIFIER, 0) } func (s *Column_aliasContext) STRING_LITERAL() antlr.TerminalNode { return s.GetToken(SQLiteParserSTRING_LITERAL, 0) } func (s *Column_aliasContext) GetRuleContext() antlr.RuleContext { return s } func (s *Column_aliasContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Column_aliasContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterColumn_alias(s) } } func (s *Column_aliasContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitColumn_alias(s) } } func (p *SQLiteParser) Column_alias() (localctx IColumn_aliasContext) { localctx = NewColumn_aliasContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 172, SQLiteParserRULE_column_alias) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(2105) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } 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. type IKeywordContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures ABORT_() antlr.TerminalNode ACTION_() antlr.TerminalNode ADD_() antlr.TerminalNode AFTER_() antlr.TerminalNode ALL_() antlr.TerminalNode ALTER_() antlr.TerminalNode ANALYZE_() antlr.TerminalNode AND_() antlr.TerminalNode AS_() antlr.TerminalNode ASC_() antlr.TerminalNode ATTACH_() antlr.TerminalNode AUTOINCREMENT_() antlr.TerminalNode BEFORE_() antlr.TerminalNode BEGIN_() antlr.TerminalNode BETWEEN_() antlr.TerminalNode BY_() antlr.TerminalNode CASCADE_() antlr.TerminalNode CASE_() antlr.TerminalNode CAST_() antlr.TerminalNode CHECK_() antlr.TerminalNode COLLATE_() antlr.TerminalNode COLUMN_() antlr.TerminalNode COMMIT_() antlr.TerminalNode CONFLICT_() antlr.TerminalNode CONSTRAINT_() antlr.TerminalNode CREATE_() antlr.TerminalNode CROSS_() antlr.TerminalNode CURRENT_DATE_() antlr.TerminalNode CURRENT_TIME_() antlr.TerminalNode CURRENT_TIMESTAMP_() antlr.TerminalNode DATABASE_() antlr.TerminalNode DEFAULT_() antlr.TerminalNode DEFERRABLE_() antlr.TerminalNode DEFERRED_() antlr.TerminalNode DELETE_() antlr.TerminalNode DESC_() antlr.TerminalNode DETACH_() antlr.TerminalNode DISTINCT_() antlr.TerminalNode DROP_() antlr.TerminalNode EACH_() antlr.TerminalNode ELSE_() antlr.TerminalNode END_() antlr.TerminalNode ESCAPE_() antlr.TerminalNode EXCEPT_() antlr.TerminalNode EXCLUSIVE_() antlr.TerminalNode EXISTS_() antlr.TerminalNode EXPLAIN_() antlr.TerminalNode FAIL_() antlr.TerminalNode FOR_() antlr.TerminalNode FOREIGN_() antlr.TerminalNode FROM_() antlr.TerminalNode FULL_() antlr.TerminalNode GLOB_() antlr.TerminalNode GROUP_() antlr.TerminalNode HAVING_() antlr.TerminalNode IF_() antlr.TerminalNode IGNORE_() antlr.TerminalNode IMMEDIATE_() antlr.TerminalNode IN_() antlr.TerminalNode INDEX_() antlr.TerminalNode INDEXED_() antlr.TerminalNode INITIALLY_() antlr.TerminalNode INNER_() antlr.TerminalNode INSERT_() antlr.TerminalNode INSTEAD_() antlr.TerminalNode INTERSECT_() antlr.TerminalNode INTO_() antlr.TerminalNode IS_() antlr.TerminalNode ISNULL_() antlr.TerminalNode JOIN_() antlr.TerminalNode KEY_() antlr.TerminalNode LEFT_() antlr.TerminalNode LIKE_() antlr.TerminalNode LIMIT_() antlr.TerminalNode MATCH_() antlr.TerminalNode NATURAL_() antlr.TerminalNode NO_() antlr.TerminalNode NOT_() antlr.TerminalNode NOTNULL_() antlr.TerminalNode NULL_() antlr.TerminalNode OF_() antlr.TerminalNode OFFSET_() antlr.TerminalNode ON_() antlr.TerminalNode OR_() antlr.TerminalNode ORDER_() antlr.TerminalNode OUTER_() antlr.TerminalNode PLAN_() antlr.TerminalNode PRAGMA_() antlr.TerminalNode PRIMARY_() antlr.TerminalNode QUERY_() antlr.TerminalNode RAISE_() antlr.TerminalNode RECURSIVE_() antlr.TerminalNode REFERENCES_() antlr.TerminalNode REGEXP_() antlr.TerminalNode REINDEX_() antlr.TerminalNode RELEASE_() antlr.TerminalNode RENAME_() antlr.TerminalNode REPLACE_() antlr.TerminalNode RESTRICT_() antlr.TerminalNode RETURNING_() antlr.TerminalNode RIGHT_() antlr.TerminalNode ROLLBACK_() antlr.TerminalNode ROW_() antlr.TerminalNode ROWS_() antlr.TerminalNode SAVEPOINT_() antlr.TerminalNode SELECT_() antlr.TerminalNode SET_() antlr.TerminalNode STRICT_() antlr.TerminalNode TABLE_() antlr.TerminalNode TEMP_() antlr.TerminalNode TEMPORARY_() antlr.TerminalNode THEN_() antlr.TerminalNode TO_() antlr.TerminalNode TRANSACTION_() antlr.TerminalNode TRIGGER_() antlr.TerminalNode UNION_() antlr.TerminalNode UNIQUE_() antlr.TerminalNode UPDATE_() antlr.TerminalNode USING_() antlr.TerminalNode VACUUM_() antlr.TerminalNode VALUES_() antlr.TerminalNode VIEW_() antlr.TerminalNode VIRTUAL_() antlr.TerminalNode WHEN_() antlr.TerminalNode WHERE_() antlr.TerminalNode WITH_() antlr.TerminalNode WITHOUT_() antlr.TerminalNode FIRST_VALUE_() antlr.TerminalNode OVER_() antlr.TerminalNode PARTITION_() antlr.TerminalNode RANGE_() antlr.TerminalNode PRECEDING_() antlr.TerminalNode UNBOUNDED_() antlr.TerminalNode CURRENT_() antlr.TerminalNode FOLLOWING_() antlr.TerminalNode CUME_DIST_() antlr.TerminalNode DENSE_RANK_() antlr.TerminalNode LAG_() antlr.TerminalNode LAST_VALUE_() antlr.TerminalNode LEAD_() antlr.TerminalNode NTH_VALUE_() antlr.TerminalNode NTILE_() antlr.TerminalNode PERCENT_RANK_() antlr.TerminalNode RANK_() antlr.TerminalNode ROW_NUMBER_() antlr.TerminalNode GENERATED_() antlr.TerminalNode ALWAYS_() antlr.TerminalNode STORED_() antlr.TerminalNode TRUE_() antlr.TerminalNode FALSE_() antlr.TerminalNode WINDOW_() antlr.TerminalNode NULLS_() antlr.TerminalNode FIRST_() antlr.TerminalNode LAST_() antlr.TerminalNode FILTER_() antlr.TerminalNode GROUPS_() antlr.TerminalNode EXCLUDE_() antlr.TerminalNode // IsKeywordContext differentiates from other interfaces. IsKeywordContext() } type KeywordContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyKeywordContext() *KeywordContext { var p = new(KeywordContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_keyword return p } func (s *KeywordContext) GetParser() antlr.Parser { return s.parser } func (s *KeywordContext) ABORT_() antlr.TerminalNode { return s.GetToken(SQLiteParserABORT_, 0) } func (s *KeywordContext) ACTION_() antlr.TerminalNode { return s.GetToken(SQLiteParserACTION_, 0) } func (s *KeywordContext) ADD_() antlr.TerminalNode { return s.GetToken(SQLiteParserADD_, 0) } func (s *KeywordContext) AFTER_() antlr.TerminalNode { return s.GetToken(SQLiteParserAFTER_, 0) } func (s *KeywordContext) ALL_() antlr.TerminalNode { return s.GetToken(SQLiteParserALL_, 0) } func (s *KeywordContext) ALTER_() antlr.TerminalNode { return s.GetToken(SQLiteParserALTER_, 0) } func (s *KeywordContext) ANALYZE_() antlr.TerminalNode { return s.GetToken(SQLiteParserANALYZE_, 0) } func (s *KeywordContext) AND_() antlr.TerminalNode { return s.GetToken(SQLiteParserAND_, 0) } func (s *KeywordContext) AS_() antlr.TerminalNode { return s.GetToken(SQLiteParserAS_, 0) } func (s *KeywordContext) ASC_() antlr.TerminalNode { return s.GetToken(SQLiteParserASC_, 0) } func (s *KeywordContext) ATTACH_() antlr.TerminalNode { return s.GetToken(SQLiteParserATTACH_, 0) } func (s *KeywordContext) AUTOINCREMENT_() antlr.TerminalNode { return s.GetToken(SQLiteParserAUTOINCREMENT_, 0) } func (s *KeywordContext) BEFORE_() antlr.TerminalNode { return s.GetToken(SQLiteParserBEFORE_, 0) } func (s *KeywordContext) BEGIN_() antlr.TerminalNode { return s.GetToken(SQLiteParserBEGIN_, 0) } func (s *KeywordContext) BETWEEN_() antlr.TerminalNode { return s.GetToken(SQLiteParserBETWEEN_, 0) } func (s *KeywordContext) BY_() antlr.TerminalNode { return s.GetToken(SQLiteParserBY_, 0) } func (s *KeywordContext) CASCADE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCASCADE_, 0) } func (s *KeywordContext) CASE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCASE_, 0) } func (s *KeywordContext) CAST_() antlr.TerminalNode { return s.GetToken(SQLiteParserCAST_, 0) } func (s *KeywordContext) CHECK_() antlr.TerminalNode { return s.GetToken(SQLiteParserCHECK_, 0) } func (s *KeywordContext) COLLATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCOLLATE_, 0) } func (s *KeywordContext) COLUMN_() antlr.TerminalNode { return s.GetToken(SQLiteParserCOLUMN_, 0) } func (s *KeywordContext) COMMIT_() antlr.TerminalNode { return s.GetToken(SQLiteParserCOMMIT_, 0) } func (s *KeywordContext) CONFLICT_() antlr.TerminalNode { return s.GetToken(SQLiteParserCONFLICT_, 0) } func (s *KeywordContext) CONSTRAINT_() antlr.TerminalNode { return s.GetToken(SQLiteParserCONSTRAINT_, 0) } func (s *KeywordContext) CREATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCREATE_, 0) } func (s *KeywordContext) CROSS_() antlr.TerminalNode { return s.GetToken(SQLiteParserCROSS_, 0) } func (s *KeywordContext) CURRENT_DATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserCURRENT_DATE_, 0) } func (s *KeywordContext) CURRENT_TIME_() antlr.TerminalNode { return s.GetToken(SQLiteParserCURRENT_TIME_, 0) } func (s *KeywordContext) CURRENT_TIMESTAMP_() antlr.TerminalNode { return s.GetToken(SQLiteParserCURRENT_TIMESTAMP_, 0) } func (s *KeywordContext) DATABASE_() antlr.TerminalNode { return s.GetToken(SQLiteParserDATABASE_, 0) } func (s *KeywordContext) DEFAULT_() antlr.TerminalNode { return s.GetToken(SQLiteParserDEFAULT_, 0) } func (s *KeywordContext) DEFERRABLE_() antlr.TerminalNode { return s.GetToken(SQLiteParserDEFERRABLE_, 0) } func (s *KeywordContext) DEFERRED_() antlr.TerminalNode { return s.GetToken(SQLiteParserDEFERRED_, 0) } func (s *KeywordContext) DELETE_() antlr.TerminalNode { return s.GetToken(SQLiteParserDELETE_, 0) } func (s *KeywordContext) DESC_() antlr.TerminalNode { return s.GetToken(SQLiteParserDESC_, 0) } func (s *KeywordContext) DETACH_() antlr.TerminalNode { return s.GetToken(SQLiteParserDETACH_, 0) } func (s *KeywordContext) DISTINCT_() antlr.TerminalNode { return s.GetToken(SQLiteParserDISTINCT_, 0) } func (s *KeywordContext) DROP_() antlr.TerminalNode { return s.GetToken(SQLiteParserDROP_, 0) } func (s *KeywordContext) EACH_() antlr.TerminalNode { return s.GetToken(SQLiteParserEACH_, 0) } func (s *KeywordContext) ELSE_() antlr.TerminalNode { return s.GetToken(SQLiteParserELSE_, 0) } func (s *KeywordContext) END_() antlr.TerminalNode { return s.GetToken(SQLiteParserEND_, 0) } func (s *KeywordContext) ESCAPE_() antlr.TerminalNode { return s.GetToken(SQLiteParserESCAPE_, 0) } func (s *KeywordContext) EXCEPT_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXCEPT_, 0) } func (s *KeywordContext) EXCLUSIVE_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXCLUSIVE_, 0) } func (s *KeywordContext) EXISTS_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXISTS_, 0) } func (s *KeywordContext) EXPLAIN_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXPLAIN_, 0) } func (s *KeywordContext) FAIL_() antlr.TerminalNode { return s.GetToken(SQLiteParserFAIL_, 0) } func (s *KeywordContext) FOR_() antlr.TerminalNode { return s.GetToken(SQLiteParserFOR_, 0) } func (s *KeywordContext) FOREIGN_() antlr.TerminalNode { return s.GetToken(SQLiteParserFOREIGN_, 0) } func (s *KeywordContext) FROM_() antlr.TerminalNode { return s.GetToken(SQLiteParserFROM_, 0) } func (s *KeywordContext) FULL_() antlr.TerminalNode { return s.GetToken(SQLiteParserFULL_, 0) } func (s *KeywordContext) GLOB_() antlr.TerminalNode { return s.GetToken(SQLiteParserGLOB_, 0) } func (s *KeywordContext) GROUP_() antlr.TerminalNode { return s.GetToken(SQLiteParserGROUP_, 0) } func (s *KeywordContext) HAVING_() antlr.TerminalNode { return s.GetToken(SQLiteParserHAVING_, 0) } func (s *KeywordContext) IF_() antlr.TerminalNode { return s.GetToken(SQLiteParserIF_, 0) } func (s *KeywordContext) IGNORE_() antlr.TerminalNode { return s.GetToken(SQLiteParserIGNORE_, 0) } func (s *KeywordContext) IMMEDIATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserIMMEDIATE_, 0) } func (s *KeywordContext) IN_() antlr.TerminalNode { return s.GetToken(SQLiteParserIN_, 0) } func (s *KeywordContext) INDEX_() antlr.TerminalNode { return s.GetToken(SQLiteParserINDEX_, 0) } func (s *KeywordContext) INDEXED_() antlr.TerminalNode { return s.GetToken(SQLiteParserINDEXED_, 0) } func (s *KeywordContext) INITIALLY_() antlr.TerminalNode { return s.GetToken(SQLiteParserINITIALLY_, 0) } func (s *KeywordContext) INNER_() antlr.TerminalNode { return s.GetToken(SQLiteParserINNER_, 0) } func (s *KeywordContext) INSERT_() antlr.TerminalNode { return s.GetToken(SQLiteParserINSERT_, 0) } func (s *KeywordContext) INSTEAD_() antlr.TerminalNode { return s.GetToken(SQLiteParserINSTEAD_, 0) } func (s *KeywordContext) INTERSECT_() antlr.TerminalNode { return s.GetToken(SQLiteParserINTERSECT_, 0) } func (s *KeywordContext) INTO_() antlr.TerminalNode { return s.GetToken(SQLiteParserINTO_, 0) } func (s *KeywordContext) IS_() antlr.TerminalNode { return s.GetToken(SQLiteParserIS_, 0) } func (s *KeywordContext) ISNULL_() antlr.TerminalNode { return s.GetToken(SQLiteParserISNULL_, 0) } func (s *KeywordContext) JOIN_() antlr.TerminalNode { return s.GetToken(SQLiteParserJOIN_, 0) } func (s *KeywordContext) KEY_() antlr.TerminalNode { return s.GetToken(SQLiteParserKEY_, 0) } func (s *KeywordContext) LEFT_() antlr.TerminalNode { return s.GetToken(SQLiteParserLEFT_, 0) } func (s *KeywordContext) LIKE_() antlr.TerminalNode { return s.GetToken(SQLiteParserLIKE_, 0) } func (s *KeywordContext) LIMIT_() antlr.TerminalNode { return s.GetToken(SQLiteParserLIMIT_, 0) } func (s *KeywordContext) MATCH_() antlr.TerminalNode { return s.GetToken(SQLiteParserMATCH_, 0) } func (s *KeywordContext) NATURAL_() antlr.TerminalNode { return s.GetToken(SQLiteParserNATURAL_, 0) } func (s *KeywordContext) NO_() antlr.TerminalNode { return s.GetToken(SQLiteParserNO_, 0) } func (s *KeywordContext) NOT_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOT_, 0) } func (s *KeywordContext) NOTNULL_() antlr.TerminalNode { return s.GetToken(SQLiteParserNOTNULL_, 0) } func (s *KeywordContext) NULL_() antlr.TerminalNode { return s.GetToken(SQLiteParserNULL_, 0) } func (s *KeywordContext) OF_() antlr.TerminalNode { return s.GetToken(SQLiteParserOF_, 0) } func (s *KeywordContext) OFFSET_() antlr.TerminalNode { return s.GetToken(SQLiteParserOFFSET_, 0) } func (s *KeywordContext) ON_() antlr.TerminalNode { return s.GetToken(SQLiteParserON_, 0) } func (s *KeywordContext) OR_() antlr.TerminalNode { return s.GetToken(SQLiteParserOR_, 0) } func (s *KeywordContext) ORDER_() antlr.TerminalNode { return s.GetToken(SQLiteParserORDER_, 0) } func (s *KeywordContext) OUTER_() antlr.TerminalNode { return s.GetToken(SQLiteParserOUTER_, 0) } func (s *KeywordContext) PLAN_() antlr.TerminalNode { return s.GetToken(SQLiteParserPLAN_, 0) } func (s *KeywordContext) PRAGMA_() antlr.TerminalNode { return s.GetToken(SQLiteParserPRAGMA_, 0) } func (s *KeywordContext) PRIMARY_() antlr.TerminalNode { return s.GetToken(SQLiteParserPRIMARY_, 0) } func (s *KeywordContext) QUERY_() antlr.TerminalNode { return s.GetToken(SQLiteParserQUERY_, 0) } func (s *KeywordContext) RAISE_() antlr.TerminalNode { return s.GetToken(SQLiteParserRAISE_, 0) } func (s *KeywordContext) RECURSIVE_() antlr.TerminalNode { return s.GetToken(SQLiteParserRECURSIVE_, 0) } func (s *KeywordContext) REFERENCES_() antlr.TerminalNode { return s.GetToken(SQLiteParserREFERENCES_, 0) } func (s *KeywordContext) REGEXP_() antlr.TerminalNode { return s.GetToken(SQLiteParserREGEXP_, 0) } func (s *KeywordContext) REINDEX_() antlr.TerminalNode { return s.GetToken(SQLiteParserREINDEX_, 0) } func (s *KeywordContext) RELEASE_() antlr.TerminalNode { return s.GetToken(SQLiteParserRELEASE_, 0) } func (s *KeywordContext) RENAME_() antlr.TerminalNode { return s.GetToken(SQLiteParserRENAME_, 0) } func (s *KeywordContext) REPLACE_() antlr.TerminalNode { return s.GetToken(SQLiteParserREPLACE_, 0) } func (s *KeywordContext) RESTRICT_() antlr.TerminalNode { return s.GetToken(SQLiteParserRESTRICT_, 0) } func (s *KeywordContext) RETURNING_() antlr.TerminalNode { return s.GetToken(SQLiteParserRETURNING_, 0) } func (s *KeywordContext) RIGHT_() antlr.TerminalNode { return s.GetToken(SQLiteParserRIGHT_, 0) } func (s *KeywordContext) ROLLBACK_() antlr.TerminalNode { return s.GetToken(SQLiteParserROLLBACK_, 0) } func (s *KeywordContext) ROW_() antlr.TerminalNode { return s.GetToken(SQLiteParserROW_, 0) } func (s *KeywordContext) ROWS_() antlr.TerminalNode { return s.GetToken(SQLiteParserROWS_, 0) } func (s *KeywordContext) SAVEPOINT_() antlr.TerminalNode { return s.GetToken(SQLiteParserSAVEPOINT_, 0) } func (s *KeywordContext) SELECT_() antlr.TerminalNode { return s.GetToken(SQLiteParserSELECT_, 0) } func (s *KeywordContext) SET_() antlr.TerminalNode { return s.GetToken(SQLiteParserSET_, 0) } func (s *KeywordContext) STRICT_() antlr.TerminalNode { return s.GetToken(SQLiteParserSTRICT_, 0) } func (s *KeywordContext) TABLE_() antlr.TerminalNode { return s.GetToken(SQLiteParserTABLE_, 0) } func (s *KeywordContext) TEMP_() antlr.TerminalNode { return s.GetToken(SQLiteParserTEMP_, 0) } func (s *KeywordContext) TEMPORARY_() antlr.TerminalNode { return s.GetToken(SQLiteParserTEMPORARY_, 0) } func (s *KeywordContext) THEN_() antlr.TerminalNode { return s.GetToken(SQLiteParserTHEN_, 0) } func (s *KeywordContext) TO_() antlr.TerminalNode { return s.GetToken(SQLiteParserTO_, 0) } func (s *KeywordContext) TRANSACTION_() antlr.TerminalNode { return s.GetToken(SQLiteParserTRANSACTION_, 0) } func (s *KeywordContext) TRIGGER_() antlr.TerminalNode { return s.GetToken(SQLiteParserTRIGGER_, 0) } func (s *KeywordContext) UNION_() antlr.TerminalNode { return s.GetToken(SQLiteParserUNION_, 0) } func (s *KeywordContext) UNIQUE_() antlr.TerminalNode { return s.GetToken(SQLiteParserUNIQUE_, 0) } func (s *KeywordContext) UPDATE_() antlr.TerminalNode { return s.GetToken(SQLiteParserUPDATE_, 0) } func (s *KeywordContext) USING_() antlr.TerminalNode { return s.GetToken(SQLiteParserUSING_, 0) } func (s *KeywordContext) VACUUM_() antlr.TerminalNode { return s.GetToken(SQLiteParserVACUUM_, 0) } func (s *KeywordContext) VALUES_() antlr.TerminalNode { return s.GetToken(SQLiteParserVALUES_, 0) } func (s *KeywordContext) VIEW_() antlr.TerminalNode { return s.GetToken(SQLiteParserVIEW_, 0) } func (s *KeywordContext) VIRTUAL_() antlr.TerminalNode { return s.GetToken(SQLiteParserVIRTUAL_, 0) } func (s *KeywordContext) WHEN_() antlr.TerminalNode { return s.GetToken(SQLiteParserWHEN_, 0) } func (s *KeywordContext) WHERE_() antlr.TerminalNode { return s.GetToken(SQLiteParserWHERE_, 0) } func (s *KeywordContext) WITH_() antlr.TerminalNode { return s.GetToken(SQLiteParserWITH_, 0) } func (s *KeywordContext) WITHOUT_() antlr.TerminalNode { return s.GetToken(SQLiteParserWITHOUT_, 0) } func (s *KeywordContext) FIRST_VALUE_() antlr.TerminalNode { return s.GetToken(SQLiteParserFIRST_VALUE_, 0) } func (s *KeywordContext) OVER_() antlr.TerminalNode { return s.GetToken(SQLiteParserOVER_, 0) } func (s *KeywordContext) PARTITION_() antlr.TerminalNode { return s.GetToken(SQLiteParserPARTITION_, 0) } func (s *KeywordContext) RANGE_() antlr.TerminalNode { return s.GetToken(SQLiteParserRANGE_, 0) } func (s *KeywordContext) PRECEDING_() antlr.TerminalNode { return s.GetToken(SQLiteParserPRECEDING_, 0) } func (s *KeywordContext) UNBOUNDED_() antlr.TerminalNode { return s.GetToken(SQLiteParserUNBOUNDED_, 0) } func (s *KeywordContext) CURRENT_() antlr.TerminalNode { return s.GetToken(SQLiteParserCURRENT_, 0) } func (s *KeywordContext) FOLLOWING_() antlr.TerminalNode { return s.GetToken(SQLiteParserFOLLOWING_, 0) } func (s *KeywordContext) CUME_DIST_() antlr.TerminalNode { return s.GetToken(SQLiteParserCUME_DIST_, 0) } func (s *KeywordContext) DENSE_RANK_() antlr.TerminalNode { return s.GetToken(SQLiteParserDENSE_RANK_, 0) } func (s *KeywordContext) LAG_() antlr.TerminalNode { return s.GetToken(SQLiteParserLAG_, 0) } func (s *KeywordContext) LAST_VALUE_() antlr.TerminalNode { return s.GetToken(SQLiteParserLAST_VALUE_, 0) } func (s *KeywordContext) LEAD_() antlr.TerminalNode { return s.GetToken(SQLiteParserLEAD_, 0) } func (s *KeywordContext) NTH_VALUE_() antlr.TerminalNode { return s.GetToken(SQLiteParserNTH_VALUE_, 0) } func (s *KeywordContext) NTILE_() antlr.TerminalNode { return s.GetToken(SQLiteParserNTILE_, 0) } func (s *KeywordContext) PERCENT_RANK_() antlr.TerminalNode { return s.GetToken(SQLiteParserPERCENT_RANK_, 0) } func (s *KeywordContext) RANK_() antlr.TerminalNode { return s.GetToken(SQLiteParserRANK_, 0) } func (s *KeywordContext) ROW_NUMBER_() antlr.TerminalNode { return s.GetToken(SQLiteParserROW_NUMBER_, 0) } func (s *KeywordContext) GENERATED_() antlr.TerminalNode { return s.GetToken(SQLiteParserGENERATED_, 0) } func (s *KeywordContext) ALWAYS_() antlr.TerminalNode { return s.GetToken(SQLiteParserALWAYS_, 0) } func (s *KeywordContext) STORED_() antlr.TerminalNode { return s.GetToken(SQLiteParserSTORED_, 0) } func (s *KeywordContext) TRUE_() antlr.TerminalNode { return s.GetToken(SQLiteParserTRUE_, 0) } func (s *KeywordContext) FALSE_() antlr.TerminalNode { return s.GetToken(SQLiteParserFALSE_, 0) } func (s *KeywordContext) WINDOW_() antlr.TerminalNode { return s.GetToken(SQLiteParserWINDOW_, 0) } func (s *KeywordContext) NULLS_() antlr.TerminalNode { return s.GetToken(SQLiteParserNULLS_, 0) } func (s *KeywordContext) FIRST_() antlr.TerminalNode { return s.GetToken(SQLiteParserFIRST_, 0) } func (s *KeywordContext) LAST_() antlr.TerminalNode { return s.GetToken(SQLiteParserLAST_, 0) } func (s *KeywordContext) FILTER_() antlr.TerminalNode { return s.GetToken(SQLiteParserFILTER_, 0) } func (s *KeywordContext) GROUPS_() antlr.TerminalNode { return s.GetToken(SQLiteParserGROUPS_, 0) } func (s *KeywordContext) EXCLUDE_() antlr.TerminalNode { return s.GetToken(SQLiteParserEXCLUDE_, 0) } func (s *KeywordContext) GetRuleContext() antlr.RuleContext { return s } func (s *KeywordContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *KeywordContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterKeyword(s) } } func (s *KeywordContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitKeyword(s) } } func (p *SQLiteParser) Keyword() (localctx IKeywordContext) { localctx = NewKeywordContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 174, SQLiteParserRULE_keyword) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(2107) _la = p.GetTokenStream().LA(1) 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) p.Consume() } } 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. type INameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsNameContext differentiates from other interfaces. IsNameContext() } type NameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyNameContext() *NameContext { var p = new(NameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_name return p } func (s *NameContext) GetParser() antlr.Parser { return s.parser } func (s *NameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *NameContext) GetRuleContext() antlr.RuleContext { return s } func (s *NameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *NameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterName(s) } } func (s *NameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitName(s) } } func (p *SQLiteParser) Name() (localctx INameContext) { localctx = NewNameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 176, SQLiteParserRULE_name) p.EnterOuterAlt(localctx, 1) { 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. type IFunction_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsFunction_nameContext differentiates from other interfaces. IsFunction_nameContext() } type Function_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFunction_nameContext() *Function_nameContext { var p = new(Function_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_function_name return p } func (s *Function_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Function_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Function_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Function_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Function_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterFunction_name(s) } } func (s *Function_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitFunction_name(s) } } func (p *SQLiteParser) Function_name() (localctx IFunction_nameContext) { localctx = NewFunction_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 178, SQLiteParserRULE_function_name) p.EnterOuterAlt(localctx, 1) { 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. type IQualified_function_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Function_name() IFunction_nameContext Schema_name() ISchema_nameContext DOT() antlr.TerminalNode // IsQualified_function_nameContext differentiates from other interfaces. IsQualified_function_nameContext() } type Qualified_function_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyQualified_function_nameContext() *Qualified_function_nameContext { var p = new(Qualified_function_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_qualified_function_name return p } func (s *Qualified_function_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Qualified_function_nameContext) Function_name() IFunction_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IFunction_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IFunction_nameContext) } func (s *Qualified_function_nameContext) Schema_name() ISchema_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(ISchema_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(ISchema_nameContext) } func (s *Qualified_function_nameContext) DOT() antlr.TerminalNode { return s.GetToken(SQLiteParserDOT, 0) } func (s *Qualified_function_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Qualified_function_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Qualified_function_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterQualified_function_name(s) } } func (s *Qualified_function_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitQualified_function_name(s) } } func (p *SQLiteParser) Qualified_function_name() (localctx IQualified_function_nameContext) { localctx = NewQualified_function_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 180, SQLiteParserRULE_qualified_function_name) p.EnterOuterAlt(localctx, 1) p.SetState(2116) p.GetErrorHandler().Sync(p) if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 311, p.GetParserRuleContext()) == 1 { { p.SetState(2113) p.Schema_name() } { p.SetState(2114) p.Match(SQLiteParserDOT) if p.HasError() { // Recognition error - abort rule goto errorExit } } } else if p.HasError() { // JIM goto errorExit } { 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. type ISchema_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsSchema_nameContext differentiates from other interfaces. IsSchema_nameContext() } type Schema_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySchema_nameContext() *Schema_nameContext { var p = new(Schema_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_schema_name return p } func (s *Schema_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Schema_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Schema_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Schema_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Schema_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterSchema_name(s) } } func (s *Schema_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitSchema_name(s) } } func (p *SQLiteParser) Schema_name() (localctx ISchema_nameContext) { localctx = NewSchema_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 182, SQLiteParserRULE_schema_name) p.EnterOuterAlt(localctx, 1) { 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. type ITable_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsTable_nameContext differentiates from other interfaces. IsTable_nameContext() } type Table_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTable_nameContext() *Table_nameContext { var p = new(Table_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_name return p } func (s *Table_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Table_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Table_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Table_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Table_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterTable_name(s) } } func (s *Table_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitTable_name(s) } } func (p *SQLiteParser) Table_name() (localctx ITable_nameContext) { localctx = NewTable_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 184, SQLiteParserRULE_table_name) p.EnterOuterAlt(localctx, 1) { 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. type ITable_or_index_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsTable_or_index_nameContext differentiates from other interfaces. IsTable_or_index_nameContext() } type Table_or_index_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTable_or_index_nameContext() *Table_or_index_nameContext { var p = new(Table_or_index_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_or_index_name return p } func (s *Table_or_index_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Table_or_index_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Table_or_index_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Table_or_index_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Table_or_index_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterTable_or_index_name(s) } } func (s *Table_or_index_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitTable_or_index_name(s) } } func (p *SQLiteParser) Table_or_index_name() (localctx ITable_or_index_nameContext) { localctx = NewTable_or_index_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 186, SQLiteParserRULE_table_or_index_name) p.EnterOuterAlt(localctx, 1) { 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. type INew_table_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsNew_table_nameContext differentiates from other interfaces. IsNew_table_nameContext() } type New_table_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyNew_table_nameContext() *New_table_nameContext { var p = new(New_table_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_new_table_name return p } func (s *New_table_nameContext) GetParser() antlr.Parser { return s.parser } func (s *New_table_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *New_table_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *New_table_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *New_table_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterNew_table_name(s) } } func (s *New_table_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitNew_table_name(s) } } func (p *SQLiteParser) New_table_name() (localctx INew_table_nameContext) { localctx = NewNew_table_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 188, SQLiteParserRULE_new_table_name) p.EnterOuterAlt(localctx, 1) { 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. type IColumn_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsColumn_nameContext differentiates from other interfaces. IsColumn_nameContext() } type Column_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyColumn_nameContext() *Column_nameContext { var p = new(Column_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_column_name return p } func (s *Column_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Column_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Column_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Column_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Column_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterColumn_name(s) } } 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) { localctx = NewColumn_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 190, SQLiteParserRULE_column_name) p.EnterOuterAlt(localctx, 1) { 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. type ICollation_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsCollation_nameContext differentiates from other interfaces. IsCollation_nameContext() } type Collation_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyCollation_nameContext() *Collation_nameContext { var p = new(Collation_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_collation_name return p } func (s *Collation_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Collation_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Collation_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Collation_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Collation_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterCollation_name(s) } } func (s *Collation_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitCollation_name(s) } } func (p *SQLiteParser) Collation_name() (localctx ICollation_nameContext) { localctx = NewCollation_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 192, SQLiteParserRULE_collation_name) p.EnterOuterAlt(localctx, 1) { 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. type IForeign_tableContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsForeign_tableContext differentiates from other interfaces. IsForeign_tableContext() } type Foreign_tableContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyForeign_tableContext() *Foreign_tableContext { var p = new(Foreign_tableContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_foreign_table return p } func (s *Foreign_tableContext) GetParser() antlr.Parser { return s.parser } func (s *Foreign_tableContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Foreign_tableContext) GetRuleContext() antlr.RuleContext { return s } func (s *Foreign_tableContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Foreign_tableContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterForeign_table(s) } } func (s *Foreign_tableContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitForeign_table(s) } } func (p *SQLiteParser) Foreign_table() (localctx IForeign_tableContext) { localctx = NewForeign_tableContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 194, SQLiteParserRULE_foreign_table) p.EnterOuterAlt(localctx, 1) { 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. type IIndex_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsIndex_nameContext differentiates from other interfaces. IsIndex_nameContext() } type Index_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyIndex_nameContext() *Index_nameContext { var p = new(Index_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_index_name return p } func (s *Index_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Index_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Index_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Index_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Index_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterIndex_name(s) } } func (s *Index_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitIndex_name(s) } } func (p *SQLiteParser) Index_name() (localctx IIndex_nameContext) { localctx = NewIndex_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 196, SQLiteParserRULE_index_name) p.EnterOuterAlt(localctx, 1) { 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. type ITrigger_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsTrigger_nameContext differentiates from other interfaces. IsTrigger_nameContext() } type Trigger_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTrigger_nameContext() *Trigger_nameContext { var p = new(Trigger_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_trigger_name return p } func (s *Trigger_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Trigger_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Trigger_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Trigger_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Trigger_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterTrigger_name(s) } } func (s *Trigger_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitTrigger_name(s) } } func (p *SQLiteParser) Trigger_name() (localctx ITrigger_nameContext) { localctx = NewTrigger_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 198, SQLiteParserRULE_trigger_name) p.EnterOuterAlt(localctx, 1) { 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. type IView_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsView_nameContext differentiates from other interfaces. IsView_nameContext() } type View_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyView_nameContext() *View_nameContext { var p = new(View_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_view_name return p } func (s *View_nameContext) GetParser() antlr.Parser { return s.parser } func (s *View_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *View_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *View_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *View_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterView_name(s) } } func (s *View_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitView_name(s) } } func (p *SQLiteParser) View_name() (localctx IView_nameContext) { localctx = NewView_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 200, SQLiteParserRULE_view_name) p.EnterOuterAlt(localctx, 1) { 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. type IModule_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsModule_nameContext differentiates from other interfaces. IsModule_nameContext() } type Module_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyModule_nameContext() *Module_nameContext { var p = new(Module_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_module_name return p } func (s *Module_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Module_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Module_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Module_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Module_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterModule_name(s) } } func (s *Module_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitModule_name(s) } } func (p *SQLiteParser) Module_name() (localctx IModule_nameContext) { localctx = NewModule_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 202, SQLiteParserRULE_module_name) p.EnterOuterAlt(localctx, 1) { 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. type IPragma_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsPragma_nameContext differentiates from other interfaces. IsPragma_nameContext() } type Pragma_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyPragma_nameContext() *Pragma_nameContext { var p = new(Pragma_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_pragma_name return p } func (s *Pragma_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Pragma_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Pragma_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Pragma_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Pragma_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterPragma_name(s) } } func (s *Pragma_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitPragma_name(s) } } func (p *SQLiteParser) Pragma_name() (localctx IPragma_nameContext) { localctx = NewPragma_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 204, SQLiteParserRULE_pragma_name) p.EnterOuterAlt(localctx, 1) { 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. type ISavepoint_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsSavepoint_nameContext differentiates from other interfaces. IsSavepoint_nameContext() } type Savepoint_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySavepoint_nameContext() *Savepoint_nameContext { var p = new(Savepoint_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_savepoint_name return p } func (s *Savepoint_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Savepoint_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Savepoint_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Savepoint_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Savepoint_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterSavepoint_name(s) } } func (s *Savepoint_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitSavepoint_name(s) } } func (p *SQLiteParser) Savepoint_name() (localctx ISavepoint_nameContext) { localctx = NewSavepoint_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 206, SQLiteParserRULE_savepoint_name) p.EnterOuterAlt(localctx, 1) { 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. type ITable_aliasContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures IDENTIFIER() antlr.TerminalNode STRING_LITERAL() antlr.TerminalNode // IsTable_aliasContext differentiates from other interfaces. IsTable_aliasContext() } type Table_aliasContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTable_aliasContext() *Table_aliasContext { var p = new(Table_aliasContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_alias return p } func (s *Table_aliasContext) GetParser() antlr.Parser { return s.parser } func (s *Table_aliasContext) IDENTIFIER() antlr.TerminalNode { return s.GetToken(SQLiteParserIDENTIFIER, 0) } func (s *Table_aliasContext) STRING_LITERAL() antlr.TerminalNode { return s.GetToken(SQLiteParserSTRING_LITERAL, 0) } func (s *Table_aliasContext) GetRuleContext() antlr.RuleContext { return s } func (s *Table_aliasContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Table_aliasContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterTable_alias(s) } } func (s *Table_aliasContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitTable_alias(s) } } func (p *SQLiteParser) Table_alias() (localctx ITable_aliasContext) { localctx = NewTable_aliasContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 208, SQLiteParserRULE_table_alias) var _la int p.EnterOuterAlt(localctx, 1) { p.SetState(2146) _la = p.GetTokenStream().LA(1) if !(_la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL) { p.GetErrorHandler().RecoverInline(p) } else { p.GetErrorHandler().ReportMatch(p) p.Consume() } } 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. type ITable_alias_fallbackContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsTable_alias_fallbackContext differentiates from other interfaces. IsTable_alias_fallbackContext() } type Table_alias_fallbackContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTable_alias_fallbackContext() *Table_alias_fallbackContext { var p = new(Table_alias_fallbackContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_alias_fallback return p } func (s *Table_alias_fallbackContext) GetParser() antlr.Parser { return s.parser } func (s *Table_alias_fallbackContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Table_alias_fallbackContext) GetRuleContext() antlr.RuleContext { return s } func (s *Table_alias_fallbackContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Table_alias_fallbackContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterTable_alias_fallback(s) } } func (s *Table_alias_fallbackContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitTable_alias_fallback(s) } } func (p *SQLiteParser) Table_alias_fallback() (localctx ITable_alias_fallbackContext) { localctx = NewTable_alias_fallbackContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 210, SQLiteParserRULE_table_alias_fallback) p.EnterOuterAlt(localctx, 1) { 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. type ITransaction_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsTransaction_nameContext differentiates from other interfaces. IsTransaction_nameContext() } type Transaction_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTransaction_nameContext() *Transaction_nameContext { var p = new(Transaction_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_transaction_name return p } func (s *Transaction_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Transaction_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Transaction_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Transaction_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Transaction_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterTransaction_name(s) } } func (s *Transaction_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitTransaction_name(s) } } func (p *SQLiteParser) Transaction_name() (localctx ITransaction_nameContext) { localctx = NewTransaction_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 212, SQLiteParserRULE_transaction_name) p.EnterOuterAlt(localctx, 1) { 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. type IWindow_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsWindow_nameContext differentiates from other interfaces. IsWindow_nameContext() } type Window_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyWindow_nameContext() *Window_nameContext { var p = new(Window_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_window_name return p } func (s *Window_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Window_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Window_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Window_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Window_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterWindow_name(s) } } func (s *Window_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitWindow_name(s) } } func (p *SQLiteParser) Window_name() (localctx IWindow_nameContext) { localctx = NewWindow_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 214, SQLiteParserRULE_window_name) p.EnterOuterAlt(localctx, 1) { 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. type IAliasContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsAliasContext differentiates from other interfaces. IsAliasContext() } type AliasContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyAliasContext() *AliasContext { var p = new(AliasContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_alias return p } func (s *AliasContext) GetParser() antlr.Parser { return s.parser } func (s *AliasContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *AliasContext) GetRuleContext() antlr.RuleContext { return s } func (s *AliasContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *AliasContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterAlias(s) } } func (s *AliasContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitAlias(s) } } func (p *SQLiteParser) Alias() (localctx IAliasContext) { localctx = NewAliasContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 216, SQLiteParserRULE_alias) p.EnterOuterAlt(localctx, 1) { 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. type IFilenameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsFilenameContext differentiates from other interfaces. IsFilenameContext() } type FilenameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyFilenameContext() *FilenameContext { var p = new(FilenameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_filename return p } func (s *FilenameContext) GetParser() antlr.Parser { return s.parser } func (s *FilenameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *FilenameContext) GetRuleContext() antlr.RuleContext { return s } func (s *FilenameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *FilenameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterFilename(s) } } func (s *FilenameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitFilename(s) } } func (p *SQLiteParser) Filename() (localctx IFilenameContext) { localctx = NewFilenameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 218, SQLiteParserRULE_filename) p.EnterOuterAlt(localctx, 1) { 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. type IBase_window_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsBase_window_nameContext differentiates from other interfaces. IsBase_window_nameContext() } type Base_window_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyBase_window_nameContext() *Base_window_nameContext { var p = new(Base_window_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_base_window_name return p } func (s *Base_window_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Base_window_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Base_window_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Base_window_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Base_window_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterBase_window_name(s) } } func (s *Base_window_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitBase_window_name(s) } } func (p *SQLiteParser) Base_window_name() (localctx IBase_window_nameContext) { localctx = NewBase_window_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 220, SQLiteParserRULE_base_window_name) p.EnterOuterAlt(localctx, 1) { 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. type ISimple_funcContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsSimple_funcContext differentiates from other interfaces. IsSimple_funcContext() } type Simple_funcContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptySimple_funcContext() *Simple_funcContext { var p = new(Simple_funcContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_simple_func return p } func (s *Simple_funcContext) GetParser() antlr.Parser { return s.parser } func (s *Simple_funcContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Simple_funcContext) GetRuleContext() antlr.RuleContext { return s } func (s *Simple_funcContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Simple_funcContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterSimple_func(s) } } func (s *Simple_funcContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitSimple_func(s) } } func (p *SQLiteParser) Simple_func() (localctx ISimple_funcContext) { localctx = NewSimple_funcContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 222, SQLiteParserRULE_simple_func) p.EnterOuterAlt(localctx, 1) { 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. type IAggregate_funcContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsAggregate_funcContext differentiates from other interfaces. IsAggregate_funcContext() } type Aggregate_funcContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyAggregate_funcContext() *Aggregate_funcContext { var p = new(Aggregate_funcContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_aggregate_func return p } func (s *Aggregate_funcContext) GetParser() antlr.Parser { return s.parser } func (s *Aggregate_funcContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Aggregate_funcContext) GetRuleContext() antlr.RuleContext { return s } func (s *Aggregate_funcContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Aggregate_funcContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterAggregate_func(s) } } func (s *Aggregate_funcContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitAggregate_func(s) } } func (p *SQLiteParser) Aggregate_func() (localctx IAggregate_funcContext) { localctx = NewAggregate_funcContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 224, SQLiteParserRULE_aggregate_func) p.EnterOuterAlt(localctx, 1) { 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. type ITable_function_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures Any_name() IAny_nameContext // IsTable_function_nameContext differentiates from other interfaces. IsTable_function_nameContext() } type Table_function_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyTable_function_nameContext() *Table_function_nameContext { var p = new(Table_function_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_table_function_name return p } func (s *Table_function_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Table_function_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Table_function_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Table_function_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Table_function_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterTable_function_name(s) } } func (s *Table_function_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitTable_function_name(s) } } func (p *SQLiteParser) Table_function_name() (localctx ITable_function_nameContext) { localctx = NewTable_function_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 226, SQLiteParserRULE_table_function_name) p.EnterOuterAlt(localctx, 1) { 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. type IAny_nameContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // Getter signatures IDENTIFIER() antlr.TerminalNode Keyword() IKeywordContext STRING_LITERAL() antlr.TerminalNode OPEN_PAR() antlr.TerminalNode Any_name() IAny_nameContext CLOSE_PAR() antlr.TerminalNode // IsAny_nameContext differentiates from other interfaces. IsAny_nameContext() } type Any_nameContext struct { antlr.BaseParserRuleContext parser antlr.Parser } func NewEmptyAny_nameContext() *Any_nameContext { var p = new(Any_nameContext) 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) antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState) p.parser = parser p.RuleIndex = SQLiteParserRULE_any_name return p } func (s *Any_nameContext) GetParser() antlr.Parser { return s.parser } func (s *Any_nameContext) IDENTIFIER() antlr.TerminalNode { return s.GetToken(SQLiteParserIDENTIFIER, 0) } func (s *Any_nameContext) Keyword() IKeywordContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IKeywordContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IKeywordContext) } func (s *Any_nameContext) STRING_LITERAL() antlr.TerminalNode { return s.GetToken(SQLiteParserSTRING_LITERAL, 0) } func (s *Any_nameContext) OPEN_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserOPEN_PAR, 0) } func (s *Any_nameContext) Any_name() IAny_nameContext { var t antlr.RuleContext for _, ctx := range s.GetChildren() { if _, ok := ctx.(IAny_nameContext); ok { t = ctx.(antlr.RuleContext) break } } if t == nil { return nil } return t.(IAny_nameContext) } func (s *Any_nameContext) CLOSE_PAR() antlr.TerminalNode { return s.GetToken(SQLiteParserCLOSE_PAR, 0) } func (s *Any_nameContext) GetRuleContext() antlr.RuleContext { return s } func (s *Any_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { return antlr.TreesStringTree(s, ruleNames, recog) } func (s *Any_nameContext) EnterRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.EnterAny_name(s) } } func (s *Any_nameContext) ExitRule(listener antlr.ParseTreeListener) { if listenerT, ok := listener.(SQLiteParserListener); ok { listenerT.ExitAny_name(s) } } func (p *SQLiteParser) Any_name() (localctx IAny_nameContext) { localctx = NewAny_nameContext(p, p.GetParserRuleContext(), p.GetState()) p.EnterRule(localctx, 228, SQLiteParserRULE_any_name) 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(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(2167) p.Keyword() } case SQLiteParserSTRING_LITERAL: p.EnterOuterAlt(localctx, 3) { 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(2169) p.Match(SQLiteParserOPEN_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } { p.SetState(2170) p.Any_name() } { p.SetState(2171) p.Match(SQLiteParserCLOSE_PAR) if p.HasError() { // Recognition error - abort rule goto errorExit } } default: 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 { switch ruleIndex { case 34: var t *ExprContext = nil if localctx != nil { t = localctx.(*ExprContext) } return p.Expr_Sempred(t, predIndex) default: panic("No predicate with index: " + fmt.Sprint(ruleIndex)) } } func (p *SQLiteParser) Expr_Sempred(localctx antlr.RuleContext, predIndex int) bool { switch predIndex { case 0: return p.Precpred(p.GetParserRuleContext(), 20) case 1: return p.Precpred(p.GetParserRuleContext(), 19) case 2: return p.Precpred(p.GetParserRuleContext(), 18) case 3: return p.Precpred(p.GetParserRuleContext(), 17) case 4: return p.Precpred(p.GetParserRuleContext(), 16) case 5: return p.Precpred(p.GetParserRuleContext(), 15) case 6: return p.Precpred(p.GetParserRuleContext(), 14) case 7: return p.Precpred(p.GetParserRuleContext(), 12) case 8: return p.Precpred(p.GetParserRuleContext(), 11) case 9: return p.Precpred(p.GetParserRuleContext(), 4) case 10: return p.Precpred(p.GetParserRuleContext(), 13) case 11: return p.Precpred(p.GetParserRuleContext(), 7) case 12: return p.Precpred(p.GetParserRuleContext(), 6) case 13: return p.Precpred(p.GetParserRuleContext(), 5) default: panic("No predicate with index: " + fmt.Sprint(predIndex)) } } ================================================ FILE: internal/engine/sqlite/parser/sqliteparser_base_listener.go ================================================ // Code generated from SQLiteParser.g4 by ANTLR 4.13.1. DO NOT EDIT. package parser // SQLiteParser import "github.com/antlr4-go/antlr/v4" // BaseSQLiteParserListener is a complete listener for a parse tree produced by SQLiteParser. type BaseSQLiteParserListener struct{} var _ SQLiteParserListener = &BaseSQLiteParserListener{} // VisitTerminal is called when a terminal node is visited. func (s *BaseSQLiteParserListener) VisitTerminal(node antlr.TerminalNode) {} // VisitErrorNode is called when an error node is visited. func (s *BaseSQLiteParserListener) VisitErrorNode(node antlr.ErrorNode) {} // EnterEveryRule is called when any rule is entered. func (s *BaseSQLiteParserListener) EnterEveryRule(ctx antlr.ParserRuleContext) {} // ExitEveryRule is called when any rule is exited. func (s *BaseSQLiteParserListener) ExitEveryRule(ctx antlr.ParserRuleContext) {} // EnterParse is called when production parse is entered. func (s *BaseSQLiteParserListener) EnterParse(ctx *ParseContext) {} // ExitParse is called when production parse is exited. func (s *BaseSQLiteParserListener) ExitParse(ctx *ParseContext) {} // EnterSql_stmt_list is called when production sql_stmt_list is entered. func (s *BaseSQLiteParserListener) EnterSql_stmt_list(ctx *Sql_stmt_listContext) {} // ExitSql_stmt_list is called when production sql_stmt_list is exited. func (s *BaseSQLiteParserListener) ExitSql_stmt_list(ctx *Sql_stmt_listContext) {} // EnterSql_stmt is called when production sql_stmt is entered. func (s *BaseSQLiteParserListener) EnterSql_stmt(ctx *Sql_stmtContext) {} // ExitSql_stmt is called when production sql_stmt is exited. func (s *BaseSQLiteParserListener) ExitSql_stmt(ctx *Sql_stmtContext) {} // EnterAlter_table_stmt is called when production alter_table_stmt is entered. func (s *BaseSQLiteParserListener) EnterAlter_table_stmt(ctx *Alter_table_stmtContext) {} // ExitAlter_table_stmt is called when production alter_table_stmt is exited. func (s *BaseSQLiteParserListener) ExitAlter_table_stmt(ctx *Alter_table_stmtContext) {} // EnterAnalyze_stmt is called when production analyze_stmt is entered. func (s *BaseSQLiteParserListener) EnterAnalyze_stmt(ctx *Analyze_stmtContext) {} // ExitAnalyze_stmt is called when production analyze_stmt is exited. func (s *BaseSQLiteParserListener) ExitAnalyze_stmt(ctx *Analyze_stmtContext) {} // EnterAttach_stmt is called when production attach_stmt is entered. func (s *BaseSQLiteParserListener) EnterAttach_stmt(ctx *Attach_stmtContext) {} // ExitAttach_stmt is called when production attach_stmt is exited. func (s *BaseSQLiteParserListener) ExitAttach_stmt(ctx *Attach_stmtContext) {} // EnterBegin_stmt is called when production begin_stmt is entered. func (s *BaseSQLiteParserListener) EnterBegin_stmt(ctx *Begin_stmtContext) {} // ExitBegin_stmt is called when production begin_stmt is exited. func (s *BaseSQLiteParserListener) ExitBegin_stmt(ctx *Begin_stmtContext) {} // EnterCommit_stmt is called when production commit_stmt is entered. func (s *BaseSQLiteParserListener) EnterCommit_stmt(ctx *Commit_stmtContext) {} // ExitCommit_stmt is called when production commit_stmt is exited. func (s *BaseSQLiteParserListener) ExitCommit_stmt(ctx *Commit_stmtContext) {} // EnterRollback_stmt is called when production rollback_stmt is entered. func (s *BaseSQLiteParserListener) EnterRollback_stmt(ctx *Rollback_stmtContext) {} // ExitRollback_stmt is called when production rollback_stmt is exited. func (s *BaseSQLiteParserListener) ExitRollback_stmt(ctx *Rollback_stmtContext) {} // EnterSavepoint_stmt is called when production savepoint_stmt is entered. func (s *BaseSQLiteParserListener) EnterSavepoint_stmt(ctx *Savepoint_stmtContext) {} // ExitSavepoint_stmt is called when production savepoint_stmt is exited. func (s *BaseSQLiteParserListener) ExitSavepoint_stmt(ctx *Savepoint_stmtContext) {} // EnterRelease_stmt is called when production release_stmt is entered. func (s *BaseSQLiteParserListener) EnterRelease_stmt(ctx *Release_stmtContext) {} // ExitRelease_stmt is called when production release_stmt is exited. func (s *BaseSQLiteParserListener) ExitRelease_stmt(ctx *Release_stmtContext) {} // EnterCreate_index_stmt is called when production create_index_stmt is entered. func (s *BaseSQLiteParserListener) EnterCreate_index_stmt(ctx *Create_index_stmtContext) {} // ExitCreate_index_stmt is called when production create_index_stmt is exited. func (s *BaseSQLiteParserListener) ExitCreate_index_stmt(ctx *Create_index_stmtContext) {} // EnterIndexed_column is called when production indexed_column is entered. func (s *BaseSQLiteParserListener) EnterIndexed_column(ctx *Indexed_columnContext) {} // ExitIndexed_column is called when production indexed_column is exited. func (s *BaseSQLiteParserListener) ExitIndexed_column(ctx *Indexed_columnContext) {} // EnterTable_option is called when production table_option is entered. func (s *BaseSQLiteParserListener) EnterTable_option(ctx *Table_optionContext) {} // ExitTable_option is called when production table_option is exited. func (s *BaseSQLiteParserListener) ExitTable_option(ctx *Table_optionContext) {} // EnterCreate_table_stmt is called when production create_table_stmt is entered. func (s *BaseSQLiteParserListener) EnterCreate_table_stmt(ctx *Create_table_stmtContext) {} // ExitCreate_table_stmt is called when production create_table_stmt is exited. func (s *BaseSQLiteParserListener) ExitCreate_table_stmt(ctx *Create_table_stmtContext) {} // EnterColumn_def is called when production column_def is entered. func (s *BaseSQLiteParserListener) EnterColumn_def(ctx *Column_defContext) {} // ExitColumn_def is called when production column_def is exited. func (s *BaseSQLiteParserListener) ExitColumn_def(ctx *Column_defContext) {} // EnterType_name is called when production type_name is entered. func (s *BaseSQLiteParserListener) EnterType_name(ctx *Type_nameContext) {} // ExitType_name is called when production type_name is exited. func (s *BaseSQLiteParserListener) ExitType_name(ctx *Type_nameContext) {} // EnterColumn_constraint is called when production column_constraint is entered. func (s *BaseSQLiteParserListener) EnterColumn_constraint(ctx *Column_constraintContext) {} // ExitColumn_constraint is called when production column_constraint is exited. func (s *BaseSQLiteParserListener) ExitColumn_constraint(ctx *Column_constraintContext) {} // EnterSigned_number is called when production signed_number is entered. func (s *BaseSQLiteParserListener) EnterSigned_number(ctx *Signed_numberContext) {} // ExitSigned_number is called when production signed_number is exited. func (s *BaseSQLiteParserListener) ExitSigned_number(ctx *Signed_numberContext) {} // EnterTable_constraint is called when production table_constraint is entered. func (s *BaseSQLiteParserListener) EnterTable_constraint(ctx *Table_constraintContext) {} // ExitTable_constraint is called when production table_constraint is exited. func (s *BaseSQLiteParserListener) ExitTable_constraint(ctx *Table_constraintContext) {} // EnterForeign_key_clause is called when production foreign_key_clause is entered. func (s *BaseSQLiteParserListener) EnterForeign_key_clause(ctx *Foreign_key_clauseContext) {} // ExitForeign_key_clause is called when production foreign_key_clause is exited. func (s *BaseSQLiteParserListener) ExitForeign_key_clause(ctx *Foreign_key_clauseContext) {} // EnterConflict_clause is called when production conflict_clause is entered. func (s *BaseSQLiteParserListener) EnterConflict_clause(ctx *Conflict_clauseContext) {} // ExitConflict_clause is called when production conflict_clause is exited. func (s *BaseSQLiteParserListener) ExitConflict_clause(ctx *Conflict_clauseContext) {} // EnterCreate_trigger_stmt is called when production create_trigger_stmt is entered. func (s *BaseSQLiteParserListener) EnterCreate_trigger_stmt(ctx *Create_trigger_stmtContext) {} // ExitCreate_trigger_stmt is called when production create_trigger_stmt is exited. func (s *BaseSQLiteParserListener) ExitCreate_trigger_stmt(ctx *Create_trigger_stmtContext) {} // EnterCreate_view_stmt is called when production create_view_stmt is entered. func (s *BaseSQLiteParserListener) EnterCreate_view_stmt(ctx *Create_view_stmtContext) {} // ExitCreate_view_stmt is called when production create_view_stmt is exited. func (s *BaseSQLiteParserListener) ExitCreate_view_stmt(ctx *Create_view_stmtContext) {} // EnterCreate_virtual_table_stmt is called when production create_virtual_table_stmt is entered. func (s *BaseSQLiteParserListener) EnterCreate_virtual_table_stmt(ctx *Create_virtual_table_stmtContext) { } // ExitCreate_virtual_table_stmt is called when production create_virtual_table_stmt is exited. func (s *BaseSQLiteParserListener) ExitCreate_virtual_table_stmt(ctx *Create_virtual_table_stmtContext) { } // EnterWith_clause is called when production with_clause is entered. func (s *BaseSQLiteParserListener) EnterWith_clause(ctx *With_clauseContext) {} // ExitWith_clause is called when production with_clause is exited. func (s *BaseSQLiteParserListener) ExitWith_clause(ctx *With_clauseContext) {} // EnterCte_table_name is called when production cte_table_name is entered. func (s *BaseSQLiteParserListener) EnterCte_table_name(ctx *Cte_table_nameContext) {} // ExitCte_table_name is called when production cte_table_name is exited. func (s *BaseSQLiteParserListener) ExitCte_table_name(ctx *Cte_table_nameContext) {} // EnterRecursive_cte is called when production recursive_cte is entered. func (s *BaseSQLiteParserListener) EnterRecursive_cte(ctx *Recursive_cteContext) {} // ExitRecursive_cte is called when production recursive_cte is exited. func (s *BaseSQLiteParserListener) ExitRecursive_cte(ctx *Recursive_cteContext) {} // EnterCommon_table_expression is called when production common_table_expression is entered. func (s *BaseSQLiteParserListener) EnterCommon_table_expression(ctx *Common_table_expressionContext) { } // ExitCommon_table_expression is called when production common_table_expression is exited. func (s *BaseSQLiteParserListener) ExitCommon_table_expression(ctx *Common_table_expressionContext) {} // EnterReturning_clause is called when production returning_clause is entered. func (s *BaseSQLiteParserListener) EnterReturning_clause(ctx *Returning_clauseContext) {} // ExitReturning_clause is called when production returning_clause is exited. func (s *BaseSQLiteParserListener) ExitReturning_clause(ctx *Returning_clauseContext) {} // EnterDelete_stmt is called when production delete_stmt is entered. func (s *BaseSQLiteParserListener) EnterDelete_stmt(ctx *Delete_stmtContext) {} // ExitDelete_stmt is called when production delete_stmt is exited. func (s *BaseSQLiteParserListener) ExitDelete_stmt(ctx *Delete_stmtContext) {} // EnterDelete_stmt_limited is called when production delete_stmt_limited is entered. func (s *BaseSQLiteParserListener) EnterDelete_stmt_limited(ctx *Delete_stmt_limitedContext) {} // ExitDelete_stmt_limited is called when production delete_stmt_limited is exited. func (s *BaseSQLiteParserListener) ExitDelete_stmt_limited(ctx *Delete_stmt_limitedContext) {} // EnterDetach_stmt is called when production detach_stmt is entered. func (s *BaseSQLiteParserListener) EnterDetach_stmt(ctx *Detach_stmtContext) {} // ExitDetach_stmt is called when production detach_stmt is exited. func (s *BaseSQLiteParserListener) ExitDetach_stmt(ctx *Detach_stmtContext) {} // EnterDrop_stmt is called when production drop_stmt is entered. func (s *BaseSQLiteParserListener) EnterDrop_stmt(ctx *Drop_stmtContext) {} // ExitDrop_stmt is called when production drop_stmt is exited. func (s *BaseSQLiteParserListener) ExitDrop_stmt(ctx *Drop_stmtContext) {} // EnterExpr_case is called when production expr_case is entered. func (s *BaseSQLiteParserListener) EnterExpr_case(ctx *Expr_caseContext) {} // ExitExpr_case is called when production expr_case is exited. func (s *BaseSQLiteParserListener) ExitExpr_case(ctx *Expr_caseContext) {} // EnterExpr_raise is called when production expr_raise is entered. func (s *BaseSQLiteParserListener) EnterExpr_raise(ctx *Expr_raiseContext) {} // ExitExpr_raise is called when production expr_raise is exited. func (s *BaseSQLiteParserListener) ExitExpr_raise(ctx *Expr_raiseContext) {} // EnterExpr_function is called when production expr_function is entered. func (s *BaseSQLiteParserListener) EnterExpr_function(ctx *Expr_functionContext) {} // ExitExpr_function is called when production expr_function is exited. func (s *BaseSQLiteParserListener) ExitExpr_function(ctx *Expr_functionContext) {} // EnterExpr_comparison is called when production expr_comparison is entered. func (s *BaseSQLiteParserListener) EnterExpr_comparison(ctx *Expr_comparisonContext) {} // 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) {} // ExitExpr_binary is called when production expr_binary is exited. func (s *BaseSQLiteParserListener) ExitExpr_binary(ctx *Expr_binaryContext) {} // EnterExpr_literal is called when production expr_literal is entered. func (s *BaseSQLiteParserListener) EnterExpr_literal(ctx *Expr_literalContext) {} // ExitExpr_literal is called when production expr_literal is exited. func (s *BaseSQLiteParserListener) ExitExpr_literal(ctx *Expr_literalContext) {} // EnterExpr_cast is called when production expr_cast is entered. func (s *BaseSQLiteParserListener) EnterExpr_cast(ctx *Expr_castContext) {} // ExitExpr_cast is called when production expr_cast is exited. func (s *BaseSQLiteParserListener) ExitExpr_cast(ctx *Expr_castContext) {} // EnterExpr_in_select is called when production expr_in_select is entered. func (s *BaseSQLiteParserListener) EnterExpr_in_select(ctx *Expr_in_selectContext) {} // ExitExpr_in_select is called when production expr_in_select is exited. func (s *BaseSQLiteParserListener) ExitExpr_in_select(ctx *Expr_in_selectContext) {} // EnterExpr_list is called when production expr_list is entered. func (s *BaseSQLiteParserListener) EnterExpr_list(ctx *Expr_listContext) {} // ExitExpr_list is called when production expr_list is exited. func (s *BaseSQLiteParserListener) ExitExpr_list(ctx *Expr_listContext) {} // EnterExpr_between is called when production expr_between is entered. func (s *BaseSQLiteParserListener) EnterExpr_between(ctx *Expr_betweenContext) {} // ExitExpr_between is called when production expr_between is exited. func (s *BaseSQLiteParserListener) ExitExpr_between(ctx *Expr_betweenContext) {} // EnterExpr_collate is called when production expr_collate is entered. func (s *BaseSQLiteParserListener) EnterExpr_collate(ctx *Expr_collateContext) {} // ExitExpr_collate is called when production expr_collate is exited. func (s *BaseSQLiteParserListener) ExitExpr_collate(ctx *Expr_collateContext) {} // EnterExpr_qualified_column_name is called when production expr_qualified_column_name is entered. func (s *BaseSQLiteParserListener) EnterExpr_qualified_column_name(ctx *Expr_qualified_column_nameContext) { } // ExitExpr_qualified_column_name is called when production expr_qualified_column_name is exited. func (s *BaseSQLiteParserListener) ExitExpr_qualified_column_name(ctx *Expr_qualified_column_nameContext) { } // EnterExpr_unary is called when production expr_unary is entered. func (s *BaseSQLiteParserListener) EnterExpr_unary(ctx *Expr_unaryContext) {} // ExitExpr_unary is called when production expr_unary is exited. func (s *BaseSQLiteParserListener) ExitExpr_unary(ctx *Expr_unaryContext) {} // EnterExpr_null_comp is called when production expr_null_comp is entered. func (s *BaseSQLiteParserListener) EnterExpr_null_comp(ctx *Expr_null_compContext) {} // ExitExpr_null_comp is called when production expr_null_comp is exited. func (s *BaseSQLiteParserListener) ExitExpr_null_comp(ctx *Expr_null_compContext) {} // EnterExpr_bind is called when production expr_bind is entered. func (s *BaseSQLiteParserListener) EnterExpr_bind(ctx *Expr_bindContext) {} // ExitExpr_bind is called when production expr_bind is exited. func (s *BaseSQLiteParserListener) ExitExpr_bind(ctx *Expr_bindContext) {} // EnterRaise_function is called when production raise_function is entered. func (s *BaseSQLiteParserListener) EnterRaise_function(ctx *Raise_functionContext) {} // ExitRaise_function is called when production raise_function is exited. func (s *BaseSQLiteParserListener) ExitRaise_function(ctx *Raise_functionContext) {} // EnterLiteral_value is called when production literal_value is entered. func (s *BaseSQLiteParserListener) EnterLiteral_value(ctx *Literal_valueContext) {} // ExitLiteral_value is called when production literal_value is exited. func (s *BaseSQLiteParserListener) ExitLiteral_value(ctx *Literal_valueContext) {} // EnterInsert_stmt is called when production insert_stmt is entered. func (s *BaseSQLiteParserListener) EnterInsert_stmt(ctx *Insert_stmtContext) {} // ExitInsert_stmt is called when production insert_stmt is exited. func (s *BaseSQLiteParserListener) ExitInsert_stmt(ctx *Insert_stmtContext) {} // EnterUpsert_clause is called when production upsert_clause is entered. func (s *BaseSQLiteParserListener) EnterUpsert_clause(ctx *Upsert_clauseContext) {} // ExitUpsert_clause is called when production upsert_clause is exited. func (s *BaseSQLiteParserListener) ExitUpsert_clause(ctx *Upsert_clauseContext) {} // EnterPragma_stmt is called when production pragma_stmt is entered. func (s *BaseSQLiteParserListener) EnterPragma_stmt(ctx *Pragma_stmtContext) {} // ExitPragma_stmt is called when production pragma_stmt is exited. func (s *BaseSQLiteParserListener) ExitPragma_stmt(ctx *Pragma_stmtContext) {} // EnterPragma_value is called when production pragma_value is entered. func (s *BaseSQLiteParserListener) EnterPragma_value(ctx *Pragma_valueContext) {} // ExitPragma_value is called when production pragma_value is exited. func (s *BaseSQLiteParserListener) ExitPragma_value(ctx *Pragma_valueContext) {} // EnterReindex_stmt is called when production reindex_stmt is entered. func (s *BaseSQLiteParserListener) EnterReindex_stmt(ctx *Reindex_stmtContext) {} // ExitReindex_stmt is called when production reindex_stmt is exited. func (s *BaseSQLiteParserListener) ExitReindex_stmt(ctx *Reindex_stmtContext) {} // EnterSelect_stmt is called when production select_stmt is entered. func (s *BaseSQLiteParserListener) EnterSelect_stmt(ctx *Select_stmtContext) {} // ExitSelect_stmt is called when production select_stmt is exited. func (s *BaseSQLiteParserListener) ExitSelect_stmt(ctx *Select_stmtContext) {} // EnterJoin_clause is called when production join_clause is entered. func (s *BaseSQLiteParserListener) EnterJoin_clause(ctx *Join_clauseContext) {} // ExitJoin_clause is called when production join_clause is exited. func (s *BaseSQLiteParserListener) ExitJoin_clause(ctx *Join_clauseContext) {} // EnterSelect_core is called when production select_core is entered. func (s *BaseSQLiteParserListener) EnterSelect_core(ctx *Select_coreContext) {} // ExitSelect_core is called when production select_core is exited. func (s *BaseSQLiteParserListener) ExitSelect_core(ctx *Select_coreContext) {} // EnterFactored_select_stmt is called when production factored_select_stmt is entered. func (s *BaseSQLiteParserListener) EnterFactored_select_stmt(ctx *Factored_select_stmtContext) {} // ExitFactored_select_stmt is called when production factored_select_stmt is exited. func (s *BaseSQLiteParserListener) ExitFactored_select_stmt(ctx *Factored_select_stmtContext) {} // EnterSimple_select_stmt is called when production simple_select_stmt is entered. func (s *BaseSQLiteParserListener) EnterSimple_select_stmt(ctx *Simple_select_stmtContext) {} // ExitSimple_select_stmt is called when production simple_select_stmt is exited. func (s *BaseSQLiteParserListener) ExitSimple_select_stmt(ctx *Simple_select_stmtContext) {} // EnterCompound_select_stmt is called when production compound_select_stmt is entered. func (s *BaseSQLiteParserListener) EnterCompound_select_stmt(ctx *Compound_select_stmtContext) {} // ExitCompound_select_stmt is called when production compound_select_stmt is exited. func (s *BaseSQLiteParserListener) ExitCompound_select_stmt(ctx *Compound_select_stmtContext) {} // EnterTable_or_subquery is called when production table_or_subquery is entered. func (s *BaseSQLiteParserListener) EnterTable_or_subquery(ctx *Table_or_subqueryContext) {} // ExitTable_or_subquery is called when production table_or_subquery is exited. func (s *BaseSQLiteParserListener) ExitTable_or_subquery(ctx *Table_or_subqueryContext) {} // EnterResult_column is called when production result_column is entered. func (s *BaseSQLiteParserListener) EnterResult_column(ctx *Result_columnContext) {} // ExitResult_column is called when production result_column is exited. func (s *BaseSQLiteParserListener) ExitResult_column(ctx *Result_columnContext) {} // EnterJoin_operator is called when production join_operator is entered. func (s *BaseSQLiteParserListener) EnterJoin_operator(ctx *Join_operatorContext) {} // ExitJoin_operator is called when production join_operator is exited. func (s *BaseSQLiteParserListener) ExitJoin_operator(ctx *Join_operatorContext) {} // EnterJoin_constraint is called when production join_constraint is entered. func (s *BaseSQLiteParserListener) EnterJoin_constraint(ctx *Join_constraintContext) {} // ExitJoin_constraint is called when production join_constraint is exited. func (s *BaseSQLiteParserListener) ExitJoin_constraint(ctx *Join_constraintContext) {} // EnterCompound_operator is called when production compound_operator is entered. func (s *BaseSQLiteParserListener) EnterCompound_operator(ctx *Compound_operatorContext) {} // ExitCompound_operator is called when production compound_operator is exited. func (s *BaseSQLiteParserListener) ExitCompound_operator(ctx *Compound_operatorContext) {} // EnterUpdate_stmt is called when production update_stmt is entered. func (s *BaseSQLiteParserListener) EnterUpdate_stmt(ctx *Update_stmtContext) {} // ExitUpdate_stmt is called when production update_stmt is exited. func (s *BaseSQLiteParserListener) ExitUpdate_stmt(ctx *Update_stmtContext) {} // EnterColumn_name_list is called when production column_name_list is entered. func (s *BaseSQLiteParserListener) EnterColumn_name_list(ctx *Column_name_listContext) {} // ExitColumn_name_list is called when production column_name_list is exited. func (s *BaseSQLiteParserListener) ExitColumn_name_list(ctx *Column_name_listContext) {} // EnterUpdate_stmt_limited is called when production update_stmt_limited is entered. func (s *BaseSQLiteParserListener) EnterUpdate_stmt_limited(ctx *Update_stmt_limitedContext) {} // ExitUpdate_stmt_limited is called when production update_stmt_limited is exited. func (s *BaseSQLiteParserListener) ExitUpdate_stmt_limited(ctx *Update_stmt_limitedContext) {} // EnterQualified_table_name is called when production qualified_table_name is entered. func (s *BaseSQLiteParserListener) EnterQualified_table_name(ctx *Qualified_table_nameContext) {} // ExitQualified_table_name is called when production qualified_table_name is exited. func (s *BaseSQLiteParserListener) ExitQualified_table_name(ctx *Qualified_table_nameContext) {} // EnterVacuum_stmt is called when production vacuum_stmt is entered. func (s *BaseSQLiteParserListener) EnterVacuum_stmt(ctx *Vacuum_stmtContext) {} // ExitVacuum_stmt is called when production vacuum_stmt is exited. func (s *BaseSQLiteParserListener) ExitVacuum_stmt(ctx *Vacuum_stmtContext) {} // EnterFilter_clause is called when production filter_clause is entered. func (s *BaseSQLiteParserListener) EnterFilter_clause(ctx *Filter_clauseContext) {} // ExitFilter_clause is called when production filter_clause is exited. func (s *BaseSQLiteParserListener) ExitFilter_clause(ctx *Filter_clauseContext) {} // EnterWindow_defn is called when production window_defn is entered. func (s *BaseSQLiteParserListener) EnterWindow_defn(ctx *Window_defnContext) {} // ExitWindow_defn is called when production window_defn is exited. func (s *BaseSQLiteParserListener) ExitWindow_defn(ctx *Window_defnContext) {} // EnterOver_clause is called when production over_clause is entered. func (s *BaseSQLiteParserListener) EnterOver_clause(ctx *Over_clauseContext) {} // ExitOver_clause is called when production over_clause is exited. func (s *BaseSQLiteParserListener) ExitOver_clause(ctx *Over_clauseContext) {} // EnterFrame_spec is called when production frame_spec is entered. func (s *BaseSQLiteParserListener) EnterFrame_spec(ctx *Frame_specContext) {} // ExitFrame_spec is called when production frame_spec is exited. func (s *BaseSQLiteParserListener) ExitFrame_spec(ctx *Frame_specContext) {} // EnterFrame_clause is called when production frame_clause is entered. func (s *BaseSQLiteParserListener) EnterFrame_clause(ctx *Frame_clauseContext) {} // ExitFrame_clause is called when production frame_clause is exited. func (s *BaseSQLiteParserListener) ExitFrame_clause(ctx *Frame_clauseContext) {} // EnterSimple_function_invocation is called when production simple_function_invocation is entered. func (s *BaseSQLiteParserListener) EnterSimple_function_invocation(ctx *Simple_function_invocationContext) { } // ExitSimple_function_invocation is called when production simple_function_invocation is exited. func (s *BaseSQLiteParserListener) ExitSimple_function_invocation(ctx *Simple_function_invocationContext) { } // EnterAggregate_function_invocation is called when production aggregate_function_invocation is entered. func (s *BaseSQLiteParserListener) EnterAggregate_function_invocation(ctx *Aggregate_function_invocationContext) { } // ExitAggregate_function_invocation is called when production aggregate_function_invocation is exited. func (s *BaseSQLiteParserListener) ExitAggregate_function_invocation(ctx *Aggregate_function_invocationContext) { } // EnterWindow_function_invocation is called when production window_function_invocation is entered. func (s *BaseSQLiteParserListener) EnterWindow_function_invocation(ctx *Window_function_invocationContext) { } // ExitWindow_function_invocation is called when production window_function_invocation is exited. func (s *BaseSQLiteParserListener) ExitWindow_function_invocation(ctx *Window_function_invocationContext) { } // EnterCommon_table_stmt is called when production common_table_stmt is entered. func (s *BaseSQLiteParserListener) EnterCommon_table_stmt(ctx *Common_table_stmtContext) {} // ExitCommon_table_stmt is called when production common_table_stmt is exited. func (s *BaseSQLiteParserListener) ExitCommon_table_stmt(ctx *Common_table_stmtContext) {} // EnterOrder_by_stmt is called when production order_by_stmt is entered. func (s *BaseSQLiteParserListener) EnterOrder_by_stmt(ctx *Order_by_stmtContext) {} // ExitOrder_by_stmt is called when production order_by_stmt is exited. func (s *BaseSQLiteParserListener) ExitOrder_by_stmt(ctx *Order_by_stmtContext) {} // EnterLimit_stmt is called when production limit_stmt is entered. func (s *BaseSQLiteParserListener) EnterLimit_stmt(ctx *Limit_stmtContext) {} // ExitLimit_stmt is called when production limit_stmt is exited. func (s *BaseSQLiteParserListener) ExitLimit_stmt(ctx *Limit_stmtContext) {} // EnterOrdering_term is called when production ordering_term is entered. func (s *BaseSQLiteParserListener) EnterOrdering_term(ctx *Ordering_termContext) {} // ExitOrdering_term is called when production ordering_term is exited. func (s *BaseSQLiteParserListener) ExitOrdering_term(ctx *Ordering_termContext) {} // EnterAsc_desc is called when production asc_desc is entered. func (s *BaseSQLiteParserListener) EnterAsc_desc(ctx *Asc_descContext) {} // ExitAsc_desc is called when production asc_desc is exited. func (s *BaseSQLiteParserListener) ExitAsc_desc(ctx *Asc_descContext) {} // EnterFrame_left is called when production frame_left is entered. func (s *BaseSQLiteParserListener) EnterFrame_left(ctx *Frame_leftContext) {} // ExitFrame_left is called when production frame_left is exited. func (s *BaseSQLiteParserListener) ExitFrame_left(ctx *Frame_leftContext) {} // EnterFrame_right is called when production frame_right is entered. func (s *BaseSQLiteParserListener) EnterFrame_right(ctx *Frame_rightContext) {} // ExitFrame_right is called when production frame_right is exited. func (s *BaseSQLiteParserListener) ExitFrame_right(ctx *Frame_rightContext) {} // EnterFrame_single is called when production frame_single is entered. func (s *BaseSQLiteParserListener) EnterFrame_single(ctx *Frame_singleContext) {} // ExitFrame_single is called when production frame_single is exited. func (s *BaseSQLiteParserListener) ExitFrame_single(ctx *Frame_singleContext) {} // EnterWindow_function is called when production window_function is entered. func (s *BaseSQLiteParserListener) EnterWindow_function(ctx *Window_functionContext) {} // ExitWindow_function is called when production window_function is exited. func (s *BaseSQLiteParserListener) ExitWindow_function(ctx *Window_functionContext) {} // EnterOf_OF_fset is called when production of_OF_fset is entered. func (s *BaseSQLiteParserListener) EnterOf_OF_fset(ctx *Of_OF_fsetContext) {} // ExitOf_OF_fset is called when production of_OF_fset is exited. func (s *BaseSQLiteParserListener) ExitOf_OF_fset(ctx *Of_OF_fsetContext) {} // EnterDefault_DEFAULT__value is called when production default_DEFAULT__value is entered. func (s *BaseSQLiteParserListener) EnterDefault_DEFAULT__value(ctx *Default_DEFAULT__valueContext) {} // ExitDefault_DEFAULT__value is called when production default_DEFAULT__value is exited. func (s *BaseSQLiteParserListener) ExitDefault_DEFAULT__value(ctx *Default_DEFAULT__valueContext) {} // EnterPartition_by is called when production partition_by is entered. func (s *BaseSQLiteParserListener) EnterPartition_by(ctx *Partition_byContext) {} // ExitPartition_by is called when production partition_by is exited. func (s *BaseSQLiteParserListener) ExitPartition_by(ctx *Partition_byContext) {} // EnterOrder_by_expr is called when production order_by_expr is entered. func (s *BaseSQLiteParserListener) EnterOrder_by_expr(ctx *Order_by_exprContext) {} // ExitOrder_by_expr is called when production order_by_expr is exited. func (s *BaseSQLiteParserListener) ExitOrder_by_expr(ctx *Order_by_exprContext) {} // EnterOrder_by_expr_asc_desc is called when production order_by_expr_asc_desc is entered. func (s *BaseSQLiteParserListener) EnterOrder_by_expr_asc_desc(ctx *Order_by_expr_asc_descContext) {} // ExitOrder_by_expr_asc_desc is called when production order_by_expr_asc_desc is exited. func (s *BaseSQLiteParserListener) ExitOrder_by_expr_asc_desc(ctx *Order_by_expr_asc_descContext) {} // EnterExpr_asc_desc is called when production expr_asc_desc is entered. func (s *BaseSQLiteParserListener) EnterExpr_asc_desc(ctx *Expr_asc_descContext) {} // ExitExpr_asc_desc is called when production expr_asc_desc is exited. func (s *BaseSQLiteParserListener) ExitExpr_asc_desc(ctx *Expr_asc_descContext) {} // EnterInitial_select is called when production initial_select is entered. func (s *BaseSQLiteParserListener) EnterInitial_select(ctx *Initial_selectContext) {} // ExitInitial_select is called when production initial_select is exited. func (s *BaseSQLiteParserListener) ExitInitial_select(ctx *Initial_selectContext) {} // EnterRecursive__select is called when production recursive__select is entered. func (s *BaseSQLiteParserListener) EnterRecursive__select(ctx *Recursive__selectContext) {} // ExitRecursive__select is called when production recursive__select is exited. func (s *BaseSQLiteParserListener) ExitRecursive__select(ctx *Recursive__selectContext) {} // EnterUnary_operator is called when production unary_operator is entered. func (s *BaseSQLiteParserListener) EnterUnary_operator(ctx *Unary_operatorContext) {} // ExitUnary_operator is called when production unary_operator is exited. func (s *BaseSQLiteParserListener) ExitUnary_operator(ctx *Unary_operatorContext) {} // EnterError_message is called when production error_message is entered. func (s *BaseSQLiteParserListener) EnterError_message(ctx *Error_messageContext) {} // ExitError_message is called when production error_message is exited. func (s *BaseSQLiteParserListener) ExitError_message(ctx *Error_messageContext) {} // EnterModule_argument is called when production module_argument is entered. func (s *BaseSQLiteParserListener) EnterModule_argument(ctx *Module_argumentContext) {} // ExitModule_argument is called when production module_argument is exited. func (s *BaseSQLiteParserListener) ExitModule_argument(ctx *Module_argumentContext) {} // EnterColumn_alias is called when production column_alias is entered. func (s *BaseSQLiteParserListener) EnterColumn_alias(ctx *Column_aliasContext) {} // ExitColumn_alias is called when production column_alias is exited. func (s *BaseSQLiteParserListener) ExitColumn_alias(ctx *Column_aliasContext) {} // EnterKeyword is called when production keyword is entered. func (s *BaseSQLiteParserListener) EnterKeyword(ctx *KeywordContext) {} // ExitKeyword is called when production keyword is exited. func (s *BaseSQLiteParserListener) ExitKeyword(ctx *KeywordContext) {} // EnterName is called when production name is entered. func (s *BaseSQLiteParserListener) EnterName(ctx *NameContext) {} // ExitName is called when production name is exited. func (s *BaseSQLiteParserListener) ExitName(ctx *NameContext) {} // EnterFunction_name is called when production function_name is entered. func (s *BaseSQLiteParserListener) EnterFunction_name(ctx *Function_nameContext) {} // ExitFunction_name is called when production function_name is exited. func (s *BaseSQLiteParserListener) ExitFunction_name(ctx *Function_nameContext) {} // EnterQualified_function_name is called when production qualified_function_name is entered. func (s *BaseSQLiteParserListener) EnterQualified_function_name(ctx *Qualified_function_nameContext) { } // ExitQualified_function_name is called when production qualified_function_name is exited. func (s *BaseSQLiteParserListener) ExitQualified_function_name(ctx *Qualified_function_nameContext) {} // EnterSchema_name is called when production schema_name is entered. func (s *BaseSQLiteParserListener) EnterSchema_name(ctx *Schema_nameContext) {} // ExitSchema_name is called when production schema_name is exited. func (s *BaseSQLiteParserListener) ExitSchema_name(ctx *Schema_nameContext) {} // EnterTable_name is called when production table_name is entered. func (s *BaseSQLiteParserListener) EnterTable_name(ctx *Table_nameContext) {} // ExitTable_name is called when production table_name is exited. func (s *BaseSQLiteParserListener) ExitTable_name(ctx *Table_nameContext) {} // EnterTable_or_index_name is called when production table_or_index_name is entered. func (s *BaseSQLiteParserListener) EnterTable_or_index_name(ctx *Table_or_index_nameContext) {} // ExitTable_or_index_name is called when production table_or_index_name is exited. func (s *BaseSQLiteParserListener) ExitTable_or_index_name(ctx *Table_or_index_nameContext) {} // EnterNew_table_name is called when production new_table_name is entered. func (s *BaseSQLiteParserListener) EnterNew_table_name(ctx *New_table_nameContext) {} // ExitNew_table_name is called when production new_table_name is exited. func (s *BaseSQLiteParserListener) ExitNew_table_name(ctx *New_table_nameContext) {} // EnterColumn_name is called when production column_name is entered. func (s *BaseSQLiteParserListener) EnterColumn_name(ctx *Column_nameContext) {} // ExitColumn_name is called when production column_name is exited. func (s *BaseSQLiteParserListener) ExitColumn_name(ctx *Column_nameContext) {} // EnterCollation_name is called when production collation_name is entered. func (s *BaseSQLiteParserListener) EnterCollation_name(ctx *Collation_nameContext) {} // ExitCollation_name is called when production collation_name is exited. func (s *BaseSQLiteParserListener) ExitCollation_name(ctx *Collation_nameContext) {} // EnterForeign_table is called when production foreign_table is entered. func (s *BaseSQLiteParserListener) EnterForeign_table(ctx *Foreign_tableContext) {} // ExitForeign_table is called when production foreign_table is exited. func (s *BaseSQLiteParserListener) ExitForeign_table(ctx *Foreign_tableContext) {} // EnterIndex_name is called when production index_name is entered. func (s *BaseSQLiteParserListener) EnterIndex_name(ctx *Index_nameContext) {} // ExitIndex_name is called when production index_name is exited. func (s *BaseSQLiteParserListener) ExitIndex_name(ctx *Index_nameContext) {} // EnterTrigger_name is called when production trigger_name is entered. func (s *BaseSQLiteParserListener) EnterTrigger_name(ctx *Trigger_nameContext) {} // ExitTrigger_name is called when production trigger_name is exited. func (s *BaseSQLiteParserListener) ExitTrigger_name(ctx *Trigger_nameContext) {} // EnterView_name is called when production view_name is entered. func (s *BaseSQLiteParserListener) EnterView_name(ctx *View_nameContext) {} // ExitView_name is called when production view_name is exited. func (s *BaseSQLiteParserListener) ExitView_name(ctx *View_nameContext) {} // EnterModule_name is called when production module_name is entered. func (s *BaseSQLiteParserListener) EnterModule_name(ctx *Module_nameContext) {} // ExitModule_name is called when production module_name is exited. func (s *BaseSQLiteParserListener) ExitModule_name(ctx *Module_nameContext) {} // EnterPragma_name is called when production pragma_name is entered. func (s *BaseSQLiteParserListener) EnterPragma_name(ctx *Pragma_nameContext) {} // ExitPragma_name is called when production pragma_name is exited. func (s *BaseSQLiteParserListener) ExitPragma_name(ctx *Pragma_nameContext) {} // EnterSavepoint_name is called when production savepoint_name is entered. func (s *BaseSQLiteParserListener) EnterSavepoint_name(ctx *Savepoint_nameContext) {} // ExitSavepoint_name is called when production savepoint_name is exited. func (s *BaseSQLiteParserListener) ExitSavepoint_name(ctx *Savepoint_nameContext) {} // EnterTable_alias is called when production table_alias is entered. func (s *BaseSQLiteParserListener) EnterTable_alias(ctx *Table_aliasContext) {} // ExitTable_alias is called when production table_alias is exited. func (s *BaseSQLiteParserListener) ExitTable_alias(ctx *Table_aliasContext) {} // EnterTable_alias_fallback is called when production table_alias_fallback is entered. func (s *BaseSQLiteParserListener) EnterTable_alias_fallback(ctx *Table_alias_fallbackContext) {} // ExitTable_alias_fallback is called when production table_alias_fallback is exited. func (s *BaseSQLiteParserListener) ExitTable_alias_fallback(ctx *Table_alias_fallbackContext) {} // EnterTransaction_name is called when production transaction_name is entered. func (s *BaseSQLiteParserListener) EnterTransaction_name(ctx *Transaction_nameContext) {} // ExitTransaction_name is called when production transaction_name is exited. func (s *BaseSQLiteParserListener) ExitTransaction_name(ctx *Transaction_nameContext) {} // EnterWindow_name is called when production window_name is entered. func (s *BaseSQLiteParserListener) EnterWindow_name(ctx *Window_nameContext) {} // ExitWindow_name is called when production window_name is exited. func (s *BaseSQLiteParserListener) ExitWindow_name(ctx *Window_nameContext) {} // EnterAlias is called when production alias is entered. func (s *BaseSQLiteParserListener) EnterAlias(ctx *AliasContext) {} // ExitAlias is called when production alias is exited. func (s *BaseSQLiteParserListener) ExitAlias(ctx *AliasContext) {} // EnterFilename is called when production filename is entered. func (s *BaseSQLiteParserListener) EnterFilename(ctx *FilenameContext) {} // ExitFilename is called when production filename is exited. func (s *BaseSQLiteParserListener) ExitFilename(ctx *FilenameContext) {} // EnterBase_window_name is called when production base_window_name is entered. func (s *BaseSQLiteParserListener) EnterBase_window_name(ctx *Base_window_nameContext) {} // ExitBase_window_name is called when production base_window_name is exited. func (s *BaseSQLiteParserListener) ExitBase_window_name(ctx *Base_window_nameContext) {} // EnterSimple_func is called when production simple_func is entered. func (s *BaseSQLiteParserListener) EnterSimple_func(ctx *Simple_funcContext) {} // ExitSimple_func is called when production simple_func is exited. func (s *BaseSQLiteParserListener) ExitSimple_func(ctx *Simple_funcContext) {} // EnterAggregate_func is called when production aggregate_func is entered. func (s *BaseSQLiteParserListener) EnterAggregate_func(ctx *Aggregate_funcContext) {} // ExitAggregate_func is called when production aggregate_func is exited. func (s *BaseSQLiteParserListener) ExitAggregate_func(ctx *Aggregate_funcContext) {} // EnterTable_function_name is called when production table_function_name is entered. func (s *BaseSQLiteParserListener) EnterTable_function_name(ctx *Table_function_nameContext) {} // ExitTable_function_name is called when production table_function_name is exited. func (s *BaseSQLiteParserListener) ExitTable_function_name(ctx *Table_function_nameContext) {} // EnterAny_name is called when production any_name is entered. func (s *BaseSQLiteParserListener) EnterAny_name(ctx *Any_nameContext) {} // ExitAny_name is called when production any_name is exited. func (s *BaseSQLiteParserListener) ExitAny_name(ctx *Any_nameContext) {} ================================================ FILE: internal/engine/sqlite/parser/sqliteparser_listener.go ================================================ // Code generated from SQLiteParser.g4 by ANTLR 4.13.1. DO NOT EDIT. package parser // SQLiteParser import "github.com/antlr4-go/antlr/v4" // SQLiteParserListener is a complete listener for a parse tree produced by SQLiteParser. type SQLiteParserListener interface { antlr.ParseTreeListener // EnterParse is called when entering the parse production. EnterParse(c *ParseContext) // EnterSql_stmt_list is called when entering the sql_stmt_list production. EnterSql_stmt_list(c *Sql_stmt_listContext) // EnterSql_stmt is called when entering the sql_stmt production. EnterSql_stmt(c *Sql_stmtContext) // EnterAlter_table_stmt is called when entering the alter_table_stmt production. EnterAlter_table_stmt(c *Alter_table_stmtContext) // EnterAnalyze_stmt is called when entering the analyze_stmt production. EnterAnalyze_stmt(c *Analyze_stmtContext) // EnterAttach_stmt is called when entering the attach_stmt production. EnterAttach_stmt(c *Attach_stmtContext) // EnterBegin_stmt is called when entering the begin_stmt production. EnterBegin_stmt(c *Begin_stmtContext) // EnterCommit_stmt is called when entering the commit_stmt production. EnterCommit_stmt(c *Commit_stmtContext) // EnterRollback_stmt is called when entering the rollback_stmt production. EnterRollback_stmt(c *Rollback_stmtContext) // EnterSavepoint_stmt is called when entering the savepoint_stmt production. EnterSavepoint_stmt(c *Savepoint_stmtContext) // EnterRelease_stmt is called when entering the release_stmt production. EnterRelease_stmt(c *Release_stmtContext) // EnterCreate_index_stmt is called when entering the create_index_stmt production. EnterCreate_index_stmt(c *Create_index_stmtContext) // EnterIndexed_column is called when entering the indexed_column production. EnterIndexed_column(c *Indexed_columnContext) // EnterTable_option is called when entering the table_option production. EnterTable_option(c *Table_optionContext) // EnterCreate_table_stmt is called when entering the create_table_stmt production. EnterCreate_table_stmt(c *Create_table_stmtContext) // EnterColumn_def is called when entering the column_def production. EnterColumn_def(c *Column_defContext) // EnterType_name is called when entering the type_name production. EnterType_name(c *Type_nameContext) // EnterColumn_constraint is called when entering the column_constraint production. EnterColumn_constraint(c *Column_constraintContext) // EnterSigned_number is called when entering the signed_number production. EnterSigned_number(c *Signed_numberContext) // EnterTable_constraint is called when entering the table_constraint production. EnterTable_constraint(c *Table_constraintContext) // EnterForeign_key_clause is called when entering the foreign_key_clause production. EnterForeign_key_clause(c *Foreign_key_clauseContext) // EnterConflict_clause is called when entering the conflict_clause production. EnterConflict_clause(c *Conflict_clauseContext) // EnterCreate_trigger_stmt is called when entering the create_trigger_stmt production. EnterCreate_trigger_stmt(c *Create_trigger_stmtContext) // EnterCreate_view_stmt is called when entering the create_view_stmt production. EnterCreate_view_stmt(c *Create_view_stmtContext) // EnterCreate_virtual_table_stmt is called when entering the create_virtual_table_stmt production. EnterCreate_virtual_table_stmt(c *Create_virtual_table_stmtContext) // EnterWith_clause is called when entering the with_clause production. EnterWith_clause(c *With_clauseContext) // EnterCte_table_name is called when entering the cte_table_name production. EnterCte_table_name(c *Cte_table_nameContext) // EnterRecursive_cte is called when entering the recursive_cte production. EnterRecursive_cte(c *Recursive_cteContext) // EnterCommon_table_expression is called when entering the common_table_expression production. EnterCommon_table_expression(c *Common_table_expressionContext) // EnterReturning_clause is called when entering the returning_clause production. EnterReturning_clause(c *Returning_clauseContext) // EnterDelete_stmt is called when entering the delete_stmt production. EnterDelete_stmt(c *Delete_stmtContext) // EnterDelete_stmt_limited is called when entering the delete_stmt_limited production. EnterDelete_stmt_limited(c *Delete_stmt_limitedContext) // EnterDetach_stmt is called when entering the detach_stmt production. EnterDetach_stmt(c *Detach_stmtContext) // EnterDrop_stmt is called when entering the drop_stmt production. EnterDrop_stmt(c *Drop_stmtContext) // EnterExpr_case is called when entering the expr_case production. EnterExpr_case(c *Expr_caseContext) // EnterExpr_raise is called when entering the expr_raise production. EnterExpr_raise(c *Expr_raiseContext) // EnterExpr_function is called when entering the expr_function production. EnterExpr_function(c *Expr_functionContext) // 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) // EnterExpr_literal is called when entering the expr_literal production. EnterExpr_literal(c *Expr_literalContext) // EnterExpr_cast is called when entering the expr_cast production. EnterExpr_cast(c *Expr_castContext) // EnterExpr_in_select is called when entering the expr_in_select production. EnterExpr_in_select(c *Expr_in_selectContext) // EnterExpr_list is called when entering the expr_list production. EnterExpr_list(c *Expr_listContext) // EnterExpr_between is called when entering the expr_between production. EnterExpr_between(c *Expr_betweenContext) // EnterExpr_collate is called when entering the expr_collate production. EnterExpr_collate(c *Expr_collateContext) // EnterExpr_qualified_column_name is called when entering the expr_qualified_column_name production. EnterExpr_qualified_column_name(c *Expr_qualified_column_nameContext) // EnterExpr_unary is called when entering the expr_unary production. EnterExpr_unary(c *Expr_unaryContext) // EnterExpr_null_comp is called when entering the expr_null_comp production. EnterExpr_null_comp(c *Expr_null_compContext) // EnterExpr_bind is called when entering the expr_bind production. EnterExpr_bind(c *Expr_bindContext) // EnterRaise_function is called when entering the raise_function production. EnterRaise_function(c *Raise_functionContext) // EnterLiteral_value is called when entering the literal_value production. EnterLiteral_value(c *Literal_valueContext) // EnterInsert_stmt is called when entering the insert_stmt production. EnterInsert_stmt(c *Insert_stmtContext) // EnterUpsert_clause is called when entering the upsert_clause production. EnterUpsert_clause(c *Upsert_clauseContext) // EnterPragma_stmt is called when entering the pragma_stmt production. EnterPragma_stmt(c *Pragma_stmtContext) // EnterPragma_value is called when entering the pragma_value production. EnterPragma_value(c *Pragma_valueContext) // EnterReindex_stmt is called when entering the reindex_stmt production. EnterReindex_stmt(c *Reindex_stmtContext) // EnterSelect_stmt is called when entering the select_stmt production. EnterSelect_stmt(c *Select_stmtContext) // EnterJoin_clause is called when entering the join_clause production. EnterJoin_clause(c *Join_clauseContext) // EnterSelect_core is called when entering the select_core production. EnterSelect_core(c *Select_coreContext) // EnterFactored_select_stmt is called when entering the factored_select_stmt production. EnterFactored_select_stmt(c *Factored_select_stmtContext) // EnterSimple_select_stmt is called when entering the simple_select_stmt production. EnterSimple_select_stmt(c *Simple_select_stmtContext) // EnterCompound_select_stmt is called when entering the compound_select_stmt production. EnterCompound_select_stmt(c *Compound_select_stmtContext) // EnterTable_or_subquery is called when entering the table_or_subquery production. EnterTable_or_subquery(c *Table_or_subqueryContext) // EnterResult_column is called when entering the result_column production. EnterResult_column(c *Result_columnContext) // EnterJoin_operator is called when entering the join_operator production. EnterJoin_operator(c *Join_operatorContext) // EnterJoin_constraint is called when entering the join_constraint production. EnterJoin_constraint(c *Join_constraintContext) // EnterCompound_operator is called when entering the compound_operator production. EnterCompound_operator(c *Compound_operatorContext) // EnterUpdate_stmt is called when entering the update_stmt production. EnterUpdate_stmt(c *Update_stmtContext) // EnterColumn_name_list is called when entering the column_name_list production. EnterColumn_name_list(c *Column_name_listContext) // EnterUpdate_stmt_limited is called when entering the update_stmt_limited production. EnterUpdate_stmt_limited(c *Update_stmt_limitedContext) // EnterQualified_table_name is called when entering the qualified_table_name production. EnterQualified_table_name(c *Qualified_table_nameContext) // EnterVacuum_stmt is called when entering the vacuum_stmt production. EnterVacuum_stmt(c *Vacuum_stmtContext) // EnterFilter_clause is called when entering the filter_clause production. EnterFilter_clause(c *Filter_clauseContext) // EnterWindow_defn is called when entering the window_defn production. EnterWindow_defn(c *Window_defnContext) // EnterOver_clause is called when entering the over_clause production. EnterOver_clause(c *Over_clauseContext) // EnterFrame_spec is called when entering the frame_spec production. EnterFrame_spec(c *Frame_specContext) // EnterFrame_clause is called when entering the frame_clause production. EnterFrame_clause(c *Frame_clauseContext) // EnterSimple_function_invocation is called when entering the simple_function_invocation production. EnterSimple_function_invocation(c *Simple_function_invocationContext) // EnterAggregate_function_invocation is called when entering the aggregate_function_invocation production. EnterAggregate_function_invocation(c *Aggregate_function_invocationContext) // EnterWindow_function_invocation is called when entering the window_function_invocation production. EnterWindow_function_invocation(c *Window_function_invocationContext) // EnterCommon_table_stmt is called when entering the common_table_stmt production. EnterCommon_table_stmt(c *Common_table_stmtContext) // EnterOrder_by_stmt is called when entering the order_by_stmt production. EnterOrder_by_stmt(c *Order_by_stmtContext) // EnterLimit_stmt is called when entering the limit_stmt production. EnterLimit_stmt(c *Limit_stmtContext) // EnterOrdering_term is called when entering the ordering_term production. EnterOrdering_term(c *Ordering_termContext) // EnterAsc_desc is called when entering the asc_desc production. EnterAsc_desc(c *Asc_descContext) // EnterFrame_left is called when entering the frame_left production. EnterFrame_left(c *Frame_leftContext) // EnterFrame_right is called when entering the frame_right production. EnterFrame_right(c *Frame_rightContext) // EnterFrame_single is called when entering the frame_single production. EnterFrame_single(c *Frame_singleContext) // EnterWindow_function is called when entering the window_function production. EnterWindow_function(c *Window_functionContext) // EnterOf_OF_fset is called when entering the of_OF_fset production. EnterOf_OF_fset(c *Of_OF_fsetContext) // EnterDefault_DEFAULT__value is called when entering the default_DEFAULT__value production. EnterDefault_DEFAULT__value(c *Default_DEFAULT__valueContext) // EnterPartition_by is called when entering the partition_by production. EnterPartition_by(c *Partition_byContext) // EnterOrder_by_expr is called when entering the order_by_expr production. EnterOrder_by_expr(c *Order_by_exprContext) // EnterOrder_by_expr_asc_desc is called when entering the order_by_expr_asc_desc production. EnterOrder_by_expr_asc_desc(c *Order_by_expr_asc_descContext) // EnterExpr_asc_desc is called when entering the expr_asc_desc production. EnterExpr_asc_desc(c *Expr_asc_descContext) // EnterInitial_select is called when entering the initial_select production. EnterInitial_select(c *Initial_selectContext) // EnterRecursive__select is called when entering the recursive__select production. EnterRecursive__select(c *Recursive__selectContext) // EnterUnary_operator is called when entering the unary_operator production. EnterUnary_operator(c *Unary_operatorContext) // EnterError_message is called when entering the error_message production. EnterError_message(c *Error_messageContext) // EnterModule_argument is called when entering the module_argument production. EnterModule_argument(c *Module_argumentContext) // EnterColumn_alias is called when entering the column_alias production. EnterColumn_alias(c *Column_aliasContext) // EnterKeyword is called when entering the keyword production. EnterKeyword(c *KeywordContext) // EnterName is called when entering the name production. EnterName(c *NameContext) // EnterFunction_name is called when entering the function_name production. EnterFunction_name(c *Function_nameContext) // EnterQualified_function_name is called when entering the qualified_function_name production. EnterQualified_function_name(c *Qualified_function_nameContext) // EnterSchema_name is called when entering the schema_name production. EnterSchema_name(c *Schema_nameContext) // EnterTable_name is called when entering the table_name production. EnterTable_name(c *Table_nameContext) // EnterTable_or_index_name is called when entering the table_or_index_name production. EnterTable_or_index_name(c *Table_or_index_nameContext) // EnterNew_table_name is called when entering the new_table_name production. EnterNew_table_name(c *New_table_nameContext) // EnterColumn_name is called when entering the column_name production. EnterColumn_name(c *Column_nameContext) // EnterCollation_name is called when entering the collation_name production. EnterCollation_name(c *Collation_nameContext) // EnterForeign_table is called when entering the foreign_table production. EnterForeign_table(c *Foreign_tableContext) // EnterIndex_name is called when entering the index_name production. EnterIndex_name(c *Index_nameContext) // EnterTrigger_name is called when entering the trigger_name production. EnterTrigger_name(c *Trigger_nameContext) // EnterView_name is called when entering the view_name production. EnterView_name(c *View_nameContext) // EnterModule_name is called when entering the module_name production. EnterModule_name(c *Module_nameContext) // EnterPragma_name is called when entering the pragma_name production. EnterPragma_name(c *Pragma_nameContext) // EnterSavepoint_name is called when entering the savepoint_name production. EnterSavepoint_name(c *Savepoint_nameContext) // EnterTable_alias is called when entering the table_alias production. EnterTable_alias(c *Table_aliasContext) // EnterTable_alias_fallback is called when entering the table_alias_fallback production. EnterTable_alias_fallback(c *Table_alias_fallbackContext) // EnterTransaction_name is called when entering the transaction_name production. EnterTransaction_name(c *Transaction_nameContext) // EnterWindow_name is called when entering the window_name production. EnterWindow_name(c *Window_nameContext) // EnterAlias is called when entering the alias production. EnterAlias(c *AliasContext) // EnterFilename is called when entering the filename production. EnterFilename(c *FilenameContext) // EnterBase_window_name is called when entering the base_window_name production. EnterBase_window_name(c *Base_window_nameContext) // EnterSimple_func is called when entering the simple_func production. EnterSimple_func(c *Simple_funcContext) // EnterAggregate_func is called when entering the aggregate_func production. EnterAggregate_func(c *Aggregate_funcContext) // EnterTable_function_name is called when entering the table_function_name production. EnterTable_function_name(c *Table_function_nameContext) // EnterAny_name is called when entering the any_name production. EnterAny_name(c *Any_nameContext) // ExitParse is called when exiting the parse production. ExitParse(c *ParseContext) // ExitSql_stmt_list is called when exiting the sql_stmt_list production. ExitSql_stmt_list(c *Sql_stmt_listContext) // ExitSql_stmt is called when exiting the sql_stmt production. ExitSql_stmt(c *Sql_stmtContext) // ExitAlter_table_stmt is called when exiting the alter_table_stmt production. ExitAlter_table_stmt(c *Alter_table_stmtContext) // ExitAnalyze_stmt is called when exiting the analyze_stmt production. ExitAnalyze_stmt(c *Analyze_stmtContext) // ExitAttach_stmt is called when exiting the attach_stmt production. ExitAttach_stmt(c *Attach_stmtContext) // ExitBegin_stmt is called when exiting the begin_stmt production. ExitBegin_stmt(c *Begin_stmtContext) // ExitCommit_stmt is called when exiting the commit_stmt production. ExitCommit_stmt(c *Commit_stmtContext) // ExitRollback_stmt is called when exiting the rollback_stmt production. ExitRollback_stmt(c *Rollback_stmtContext) // ExitSavepoint_stmt is called when exiting the savepoint_stmt production. ExitSavepoint_stmt(c *Savepoint_stmtContext) // ExitRelease_stmt is called when exiting the release_stmt production. ExitRelease_stmt(c *Release_stmtContext) // ExitCreate_index_stmt is called when exiting the create_index_stmt production. ExitCreate_index_stmt(c *Create_index_stmtContext) // ExitIndexed_column is called when exiting the indexed_column production. ExitIndexed_column(c *Indexed_columnContext) // ExitTable_option is called when exiting the table_option production. ExitTable_option(c *Table_optionContext) // ExitCreate_table_stmt is called when exiting the create_table_stmt production. ExitCreate_table_stmt(c *Create_table_stmtContext) // ExitColumn_def is called when exiting the column_def production. ExitColumn_def(c *Column_defContext) // ExitType_name is called when exiting the type_name production. ExitType_name(c *Type_nameContext) // ExitColumn_constraint is called when exiting the column_constraint production. ExitColumn_constraint(c *Column_constraintContext) // ExitSigned_number is called when exiting the signed_number production. ExitSigned_number(c *Signed_numberContext) // ExitTable_constraint is called when exiting the table_constraint production. ExitTable_constraint(c *Table_constraintContext) // ExitForeign_key_clause is called when exiting the foreign_key_clause production. ExitForeign_key_clause(c *Foreign_key_clauseContext) // ExitConflict_clause is called when exiting the conflict_clause production. ExitConflict_clause(c *Conflict_clauseContext) // ExitCreate_trigger_stmt is called when exiting the create_trigger_stmt production. ExitCreate_trigger_stmt(c *Create_trigger_stmtContext) // ExitCreate_view_stmt is called when exiting the create_view_stmt production. ExitCreate_view_stmt(c *Create_view_stmtContext) // ExitCreate_virtual_table_stmt is called when exiting the create_virtual_table_stmt production. ExitCreate_virtual_table_stmt(c *Create_virtual_table_stmtContext) // ExitWith_clause is called when exiting the with_clause production. ExitWith_clause(c *With_clauseContext) // ExitCte_table_name is called when exiting the cte_table_name production. ExitCte_table_name(c *Cte_table_nameContext) // ExitRecursive_cte is called when exiting the recursive_cte production. ExitRecursive_cte(c *Recursive_cteContext) // ExitCommon_table_expression is called when exiting the common_table_expression production. ExitCommon_table_expression(c *Common_table_expressionContext) // ExitReturning_clause is called when exiting the returning_clause production. ExitReturning_clause(c *Returning_clauseContext) // ExitDelete_stmt is called when exiting the delete_stmt production. ExitDelete_stmt(c *Delete_stmtContext) // ExitDelete_stmt_limited is called when exiting the delete_stmt_limited production. ExitDelete_stmt_limited(c *Delete_stmt_limitedContext) // ExitDetach_stmt is called when exiting the detach_stmt production. ExitDetach_stmt(c *Detach_stmtContext) // ExitDrop_stmt is called when exiting the drop_stmt production. ExitDrop_stmt(c *Drop_stmtContext) // ExitExpr_case is called when exiting the expr_case production. ExitExpr_case(c *Expr_caseContext) // ExitExpr_raise is called when exiting the expr_raise production. ExitExpr_raise(c *Expr_raiseContext) // ExitExpr_function is called when exiting the expr_function production. ExitExpr_function(c *Expr_functionContext) // 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) // ExitExpr_literal is called when exiting the expr_literal production. ExitExpr_literal(c *Expr_literalContext) // ExitExpr_cast is called when exiting the expr_cast production. ExitExpr_cast(c *Expr_castContext) // ExitExpr_in_select is called when exiting the expr_in_select production. ExitExpr_in_select(c *Expr_in_selectContext) // ExitExpr_list is called when exiting the expr_list production. ExitExpr_list(c *Expr_listContext) // ExitExpr_between is called when exiting the expr_between production. ExitExpr_between(c *Expr_betweenContext) // ExitExpr_collate is called when exiting the expr_collate production. ExitExpr_collate(c *Expr_collateContext) // ExitExpr_qualified_column_name is called when exiting the expr_qualified_column_name production. ExitExpr_qualified_column_name(c *Expr_qualified_column_nameContext) // ExitExpr_unary is called when exiting the expr_unary production. ExitExpr_unary(c *Expr_unaryContext) // ExitExpr_null_comp is called when exiting the expr_null_comp production. ExitExpr_null_comp(c *Expr_null_compContext) // ExitExpr_bind is called when exiting the expr_bind production. ExitExpr_bind(c *Expr_bindContext) // ExitRaise_function is called when exiting the raise_function production. ExitRaise_function(c *Raise_functionContext) // ExitLiteral_value is called when exiting the literal_value production. ExitLiteral_value(c *Literal_valueContext) // ExitInsert_stmt is called when exiting the insert_stmt production. ExitInsert_stmt(c *Insert_stmtContext) // ExitUpsert_clause is called when exiting the upsert_clause production. ExitUpsert_clause(c *Upsert_clauseContext) // ExitPragma_stmt is called when exiting the pragma_stmt production. ExitPragma_stmt(c *Pragma_stmtContext) // ExitPragma_value is called when exiting the pragma_value production. ExitPragma_value(c *Pragma_valueContext) // ExitReindex_stmt is called when exiting the reindex_stmt production. ExitReindex_stmt(c *Reindex_stmtContext) // ExitSelect_stmt is called when exiting the select_stmt production. ExitSelect_stmt(c *Select_stmtContext) // ExitJoin_clause is called when exiting the join_clause production. ExitJoin_clause(c *Join_clauseContext) // ExitSelect_core is called when exiting the select_core production. ExitSelect_core(c *Select_coreContext) // ExitFactored_select_stmt is called when exiting the factored_select_stmt production. ExitFactored_select_stmt(c *Factored_select_stmtContext) // ExitSimple_select_stmt is called when exiting the simple_select_stmt production. ExitSimple_select_stmt(c *Simple_select_stmtContext) // ExitCompound_select_stmt is called when exiting the compound_select_stmt production. ExitCompound_select_stmt(c *Compound_select_stmtContext) // ExitTable_or_subquery is called when exiting the table_or_subquery production. ExitTable_or_subquery(c *Table_or_subqueryContext) // ExitResult_column is called when exiting the result_column production. ExitResult_column(c *Result_columnContext) // ExitJoin_operator is called when exiting the join_operator production. ExitJoin_operator(c *Join_operatorContext) // ExitJoin_constraint is called when exiting the join_constraint production. ExitJoin_constraint(c *Join_constraintContext) // ExitCompound_operator is called when exiting the compound_operator production. ExitCompound_operator(c *Compound_operatorContext) // ExitUpdate_stmt is called when exiting the update_stmt production. ExitUpdate_stmt(c *Update_stmtContext) // ExitColumn_name_list is called when exiting the column_name_list production. ExitColumn_name_list(c *Column_name_listContext) // ExitUpdate_stmt_limited is called when exiting the update_stmt_limited production. ExitUpdate_stmt_limited(c *Update_stmt_limitedContext) // ExitQualified_table_name is called when exiting the qualified_table_name production. ExitQualified_table_name(c *Qualified_table_nameContext) // ExitVacuum_stmt is called when exiting the vacuum_stmt production. ExitVacuum_stmt(c *Vacuum_stmtContext) // ExitFilter_clause is called when exiting the filter_clause production. ExitFilter_clause(c *Filter_clauseContext) // ExitWindow_defn is called when exiting the window_defn production. ExitWindow_defn(c *Window_defnContext) // ExitOver_clause is called when exiting the over_clause production. ExitOver_clause(c *Over_clauseContext) // ExitFrame_spec is called when exiting the frame_spec production. ExitFrame_spec(c *Frame_specContext) // ExitFrame_clause is called when exiting the frame_clause production. ExitFrame_clause(c *Frame_clauseContext) // ExitSimple_function_invocation is called when exiting the simple_function_invocation production. ExitSimple_function_invocation(c *Simple_function_invocationContext) // ExitAggregate_function_invocation is called when exiting the aggregate_function_invocation production. ExitAggregate_function_invocation(c *Aggregate_function_invocationContext) // ExitWindow_function_invocation is called when exiting the window_function_invocation production. ExitWindow_function_invocation(c *Window_function_invocationContext) // ExitCommon_table_stmt is called when exiting the common_table_stmt production. ExitCommon_table_stmt(c *Common_table_stmtContext) // ExitOrder_by_stmt is called when exiting the order_by_stmt production. ExitOrder_by_stmt(c *Order_by_stmtContext) // ExitLimit_stmt is called when exiting the limit_stmt production. ExitLimit_stmt(c *Limit_stmtContext) // ExitOrdering_term is called when exiting the ordering_term production. ExitOrdering_term(c *Ordering_termContext) // ExitAsc_desc is called when exiting the asc_desc production. ExitAsc_desc(c *Asc_descContext) // ExitFrame_left is called when exiting the frame_left production. ExitFrame_left(c *Frame_leftContext) // ExitFrame_right is called when exiting the frame_right production. ExitFrame_right(c *Frame_rightContext) // ExitFrame_single is called when exiting the frame_single production. ExitFrame_single(c *Frame_singleContext) // ExitWindow_function is called when exiting the window_function production. ExitWindow_function(c *Window_functionContext) // ExitOf_OF_fset is called when exiting the of_OF_fset production. ExitOf_OF_fset(c *Of_OF_fsetContext) // ExitDefault_DEFAULT__value is called when exiting the default_DEFAULT__value production. ExitDefault_DEFAULT__value(c *Default_DEFAULT__valueContext) // ExitPartition_by is called when exiting the partition_by production. ExitPartition_by(c *Partition_byContext) // ExitOrder_by_expr is called when exiting the order_by_expr production. ExitOrder_by_expr(c *Order_by_exprContext) // ExitOrder_by_expr_asc_desc is called when exiting the order_by_expr_asc_desc production. ExitOrder_by_expr_asc_desc(c *Order_by_expr_asc_descContext) // ExitExpr_asc_desc is called when exiting the expr_asc_desc production. ExitExpr_asc_desc(c *Expr_asc_descContext) // ExitInitial_select is called when exiting the initial_select production. ExitInitial_select(c *Initial_selectContext) // ExitRecursive__select is called when exiting the recursive__select production. ExitRecursive__select(c *Recursive__selectContext) // ExitUnary_operator is called when exiting the unary_operator production. ExitUnary_operator(c *Unary_operatorContext) // ExitError_message is called when exiting the error_message production. ExitError_message(c *Error_messageContext) // ExitModule_argument is called when exiting the module_argument production. ExitModule_argument(c *Module_argumentContext) // ExitColumn_alias is called when exiting the column_alias production. ExitColumn_alias(c *Column_aliasContext) // ExitKeyword is called when exiting the keyword production. ExitKeyword(c *KeywordContext) // ExitName is called when exiting the name production. ExitName(c *NameContext) // ExitFunction_name is called when exiting the function_name production. ExitFunction_name(c *Function_nameContext) // ExitQualified_function_name is called when exiting the qualified_function_name production. ExitQualified_function_name(c *Qualified_function_nameContext) // ExitSchema_name is called when exiting the schema_name production. ExitSchema_name(c *Schema_nameContext) // ExitTable_name is called when exiting the table_name production. ExitTable_name(c *Table_nameContext) // ExitTable_or_index_name is called when exiting the table_or_index_name production. ExitTable_or_index_name(c *Table_or_index_nameContext) // ExitNew_table_name is called when exiting the new_table_name production. ExitNew_table_name(c *New_table_nameContext) // ExitColumn_name is called when exiting the column_name production. ExitColumn_name(c *Column_nameContext) // ExitCollation_name is called when exiting the collation_name production. ExitCollation_name(c *Collation_nameContext) // ExitForeign_table is called when exiting the foreign_table production. ExitForeign_table(c *Foreign_tableContext) // ExitIndex_name is called when exiting the index_name production. ExitIndex_name(c *Index_nameContext) // ExitTrigger_name is called when exiting the trigger_name production. ExitTrigger_name(c *Trigger_nameContext) // ExitView_name is called when exiting the view_name production. ExitView_name(c *View_nameContext) // ExitModule_name is called when exiting the module_name production. ExitModule_name(c *Module_nameContext) // ExitPragma_name is called when exiting the pragma_name production. ExitPragma_name(c *Pragma_nameContext) // ExitSavepoint_name is called when exiting the savepoint_name production. ExitSavepoint_name(c *Savepoint_nameContext) // ExitTable_alias is called when exiting the table_alias production. ExitTable_alias(c *Table_aliasContext) // ExitTable_alias_fallback is called when exiting the table_alias_fallback production. ExitTable_alias_fallback(c *Table_alias_fallbackContext) // ExitTransaction_name is called when exiting the transaction_name production. ExitTransaction_name(c *Transaction_nameContext) // ExitWindow_name is called when exiting the window_name production. ExitWindow_name(c *Window_nameContext) // ExitAlias is called when exiting the alias production. ExitAlias(c *AliasContext) // ExitFilename is called when exiting the filename production. ExitFilename(c *FilenameContext) // ExitBase_window_name is called when exiting the base_window_name production. ExitBase_window_name(c *Base_window_nameContext) // ExitSimple_func is called when exiting the simple_func production. ExitSimple_func(c *Simple_funcContext) // ExitAggregate_func is called when exiting the aggregate_func production. ExitAggregate_func(c *Aggregate_funcContext) // ExitTable_function_name is called when exiting the table_function_name production. ExitTable_function_name(c *Table_function_nameContext) // ExitAny_name is called when exiting the any_name production. ExitAny_name(c *Any_nameContext) } ================================================ FILE: internal/engine/sqlite/reserved.go ================================================ package sqlite import "strings" // https://sqlite.org/lang_keywords.html func (p *Parser) IsReservedKeyword(s string) bool { switch strings.ToLower(s) { case "abort": case "action": case "add": case "after": case "all": case "alter": case "always": case "analyze": case "and": case "as": case "asc": case "attach": case "autoincrement": case "before": case "begin": case "between": case "by": case "cascade": case "case": case "cast": case "check": case "collate": case "column": case "commit": case "conflict": case "constraint": case "create": case "cross": case "current": case "current_date": case "current_time": case "current_timestamp": case "database": case "default": case "deferrable": case "deferred": case "delete": case "desc": case "detach": case "distinct": case "do": case "drop": case "each": case "else": case "end": case "escape": case "except": case "exclude": case "exclusive": case "exists": case "explain": case "fail": case "filter": case "first": case "following": case "for": case "foreign": case "from": case "full": case "generated": case "glob": case "group": case "groups": case "having": case "if": case "ignore": case "immediate": case "in": case "index": case "indexed": case "initially": case "inner": case "insert": case "instead": case "intersect": case "into": case "is": case "isnull": case "join": case "key": case "last": case "left": case "like": case "limit": case "match": case "natural": case "no": case "not": case "nothing": case "notnull": case "null": case "nulls": case "of": case "offset": case "on": case "or": case "order": case "others": case "outer": case "over": case "partition": case "plan": case "pragma": case "preceding": case "primary": case "query": case "raise": case "range": case "recursive": case "references": case "regexp": case "reindex": case "release": case "rename": case "replace": case "restrict": case "right": case "rollback": case "row": case "rows": case "savepoint": case "select": case "set": case "table": case "temp": case "temporary": case "then": case "ties": case "to": case "transaction": case "trigger": case "unbounded": case "union": case "unique": case "update": case "using": case "vacuum": case "values": case "view": case "virtual": case "when": case "where": case "window": case "with": case "without": default: return false } return true } ================================================ FILE: internal/engine/sqlite/stdlib.go ================================================ package sqlite import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) // sqlite functions from: // https://www.sqlite.org/lang_aggfunc.html // https://www.sqlite.org/lang_mathfunc.html // https://www.sqlite.org/lang_corefunc.html func defaultSchema(name string) *catalog.Schema { s := &catalog.Schema{Name: name} s.Funcs = []*catalog.Function{ // Aggregation Functions { Name: "AVG", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, ReturnTypeNullable: true, }, { Name: "COUNT", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "COUNT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "GROUP_CONCAT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "GROUP_CONCAT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "MAX", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, ReturnTypeNullable: true, }, { Name: "MIN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, ReturnTypeNullable: true, }, { Name: "SUM", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, ReturnTypeNullable: true, }, { Name: "TOTAL", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, // Math Functions { Name: "ACOS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ACOSH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ASIN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ASINH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ATAN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ATAN2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ATANH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "CEIL", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "CEILING", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "COS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "COSH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "DEGREES", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "EXP", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "FLOOR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "LN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "LOG", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "LOG10", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "LOG", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "LOG2", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "MOD", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "PI", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "POW", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "POWER", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "RADIANS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "SIN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "SINH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "SQRT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "TAN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "TANH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "TRUNC", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, // Scalar functions { Name: "ABS", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "CHANGES", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "CHAR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "int"}, }, { Type: &ast.TypeName{Name: "int"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "COALESCE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, ReturnTypeNullable: true, }, { Name: "FORMAT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "text"}, ReturnTypeNullable: true, }, { Name: "GLOB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "HEX", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "IFNULL", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, ReturnTypeNullable: true, }, { Name: "IIF", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, ReturnTypeNullable: true, }, { Name: "INSTR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, ReturnTypeNullable: true, }, { Name: "LAST_INSERT_ROWID", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "LENGTH", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, ReturnTypeNullable: true, }, { Name: "LIKE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "LIKE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "LIKELIHOOD", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, ReturnTypeNullable: true, }, { Name: "LIKELY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, ReturnTypeNullable: true, }, { Name: "LOWER", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "LTRIM", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "LTRIM", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "MAX", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, ReturnTypeNullable: true, }, { Name: "MIN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "any"}, ReturnTypeNullable: true, }, { Name: "NULLIF", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, ReturnTypeNullable: true, }, { Name: "PRINTF", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "any"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "text"}, ReturnTypeNullable: true, }, { Name: "QUOTE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "RAMDOM", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "RAMDOMBLOB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "blob"}, }, { Name: "REPLACE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ROUND", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "ROUND", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "real"}, }, { Type: &ast.TypeName{Name: "real"}, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, { Name: "RTRIM", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "RTRIM", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SIGN", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, ReturnTypeNullable: true, }, { Name: "SOUNDEX", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SQLITE_COMPILEOPTION_GET", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, ReturnTypeNullable: true, }, { Name: "SQLITE_COMPILEOPTION_USED", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "SQLITE_OFFSET", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, ReturnTypeNullable: true, }, { Name: "SQLITE_SOURCE_ID", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SQLITE_VERSION", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SUBSTR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SUBSTR", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SUBSTRING", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SUBSTRING", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "TOTAL_CHANGES", Args: []*catalog.Argument{}, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "TRIM", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "TRIM", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "TYPEOF", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "UNICODE", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "integer"}, }, { Name: "UNLIKELY", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "any"}, }, }, ReturnType: &ast.TypeName{Name: "any"}, ReturnTypeNullable: true, }, { Name: "UPPER", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "ZEROBLOB", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "blob"}, }, // fts5 funcs https://www.sqlite.org/fts5.html#_auxiliary_functions_ { Name: "HIGHLIGHT", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "SNIPPET", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "integer"}, }, }, ReturnType: &ast.TypeName{Name: "text"}, }, { Name: "bm25", Args: []*catalog.Argument{ { Type: &ast.TypeName{Name: "text"}, }, { Type: &ast.TypeName{Name: "real"}, Mode: ast.FuncParamVariadic, }, }, ReturnType: &ast.TypeName{Name: "real"}, }, } return s } ================================================ FILE: internal/engine/sqlite/utils.go ================================================ package sqlite import ( "github.com/sqlc-dev/sqlc/internal/engine/sqlite/parser" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) type tableNamer interface { Table_name() parser.ITable_nameContext Schema_name() parser.ISchema_nameContext } func parseTableName(c tableNamer) *ast.TableName { name := ast.TableName{ Name: identifier(c.Table_name().GetText()), } if c.Schema_name() != nil { name.Schema = c.Schema_name().GetText() } return &name } func hasNotNullConstraint(checks []parser.IColumn_constraintContext) bool { for i := range checks { constraint, ok := checks[i].(*parser.Column_constraintContext) if !ok { continue } if constraint.PRIMARY_() != nil && constraint.KEY_() != nil { return true } if constraint.NOT_() != nil && constraint.NULL_() != nil { return true } } return false } ================================================ FILE: internal/ext/handler.go ================================================ 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.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.GenerateRequest) (*plugin.GenerateResponse, error) } func (w *wrapper) Generate(ctx context.Context, req *plugin.GenerateRequest) (*plugin.GenerateResponse, error) { return w.fn(ctx, req) } 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} } ================================================ FILE: internal/ext/process/gen.go ================================================ package process import ( "bytes" "context" "errors" "fmt" "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/info" ) type Runner struct { Cmd string Format string Env []string } 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 fmt.Errorf("process: %s not found", r.Cmd) } cmd := exec.CommandContext(ctx, path, method) cmd.Stdin = bytes.NewReader(stdin) cmd.Env = []string{ fmt.Sprintf("SQLC_VERSION=%s", info.Version), } for _, key := range r.Env { if key == "SQLC_AUTH_TOKEN" { continue } cmd.Env = append(cmd.Env, fmt.Sprintf("%s=%s", key, os.Getenv(key))) } out, err := cmd.Output() if err != nil { stderr := err.Error() var exit *exec.ExitError if errors.As(err, &exit) { stderr = string(exit.Stderr) } return fmt.Errorf("process: error running command %s", stderr) } resp, ok := reply.(protoreflect.ProtoMessage) if !ok { return fmt.Errorf("reply isn't a protoreflect.ProtoMessage") } 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, "") } ================================================ FILE: internal/ext/wasm/runner.go ================================================ package wasm type Runner struct { URL string SHA256 string Env []string } ================================================ FILE: internal/ext/wasm/wasm.go ================================================ package wasm import ( "bytes" "context" "crypto/sha256" "errors" "fmt" "io" "log/slog" "net/http" "os" "path/filepath" "runtime" "strings" "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" ) var flight singleflight.Group type runtimeAndCode struct { rt wazero.Runtime code wazero.CompiledModule } // Verify the provided sha256 is valid. func (r *Runner) getChecksum(ctx context.Context) (string, error) { if r.SHA256 != "" { return r.SHA256, nil } // TODO: Add a log line here about something _, sum, err := r.fetch(ctx, r.URL) if err != nil { return "", err } 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) loadAndCompile(ctx context.Context) (*runtimeAndCode, error) { expected, err := r.getChecksum(ctx) if err != nil { return nil, err } cacheDir, err := cache.PluginsDir() if err != nil { return nil, err } value, err, _ := flight.Do(expected, func() (interface{}, error) { return r.loadAndCompileWASM(ctx, cacheDir, expected) }) if err != nil { return nil, err } data, ok := value.(*runtimeAndCode) if !ok { return nil, fmt.Errorf("returned value was not a compiled module") } return data, nil } func (r *Runner) fetch(ctx context.Context, uri string) ([]byte, string, error) { var body io.ReadCloser switch { case strings.HasPrefix(uri, "file://"): file, err := os.Open(strings.TrimPrefix(uri, "file://")) if err != nil { return nil, "", fmt.Errorf("os.Open: %s %w", uri, err) } body = file case strings.HasPrefix(uri, "https://"): req, err := http.NewRequestWithContext(ctx, "GET", uri, nil) if err != nil { 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) } body = resp.Body default: 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) } 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) } if staterr != nil { err := os.Mkdir(pluginDir, 0755) if err != nil && !os.IsExist(err) { return nil, fmt.Errorf("mkdirall: %w", err) } if err := os.WriteFile(pluginPath, wmod, 0444); err != nil { return nil, fmt.Errorf("cache wasm: %w", err) } } 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.GenerateRequest) { if req.Catalog == nil || req.Catalog.Schemas == nil { return } filtered := make([]*plugin.Schema, 0, len(req.Catalog.Schemas)) for _, schema := range req.Catalog.Schemas { if schema.Name == "pg_catalog" || schema.Name == "information_schema" { continue } filtered = append(filtered, schema) } req.Catalog.Schemas = filtered } 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") } // 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 } stdinBlob, err := proto.Marshal(req) if err != nil { return fmt.Errorf("failed to encode codegen request: %w", err) } runtimeAndCode, err := r.loadAndCompile(ctx) if err != nil { return fmt.Errorf("loadBytes: %w", err) } var stderr, stdout bytes.Buffer 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 { conf = conf.WithEnv(key, os.Getenv(key)) } result, err := runtimeAndCode.rt.InstantiateModule(ctx, runtimeAndCode.code, conf) if err == nil { defer result.Close(ctx) } if cerr := checkError(err, stderr); cerr != nil { return cerr } // Print WASM stdout stdoutBlob := stdout.Bytes() resp, ok := reply.(protoreflect.ProtoMessage) if !ok { return fmt.Errorf("reply isn't a GenerateResponse") } if err := proto.Unmarshal(stdoutBlob, resp); err != nil { return 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, "") } func checkError(err error, stderr bytes.Buffer) error { if err == nil { return err } if exitErr, ok := err.(*sys.ExitError); ok { if exitErr.ExitCode() == 0 { return nil } } // Print WASM stdout stderrBlob := stderr.String() if len(stderrBlob) > 0 { return errors.New(stderrBlob) } return fmt.Errorf("call: %w", err) } ================================================ FILE: internal/inflection/singular.go ================================================ package inflection import ( "strings" upstream "github.com/jinzhu/inflection" ) type SingularParams struct { Name string Exclusions []string } func Singular(s SingularParams) string { for _, exclusion := range s.Exclusions { if strings.EqualFold(s.Name, exclusion) { return s.Name } } // Manual fix for incorrect handling of "campus" // // https://github.com/sqlc-dev/sqlc/issues/430 // https://github.com/jinzhu/inflection/issues/13 if strings.ToLower(s.Name) == "campus" { return s.Name } // Manual fix for incorrect handling of "meta" // // https://github.com/sqlc-dev/sqlc/issues/1217 // https://github.com/jinzhu/inflection/issues/21 if strings.ToLower(s.Name) == "meta" { return s.Name } // Manual fix for incorrect handling of "calories" // // https://github.com/sqlc-dev/sqlc/issues/2017 // https://github.com/jinzhu/inflection/issues/23 if strings.ToLower(s.Name) == "calories" { return "calorie" } // Manual fix for incorrect handling of "-ves" suffix if strings.ToLower(s.Name) == "waves" { return "wave" } if strings.ToLower(s.Name) == "metadata" { return "metadata" } return upstream.Singular(s.Name) } ================================================ FILE: internal/info/facts.go ================================================ package info // When no version is set, return the next bug fix version // after the most recent tag const Version = "v1.30.0" ================================================ FILE: internal/metadata/meta.go ================================================ package metadata import ( "bufio" "fmt" "github.com/sqlc-dev/sqlc/internal/constants" "strings" "unicode" "github.com/sqlc-dev/sqlc/internal/source" ) type CommentSyntax source.CommentSyntax type Metadata struct { Name string Cmd string Comments []string 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 } const ( CmdExec = ":exec" CmdExecResult = ":execresult" CmdExecRows = ":execrows" CmdExecLastId = ":execlastid" CmdMany = ":many" CmdOne = ":one" CmdCopyFrom = ":copyfrom" CmdBatchExec = ":batchexec" CmdBatchMany = ":batchmany" CmdBatchOne = ":batchone" ) // A query name must be a valid Go identifier // // https://golang.org/ref/spec#Identifiers func validateQueryName(name string) error { if len(name) == 0 { return fmt.Errorf("invalid query name: %q", name) } for i, c := range name { isLetter := unicode.IsLetter(c) || c == '_' isDigit := unicode.IsDigit(c) if i == 0 && !isLetter { return fmt.Errorf("invalid query name %q", name) } else if !(isLetter || isDigit) { return fmt.Errorf("invalid query name %q", name) } } return nil } func ParseQueryNameAndType(t string, commentStyle CommentSyntax) (string, string, error) { for _, line := range strings.Split(t, "\n") { var prefix string if strings.HasPrefix(line, "--") { if !commentStyle.Dash { continue } prefix = "--" } if strings.HasPrefix(line, "/*") { if !commentStyle.SlashStar { continue } prefix = "/*" } if strings.HasPrefix(line, "#") { if !commentStyle.Hash { continue } prefix = "#" } if prefix == "" { continue } rest := line[len(prefix):] if !strings.HasPrefix(strings.TrimSpace(rest), "name") { continue } if !strings.Contains(rest, ":") { continue } if !strings.HasPrefix(rest, " name: ") { return "", "", fmt.Errorf("invalid metadata: %s", line) } part := strings.Split(strings.TrimSpace(line), " ") if prefix == "/*" { part = part[:len(part)-1] // removes the trailing "*/" element } if len(part) == 3 { return "", "", fmt.Errorf("missing query type [':one', ':many', ':exec', ':execrows', ':execlastid', ':execresult', ':copyfrom', 'batchexec', 'batchmany', 'batchone']: %s", line) } if len(part) != 4 { return "", "", fmt.Errorf("invalid query comment: %s", line) } queryName := part[2] queryType := strings.TrimSpace(part[3]) switch queryType { case CmdOne, CmdMany, CmdExec, CmdExecResult, CmdExecRows, CmdExecLastId, CmdCopyFrom, CmdBatchExec, CmdBatchMany, CmdBatchOne: default: return "", "", fmt.Errorf("invalid query type: %s", queryType) } if err := validateQueryName(queryName); err != nil { return "", "", err } return queryName, queryType, nil } return "", "", nil } // 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)) s.Split(bufio.ScanWords) s.Scan() token := s.Text() if !strings.HasPrefix(token, "@") { continue } switch token { case constants.QueryFlagParam: s.Scan() name := s.Text() var rest []string for s.Scan() { paramToken := s.Text() 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, ruleSkiplist, s.Err() } } return params, flags, ruleSkiplist, nil } ================================================ FILE: internal/metadata/meta_test.go ================================================ package metadata import ( "testing" ) func TestParseQueryNameAndType(t *testing.T) { for _, query := range []string{ `-- name: CreateFoo, :one`, `-- name: 9Foo_, :one`, `-- name: CreateFoo :two`, `-- name: CreateFoo`, `-- name: CreateFoo :one something`, `-- name: `, `--name: CreateFoo :one`, `--name CreateFoo :one`, `--name: CreateFoo :two`, "-- name:CreateFoo", `--name:CreateFoo :two`, } { if _, _, err := ParseQueryNameAndType(query, CommentSyntax{Dash: true}); err == nil { t.Errorf("expected invalid metadata: %q", query) } } for _, query := range []string{ `-- some comment`, `-- name comment`, `--name comment`, } { if _, _, err := ParseQueryNameAndType(query, CommentSyntax{Dash: true}); err != nil { t.Errorf("expected valid comment: %q", query) } } for query, cs := range map[string]CommentSyntax{ `-- name: CreateFoo :one`: {Dash: true}, `# name: CreateFoo :one`: {Hash: true}, `/* name: CreateFoo :one */`: {SlashStar: true}, } { queryName, queryCmd, err := ParseQueryNameAndType(query, cs) if err != nil { t.Errorf("expected valid metadata: %q", query) } if queryName != "CreateFoo" { t.Errorf("incorrect queryName parsed: (%q) %q", queryName, query) } if queryCmd != CmdOne { t.Errorf("incorrect queryCmd parsed: (%q) %q", queryCmd, query) } } } func TestParseQueryParams(t *testing.T) { for _, comments := range [][]string{ { " name: CreateFoo :one", " @param foo_id UUID", }, { " name: CreateFoo :one ", " @param foo_id UUID ", }, { " name: CreateFoo :one", "@param foo_id UUID", " invalid", }, { " name: CreateFoo :one", " @invalid", " @param foo_id UUID", }, { " name: GetFoos :many ", " @param foo_id UUID ", " @param @invalid UUID ", }, } { params, _, _, err := ParseCommentFlags(comments) if err != nil { t.Errorf("expected comments to parse, got err: %s", err) } pt, ok := params["foo_id"] if !ok { t.Errorf("expected param not found") } if pt != "UUID" { t.Error("unexpected param metadata:", pt) } _, ok = params["invalid"] if ok { t.Errorf("unexpected param found") } } } func TestParseQueryFlags(t *testing.T) { for _, comments := range [][]string{ { " name: CreateFoo :one", " @flag-foo", }, { " name: CreateFoo :one ", "@flag-foo ", }, { " name: CreateFoo :one", " @flag-foo @flag-bar", }, { " name: GetFoos :many", " @param @flag-bar UUID", " @flag-foo", }, { " name: GetFoos :many", " @flag-foo", " @param @flag-bar UUID", }, } { _, flags, _, err := ParseCommentFlags(comments) if err != nil { t.Errorf("expected comments to parse, got err: %s", err) } if !flags["@flag-foo"] { t.Errorf("expected flag not found") } if flags["@flag-bar"] { t.Errorf("unexpected flag found") } } } 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") } } } ================================================ FILE: internal/migrations/migrations.go ================================================ package migrations import ( "bufio" "strings" ) // Remove all lines after a rollback comment. // // goose: -- +goose Down // sql-migrate: -- +migrate Down // tern: ---- create above / drop below ---- // dbmate: -- migrate:down func RemoveRollbackStatements(contents string) string { s := bufio.NewScanner(strings.NewReader(contents)) var lines []string for s.Scan() { statement := strings.ToLower(s.Text()) if strings.HasPrefix(statement, "-- +goose down") { break } if strings.HasPrefix(statement, "-- +migrate down") { break } if strings.HasPrefix(statement, "---- create above / drop below ----") { break } if strings.HasPrefix(statement, "-- migrate:down") { break } lines = append(lines, s.Text()) } return strings.Join(lines, "\n") } func IsDown(filename string) bool { // Remove golang-migrate rollback files. return strings.HasSuffix(filename, ".down.sql") } ================================================ FILE: internal/migrations/migrations_test.go ================================================ package migrations import ( "testing" "github.com/google/go-cmp/cmp" ) const inputGoose = ` -- +goose Up ALTER TABLE archived_jobs ADD COLUMN expires_at TIMESTAMP WITH TIME ZONE; -- +goose Down ALTER TABLE archived_jobs DROP COLUMN expires_at; ` const outputGoose = ` -- +goose Up ALTER TABLE archived_jobs ADD COLUMN expires_at TIMESTAMP WITH TIME ZONE; ` const inputMigrate = ` -- +migrate Up -- SQL in section 'Up' is executed when this migration is applied CREATE TABLE people (id int); -- +migrate Down -- SQL section 'Down' is executed when this migration is rolled back DROP TABLE people; ` const outputMigrate = ` -- +migrate Up -- SQL in section 'Up' is executed when this migration is applied CREATE TABLE people (id int); ` const inputTern = ` -- Write your migrate up statements here ALTER TABLE todo RENAME COLUMN done TO is_done; ---- create above / drop below ---- ALTER TABLE todo RENAME COLUMN is_done TO done; ` const outputTern = ` -- Write your migrate up statements here ALTER TABLE todo RENAME COLUMN done TO is_done;` const inputDbmate = ` -- migrate:up CREATE TABLE foo (bar int); -- migrate:down DROP TABLE foo;` const outputDbmate = ` -- migrate:up CREATE TABLE foo (bar int);` func TestRemoveRollback(t *testing.T) { if diff := cmp.Diff(outputGoose, RemoveRollbackStatements(inputGoose)); diff != "" { t.Errorf("goose migration mismatch:\n%s", diff) } if diff := cmp.Diff(outputMigrate, RemoveRollbackStatements(inputMigrate)); diff != "" { t.Errorf("sql-migrate migration mismatch:\n%s", diff) } if diff := cmp.Diff(outputTern, RemoveRollbackStatements(inputTern)); diff != "" { t.Errorf("tern migration mismatch:\n%s", diff) } if diff := cmp.Diff(outputDbmate, RemoveRollbackStatements(inputDbmate)); diff != "" { t.Errorf("dbmate migration mismatch:\n%s", diff) } } func TestRemoveGolangMigrateRollback(t *testing.T) { filenames := map[string]bool{ // make sure we let through golang-migrate files that aren't rollbacks "migrations/1.up.sql": false, // make sure we let through other sql files "migrations/2.sql": false, "migrations/foo.sql": false, "migrations/1.down.sql": true, } for filename, want := range filenames { got := IsDown(filename) if diff := cmp.Diff(want, got); diff != "" { t.Errorf("IsDown mismatch: %s\n %s", filename, diff) } } } ================================================ FILE: internal/multierr/error.go ================================================ package multierr import ( "fmt" "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) type FileError struct { Filename string Line int Column int Err error } func (e *FileError) Unwrap() error { return e.Err } type Error struct { errs []*FileError } func (e *Error) Add(filename, in string, loc int, err error) { line := 1 column := 1 if lerr, ok := err.(*sqlerr.Error); ok { if lerr.Location != 0 { loc = lerr.Location } else if lerr.Line != 0 && lerr.Column != 0 { line = lerr.Line column = lerr.Column } } if in != "" && loc != 0 { line, column = source.LineNumber(in, loc) } e.errs = append(e.errs, &FileError{filename, line, column, err}) } func (e *Error) Errs() []*FileError { return e.errs } func (e *Error) Error() string { return fmt.Sprintf("multiple errors: %d errors", len(e.errs)) } func New() *Error { return &Error{} } ================================================ FILE: internal/opts/debug.go ================================================ package opts import ( "os" "strings" ) // The SQLCDEBUG variable controls debugging variables within the runtime. It // is a comma-separated list of name=val pairs setting these named variables: // // dumpast: setting dumpast=1 will print the AST of every SQL statement // dumpcatalog: setting dumpcatalog=1 will print the parsed database schema // trace: setting trace= will output a trace // processplugins: setting processplugins=0 will disable process-based plugins // databases: setting databases=managed will disable connections to databases via URI // dumpvetenv: setting dumpvetenv=1 will print the variables available to // a vet rule during evaluation // dumpexplain: setting dumpexplain=1 will print the JSON-formatted output // from executing EXPLAIN ... on a query during vet rule evaluation type Debug struct { DumpAST bool DumpCatalog bool Trace string ProcessPlugins bool OnlyManagedDatabases bool DumpVetEnv bool DumpExplain bool } func DebugFromEnv() Debug { return DebugFromString(os.Getenv("SQLCDEBUG")) } func DebugFromString(val string) Debug { d := Debug{ ProcessPlugins: true, } if val == "" { return d } for _, pair := range strings.Split(val, ",") { pair = strings.TrimSpace(pair) switch { case pair == "dumpast=1": d.DumpAST = true case pair == "dumpcatalog=1": d.DumpCatalog = true case strings.HasPrefix(pair, "trace="): traceName := strings.TrimPrefix(pair, "trace=") if traceName == "1" { d.Trace = "trace.out" } else { d.Trace = traceName } case pair == "processplugins=0": d.ProcessPlugins = false case pair == "databases=managed": d.OnlyManagedDatabases = true case pair == "dumpvetenv=1": d.DumpVetEnv = true case pair == "dumpexplain=1": d.DumpExplain = true } } return d } ================================================ FILE: internal/opts/experiment.go ================================================ package opts import ( "os" "strings" ) // The SQLCEXPERIMENT variable controls experimental features within sqlc. It // is a comma-separated list of experiment names. Experiment names can be // prefixed with "no" to explicitly disable them. // // This is modeled after Go's GOEXPERIMENT environment variable. For more // information, see https://pkg.go.dev/internal/goexperiment // // Available experiments: // // analyzerv2 - enables database-only analyzer mode // // Example usage: // // SQLCEXPERIMENT=foo,bar # enable foo and bar experiments // SQLCEXPERIMENT=nofoo # explicitly disable foo experiment // SQLCEXPERIMENT=foo,nobar # enable foo, disable bar // Experiment holds the state of all experimental features. // Add new experiments as boolean fields to this struct. type Experiment struct { // AnalyzerV2 enables the database-only analyzer mode (analyzer.database: only) // which uses the database for all type resolution instead of parsing schema files. AnalyzerV2 bool } // ExperimentFromEnv returns an Experiment initialized from the SQLCEXPERIMENT // environment variable. func ExperimentFromEnv() Experiment { return ExperimentFromString(os.Getenv("SQLCEXPERIMENT")) } // ExperimentFromString parses a comma-separated list of experiment names // and returns an Experiment with the appropriate flags set. // // Experiment names can be prefixed with "no" to explicitly disable them. // Unknown experiment names are silently ignored. func ExperimentFromString(val string) Experiment { e := Experiment{} if val == "" { return e } for _, name := range strings.Split(val, ",") { name = strings.TrimSpace(name) if name == "" { continue } // Check if this is a negation (noFoo) enabled := true if strings.HasPrefix(strings.ToLower(name), "no") && len(name) > 2 { // Could be a negation, check if the rest is a valid experiment possibleExp := name[2:] if isKnownExperiment(possibleExp) { name = possibleExp enabled = false } // If not a known experiment, treat "no..." as a potential experiment name itself } setExperiment(&e, name, enabled) } return e } // isKnownExperiment returns true if the given name (case-insensitive) is a // known experiment. func isKnownExperiment(name string) bool { switch strings.ToLower(name) { case "analyzerv2": return true default: return false } } // setExperiment sets the experiment flag with the given name to the given value. func setExperiment(e *Experiment, name string, enabled bool) { switch strings.ToLower(name) { case "analyzerv2": e.AnalyzerV2 = enabled } } // Enabled returns a slice of all enabled experiment names. func (e Experiment) Enabled() []string { var enabled []string if e.AnalyzerV2 { enabled = append(enabled, "analyzerv2") } return enabled } // String returns a comma-separated list of enabled experiments. func (e Experiment) String() string { return strings.Join(e.Enabled(), ",") } ================================================ FILE: internal/opts/experiment_test.go ================================================ package opts import "testing" func TestExperimentFromString(t *testing.T) { tests := []struct { name string input string want Experiment }{ { name: "empty string", input: "", want: Experiment{}, }, { name: "whitespace only", input: " ", want: Experiment{}, }, { name: "unknown experiment", input: "unknownexperiment", want: Experiment{}, }, { name: "multiple unknown experiments", input: "foo,bar,baz", want: Experiment{}, }, { name: "unknown with no prefix", input: "nounknown", want: Experiment{}, }, { name: "whitespace around experiments", input: " foo , bar , baz ", want: Experiment{}, }, { name: "empty items in list", input: "foo,,bar", want: Experiment{}, }, { name: "enable analyzerv2", input: "analyzerv2", want: Experiment{AnalyzerV2: true}, }, { name: "disable analyzerv2", input: "noanalyzerv2", want: Experiment{AnalyzerV2: false}, }, { name: "enable then disable analyzerv2", input: "analyzerv2,noanalyzerv2", want: Experiment{AnalyzerV2: false}, }, { name: "analyzerv2 case insensitive", input: "AnalyzerV2", want: Experiment{AnalyzerV2: true}, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got := ExperimentFromString(tt.input) if got != tt.want { t.Errorf("ExperimentFromString(%q) = %+v, want %+v", tt.input, got, tt.want) } }) } } func TestExperimentEnabled(t *testing.T) { tests := []struct { name string exp Experiment want []string }{ { name: "no experiments enabled", exp: Experiment{}, want: nil, }, { name: "analyzerv2 enabled", exp: Experiment{AnalyzerV2: true}, want: []string{"analyzerv2"}, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got := tt.exp.Enabled() if len(got) != len(tt.want) { t.Errorf("Experiment.Enabled() = %v, want %v", got, tt.want) return } for i := range got { if got[i] != tt.want[i] { t.Errorf("Experiment.Enabled()[%d] = %q, want %q", i, got[i], tt.want[i]) } } }) } } func TestExperimentString(t *testing.T) { tests := []struct { name string exp Experiment want string }{ { name: "no experiments", exp: Experiment{}, want: "", }, { name: "analyzerv2 enabled", exp: Experiment{AnalyzerV2: true}, want: "analyzerv2", }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got := tt.exp.String() if got != tt.want { t.Errorf("Experiment.String() = %q, want %q", got, tt.want) } }) } } func TestIsKnownExperiment(t *testing.T) { tests := []struct { name string input string want bool }{ { name: "unknown experiment", input: "unknown", want: false, }, { name: "empty string", input: "", want: false, }, { name: "analyzerv2 lowercase", input: "analyzerv2", want: true, }, { name: "analyzerv2 mixed case", input: "AnalyzerV2", want: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got := isKnownExperiment(tt.input) if got != tt.want { t.Errorf("isKnownExperiment(%q) = %v, want %v", tt.input, got, tt.want) } }) } } ================================================ FILE: internal/opts/parser.go ================================================ package opts type Parser struct { Debug Debug Experiment Experiment } ================================================ FILE: internal/pattern/match.go ================================================ package pattern import ( "fmt" "regexp" "sync" ) // Match is a wrapper of *regexp.Regexp. // It contains the match pattern compiled into a regular expression. type Match struct { *regexp.Regexp } var ( matchCache = make(map[string]*Match) matchCacheLock sync.RWMutex ) // Compile takes our match expression as a string, and compiles it into a *Match object. // Will return an error on an invalid pattern. func MatchCompile(pattern string) (*Match, error) { // check for pattern in cache matchCacheLock.RLock() matcher, ok := matchCache[pattern] matchCacheLock.RUnlock() if ok { return matcher, nil } // pattern isn't in cache, compile it matcher, err := matchCompile(pattern) if err != nil { return nil, err } // add it to the cache matchCacheLock.Lock() matchCache[pattern] = matcher matchCacheLock.Unlock() return matcher, nil } func matchCompile(pattern string) (match *Match, err error) { regex := "" escaped := false arr := []byte(pattern) for i := 0; i < len(arr); i++ { if escaped { escaped = false switch arr[i] { case '*', '?', '\\': regex += "\\" + string(arr[i]) default: return nil, fmt.Errorf("Invalid escaped character '%c'", arr[i]) } } else { switch arr[i] { case '\\': escaped = true case '*': regex += ".*" case '?': regex += "." case '.', '(', ')', '+', '|', '^', '$', '[', ']', '{', '}': regex += "\\" + string(arr[i]) default: regex += string(arr[i]) } } } if escaped { return nil, fmt.Errorf("Unterminated escape at end of pattern") } var r *regexp.Regexp if r, err = regexp.Compile("^" + regex + "$"); err != nil { return nil, err } return &Match{r}, nil } ================================================ FILE: internal/pgx/poolcache/poolcache.go ================================================ 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 } ================================================ FILE: internal/plugin/codegen.pb.go ================================================ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 // protoc (unknown) // source: plugin/codegen.proto package plugin import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type File struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Contents []byte `protobuf:"bytes,2,opt,name=contents,proto3" json:"contents,omitempty"` } func (x *File) Reset() { *x = File{} if protoimpl.UnsafeEnabled { mi := &file_plugin_codegen_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *File) String() string { return protoimpl.X.MessageStringOf(x) } func (*File) ProtoMessage() {} func (x *File) ProtoReflect() protoreflect.Message { mi := &file_plugin_codegen_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use File.ProtoReflect.Descriptor instead. func (*File) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{0} } func (x *File) GetName() string { if x != nil { return x.Name } return "" } func (x *File) GetContents() []byte { if x != nil { return x.Contents } 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"` 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[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Settings) String() string { return protoimpl.X.MessageStringOf(x) } func (*Settings) ProtoMessage() {} func (x *Settings) 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 Settings.ProtoReflect.Descriptor instead. func (*Settings) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{1} } func (x *Settings) GetVersion() string { if x != nil { return x.Version } return "" } func (x *Settings) GetEngine() string { if x != nil { return x.Engine } return "" } func (x *Settings) GetSchema() []string { if x != nil { return x.Schema } return nil } func (x *Settings) GetQueries() []string { if x != nil { return x.Queries } return nil } func (x *Settings) GetCodegen() *Codegen { if x != nil { return x.Codegen } return nil } type Codegen struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Out string `protobuf:"bytes,1,opt,name=out,proto3" json:"out,omitempty"` Plugin string `protobuf:"bytes,2,opt,name=plugin,proto3" json:"plugin,omitempty"` Options []byte `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"` Env []string `protobuf:"bytes,4,rep,name=env,proto3" json:"env,omitempty"` Process *Codegen_Process `protobuf:"bytes,5,opt,name=process,proto3" json:"process,omitempty"` Wasm *Codegen_WASM `protobuf:"bytes,6,opt,name=wasm,proto3" json:"wasm,omitempty"` } func (x *Codegen) Reset() { *x = Codegen{} if protoimpl.UnsafeEnabled { mi := &file_plugin_codegen_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Codegen) String() string { return protoimpl.X.MessageStringOf(x) } func (*Codegen) ProtoMessage() {} func (x *Codegen) 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 Codegen.ProtoReflect.Descriptor instead. func (*Codegen) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{2} } func (x *Codegen) GetOut() string { if x != nil { return x.Out } return "" } func (x *Codegen) GetPlugin() string { if x != nil { return x.Plugin } return "" } func (x *Codegen) GetOptions() []byte { if x != nil { return x.Options } return nil } func (x *Codegen) GetEnv() []string { if x != nil { return x.Env } return nil } func (x *Codegen) GetProcess() *Codegen_Process { if x != nil { return x.Process } return nil } func (x *Codegen) GetWasm() *Codegen_WASM { if x != nil { return x.Wasm } return nil } type Catalog struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Comment string `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` DefaultSchema string `protobuf:"bytes,2,opt,name=default_schema,json=defaultSchema,proto3" json:"default_schema,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Schemas []*Schema `protobuf:"bytes,4,rep,name=schemas,proto3" json:"schemas,omitempty"` } func (x *Catalog) Reset() { *x = Catalog{} if protoimpl.UnsafeEnabled { mi := &file_plugin_codegen_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Catalog) String() string { return protoimpl.X.MessageStringOf(x) } func (*Catalog) ProtoMessage() {} func (x *Catalog) ProtoReflect() protoreflect.Message { mi := &file_plugin_codegen_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Catalog.ProtoReflect.Descriptor instead. func (*Catalog) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{3} } func (x *Catalog) GetComment() string { if x != nil { return x.Comment } return "" } func (x *Catalog) GetDefaultSchema() string { if x != nil { return x.DefaultSchema } return "" } func (x *Catalog) GetName() string { if x != nil { return x.Name } return "" } func (x *Catalog) GetSchemas() []*Schema { if x != nil { return x.Schemas } return nil } type Schema struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Comment string `protobuf:"bytes,1,opt,name=comment,proto3" json:"comment,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Tables []*Table `protobuf:"bytes,3,rep,name=tables,proto3" json:"tables,omitempty"` Enums []*Enum `protobuf:"bytes,4,rep,name=enums,proto3" json:"enums,omitempty"` CompositeTypes []*CompositeType `protobuf:"bytes,5,rep,name=composite_types,json=compositeTypes,proto3" json:"composite_types,omitempty"` } func (x *Schema) Reset() { *x = Schema{} if protoimpl.UnsafeEnabled { mi := &file_plugin_codegen_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Schema) String() string { return protoimpl.X.MessageStringOf(x) } func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { mi := &file_plugin_codegen_proto_msgTypes[4] 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 Schema.ProtoReflect.Descriptor instead. func (*Schema) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{4} } func (x *Schema) GetComment() string { if x != nil { return x.Comment } return "" } func (x *Schema) GetName() string { if x != nil { return x.Name } return "" } func (x *Schema) GetTables() []*Table { if x != nil { return x.Tables } return nil } func (x *Schema) GetEnums() []*Enum { if x != nil { return x.Enums } return nil } func (x *Schema) GetCompositeTypes() []*CompositeType { if x != nil { return x.CompositeTypes } return nil } type CompositeType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Comment string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"` } func (x *CompositeType) Reset() { *x = CompositeType{} if protoimpl.UnsafeEnabled { mi := &file_plugin_codegen_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CompositeType) String() string { return protoimpl.X.MessageStringOf(x) } func (*CompositeType) ProtoMessage() {} func (x *CompositeType) ProtoReflect() protoreflect.Message { mi := &file_plugin_codegen_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CompositeType.ProtoReflect.Descriptor instead. func (*CompositeType) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{5} } func (x *CompositeType) GetName() string { if x != nil { return x.Name } return "" } func (x *CompositeType) GetComment() string { if x != nil { return x.Comment } return "" } type Enum struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Vals []string `protobuf:"bytes,2,rep,name=vals,proto3" json:"vals,omitempty"` Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"` } func (x *Enum) Reset() { *x = Enum{} if protoimpl.UnsafeEnabled { mi := &file_plugin_codegen_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Enum) String() string { return protoimpl.X.MessageStringOf(x) } func (*Enum) ProtoMessage() {} func (x *Enum) ProtoReflect() protoreflect.Message { mi := &file_plugin_codegen_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Enum.ProtoReflect.Descriptor instead. func (*Enum) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{6} } func (x *Enum) GetName() string { if x != nil { return x.Name } return "" } func (x *Enum) GetVals() []string { if x != nil { return x.Vals } return nil } func (x *Enum) GetComment() string { if x != nil { return x.Comment } return "" } type Table struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Rel *Identifier `protobuf:"bytes,1,opt,name=rel,proto3" json:"rel,omitempty"` Columns []*Column `protobuf:"bytes,2,rep,name=columns,proto3" json:"columns,omitempty"` Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"` } func (x *Table) Reset() { *x = Table{} if protoimpl.UnsafeEnabled { mi := &file_plugin_codegen_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Table) String() string { return protoimpl.X.MessageStringOf(x) } func (*Table) ProtoMessage() {} func (x *Table) ProtoReflect() protoreflect.Message { mi := &file_plugin_codegen_proto_msgTypes[7] 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 Table.ProtoReflect.Descriptor instead. func (*Table) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{7} } func (x *Table) GetRel() *Identifier { if x != nil { return x.Rel } return nil } func (x *Table) GetColumns() []*Column { if x != nil { return x.Columns } return nil } func (x *Table) GetComment() string { if x != nil { return x.Comment } return "" } type Identifier struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Catalog string `protobuf:"bytes,1,opt,name=catalog,proto3" json:"catalog,omitempty"` Schema string `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` } func (x *Identifier) Reset() { *x = Identifier{} if protoimpl.UnsafeEnabled { mi := &file_plugin_codegen_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Identifier) String() string { return protoimpl.X.MessageStringOf(x) } func (*Identifier) ProtoMessage() {} func (x *Identifier) ProtoReflect() protoreflect.Message { mi := &file_plugin_codegen_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 Identifier.ProtoReflect.Descriptor instead. func (*Identifier) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{8} } func (x *Identifier) GetCatalog() string { if x != nil { return x.Catalog } return "" } func (x *Identifier) GetSchema() string { if x != nil { return x.Schema } return "" } func (x *Identifier) GetName() string { if x != nil { return x.Name } return "" } type Column struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` NotNull bool `protobuf:"varint,3,opt,name=not_null,json=notNull,proto3" json:"not_null,omitempty"` IsArray bool `protobuf:"varint,4,opt,name=is_array,json=isArray,proto3" json:"is_array,omitempty"` Comment string `protobuf:"bytes,5,opt,name=comment,proto3" json:"comment,omitempty"` Length int32 `protobuf:"varint,6,opt,name=length,proto3" json:"length,omitempty"` IsNamedParam bool `protobuf:"varint,7,opt,name=is_named_param,json=isNamedParam,proto3" json:"is_named_param,omitempty"` IsFuncCall bool `protobuf:"varint,8,opt,name=is_func_call,json=isFuncCall,proto3" json:"is_func_call,omitempty"` // XXX: Figure out what PostgreSQL calls `foo.id` Scope string `protobuf:"bytes,9,opt,name=scope,proto3" json:"scope,omitempty"` Table *Identifier `protobuf:"bytes,10,opt,name=table,proto3" json:"table,omitempty"` TableAlias string `protobuf:"bytes,11,opt,name=table_alias,json=tableAlias,proto3" json:"table_alias,omitempty"` Type *Identifier `protobuf:"bytes,12,opt,name=type,proto3" json:"type,omitempty"` IsSqlcSlice bool `protobuf:"varint,13,opt,name=is_sqlc_slice,json=isSqlcSlice,proto3" json:"is_sqlc_slice,omitempty"` EmbedTable *Identifier `protobuf:"bytes,14,opt,name=embed_table,json=embedTable,proto3" json:"embed_table,omitempty"` OriginalName string `protobuf:"bytes,15,opt,name=original_name,json=originalName,proto3" json:"original_name,omitempty"` Unsigned bool `protobuf:"varint,16,opt,name=unsigned,proto3" json:"unsigned,omitempty"` ArrayDims int32 `protobuf:"varint,17,opt,name=array_dims,json=arrayDims,proto3" json:"array_dims,omitempty"` } func (x *Column) Reset() { *x = Column{} if protoimpl.UnsafeEnabled { mi := &file_plugin_codegen_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Column) String() string { return protoimpl.X.MessageStringOf(x) } func (*Column) ProtoMessage() {} func (x *Column) ProtoReflect() protoreflect.Message { mi := &file_plugin_codegen_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 Column.ProtoReflect.Descriptor instead. func (*Column) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{9} } func (x *Column) GetName() string { if x != nil { return x.Name } return "" } func (x *Column) GetNotNull() bool { if x != nil { return x.NotNull } return false } func (x *Column) GetIsArray() bool { if x != nil { return x.IsArray } return false } func (x *Column) GetComment() string { if x != nil { return x.Comment } return "" } func (x *Column) GetLength() int32 { if x != nil { return x.Length } return 0 } func (x *Column) GetIsNamedParam() bool { if x != nil { return x.IsNamedParam } return false } func (x *Column) GetIsFuncCall() bool { if x != nil { return x.IsFuncCall } return false } func (x *Column) GetScope() string { if x != nil { return x.Scope } return "" } func (x *Column) GetTable() *Identifier { if x != nil { return x.Table } return nil } func (x *Column) GetTableAlias() string { if x != nil { return x.TableAlias } return "" } func (x *Column) GetType() *Identifier { if x != nil { return x.Type } return nil } func (x *Column) GetIsSqlcSlice() bool { if x != nil { return x.IsSqlcSlice } return false } func (x *Column) GetEmbedTable() *Identifier { if x != nil { return x.EmbedTable } return nil } func (x *Column) GetOriginalName() string { if x != nil { return x.OriginalName } return "" } func (x *Column) GetUnsigned() bool { if x != nil { return x.Unsigned } return false } func (x *Column) GetArrayDims() int32 { if x != nil { return x.ArrayDims } return 0 } type Query struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Cmd string `protobuf:"bytes,3,opt,name=cmd,proto3" json:"cmd,omitempty"` Columns []*Column `protobuf:"bytes,4,rep,name=columns,proto3" json:"columns,omitempty"` Params []*Parameter `protobuf:"bytes,5,rep,name=params,json=parameters,proto3" json:"params,omitempty"` Comments []string `protobuf:"bytes,6,rep,name=comments,proto3" json:"comments,omitempty"` Filename string `protobuf:"bytes,7,opt,name=filename,proto3" json:"filename,omitempty"` InsertIntoTable *Identifier `protobuf:"bytes,8,opt,name=insert_into_table,proto3" json:"insert_into_table,omitempty"` } func (x *Query) Reset() { *x = Query{} if protoimpl.UnsafeEnabled { mi := &file_plugin_codegen_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Query) String() string { return protoimpl.X.MessageStringOf(x) } func (*Query) ProtoMessage() {} func (x *Query) ProtoReflect() protoreflect.Message { mi := &file_plugin_codegen_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 Query.ProtoReflect.Descriptor instead. func (*Query) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{10} } func (x *Query) GetText() string { if x != nil { return x.Text } return "" } func (x *Query) GetName() string { if x != nil { return x.Name } return "" } func (x *Query) GetCmd() string { if x != nil { return x.Cmd } return "" } func (x *Query) GetColumns() []*Column { if x != nil { return x.Columns } return nil } func (x *Query) GetParams() []*Parameter { if x != nil { return x.Params } return nil } func (x *Query) GetComments() []string { if x != nil { return x.Comments } return nil } func (x *Query) GetFilename() string { if x != nil { return x.Filename } return "" } func (x *Query) GetInsertIntoTable() *Identifier { if x != nil { return x.InsertIntoTable } return nil } type Parameter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` Column *Column `protobuf:"bytes,2,opt,name=column,proto3" json:"column,omitempty"` } func (x *Parameter) Reset() { *x = Parameter{} if protoimpl.UnsafeEnabled { mi := &file_plugin_codegen_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Parameter) String() string { return protoimpl.X.MessageStringOf(x) } func (*Parameter) ProtoMessage() {} func (x *Parameter) ProtoReflect() protoreflect.Message { mi := &file_plugin_codegen_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 Parameter.ProtoReflect.Descriptor instead. func (*Parameter) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{11} } func (x *Parameter) GetNumber() int32 { if x != nil { return x.Number } return 0 } func (x *Parameter) GetColumn() *Column { if x != nil { return x.Column } return nil } type GenerateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Settings *Settings `protobuf:"bytes,1,opt,name=settings,proto3" json:"settings,omitempty"` Catalog *Catalog `protobuf:"bytes,2,opt,name=catalog,proto3" json:"catalog,omitempty"` 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 *GenerateRequest) Reset() { *x = GenerateRequest{} if protoimpl.UnsafeEnabled { mi := &file_plugin_codegen_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GenerateRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GenerateRequest) ProtoMessage() {} 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 { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use GenerateRequest.ProtoReflect.Descriptor instead. func (*GenerateRequest) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{12} } func (x *GenerateRequest) GetSettings() *Settings { if x != nil { return x.Settings } return nil } func (x *GenerateRequest) GetCatalog() *Catalog { if x != nil { return x.Catalog } return nil } func (x *GenerateRequest) GetQueries() []*Query { if x != nil { return x.Queries } return nil } func (x *GenerateRequest) GetSqlcVersion() string { if x != nil { return x.SqlcVersion } return "" } func (x *GenerateRequest) GetPluginOptions() []byte { if x != nil { return x.PluginOptions } return nil } 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 Files []*File `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` } func (x *GenerateResponse) Reset() { *x = GenerateResponse{} if protoimpl.UnsafeEnabled { mi := &file_plugin_codegen_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GenerateResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GenerateResponse) ProtoMessage() {} 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 { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use GenerateResponse.ProtoReflect.Descriptor instead. func (*GenerateResponse) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{13} } func (x *GenerateResponse) GetFiles() []*File { if x != nil { return x.Files } return nil } type Codegen_Process struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Cmd string `protobuf:"bytes,1,opt,name=cmd,proto3" json:"cmd,omitempty"` } func (x *Codegen_Process) Reset() { *x = Codegen_Process{} if protoimpl.UnsafeEnabled { mi := &file_plugin_codegen_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Codegen_Process) String() string { return protoimpl.X.MessageStringOf(x) } func (*Codegen_Process) ProtoMessage() {} func (x *Codegen_Process) ProtoReflect() protoreflect.Message { mi := &file_plugin_codegen_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Codegen_Process.ProtoReflect.Descriptor instead. func (*Codegen_Process) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{2, 0} } func (x *Codegen_Process) GetCmd() string { if x != nil { return x.Cmd } return "" } type Codegen_WASM struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` Sha256 string `protobuf:"bytes,2,opt,name=sha256,proto3" json:"sha256,omitempty"` } func (x *Codegen_WASM) Reset() { *x = Codegen_WASM{} if protoimpl.UnsafeEnabled { mi := &file_plugin_codegen_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Codegen_WASM) String() string { return protoimpl.X.MessageStringOf(x) } func (*Codegen_WASM) ProtoMessage() {} func (x *Codegen_WASM) ProtoReflect() protoreflect.Message { mi := &file_plugin_codegen_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Codegen_WASM.ProtoReflect.Descriptor instead. func (*Codegen_WASM) Descriptor() ([]byte, []int) { return file_plugin_codegen_proto_rawDescGZIP(), []int{2, 1} } func (x *Codegen_WASM) GetUrl() string { if x != nil { return x.Url } return "" } func (x *Codegen_WASM) GetSha256() string { if x != nil { return x.Sha256 } return "" } var File_plugin_codegen_proto protoreflect.FileDescriptor var file_plugin_codegen_proto_rawDesc = []byte{ 0x0a, 0x14, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 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, 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, 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 ( file_plugin_codegen_proto_rawDescOnce sync.Once file_plugin_codegen_proto_rawDescData = file_plugin_codegen_proto_rawDesc ) func file_plugin_codegen_proto_rawDescGZIP() []byte { file_plugin_codegen_proto_rawDescOnce.Do(func() { file_plugin_codegen_proto_rawDescData = protoimpl.X.CompressGZIP(file_plugin_codegen_proto_rawDescData) }) return file_plugin_codegen_proto_rawDescData } var file_plugin_codegen_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_plugin_codegen_proto_goTypes = []interface{}{ (*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{ 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() } func file_plugin_codegen_proto_init() { if File_plugin_codegen_proto != nil { return } if !protoimpl.UnsafeEnabled { file_plugin_codegen_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*File); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_plugin_codegen_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Settings); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_plugin_codegen_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Codegen); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_plugin_codegen_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Catalog); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_plugin_codegen_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Schema); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_plugin_codegen_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CompositeType); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_plugin_codegen_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Enum); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_plugin_codegen_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Table); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_plugin_codegen_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Identifier); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_plugin_codegen_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Column); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_plugin_codegen_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Query); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_plugin_codegen_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Parameter); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_plugin_codegen_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenerateRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_plugin_codegen_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenerateResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_plugin_codegen_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Codegen_Process); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_plugin_codegen_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Codegen_WASM); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_plugin_codegen_proto_rawDesc, NumEnums: 0, NumMessages: 16, NumExtensions: 0, NumServices: 1, }, GoTypes: file_plugin_codegen_proto_goTypes, DependencyIndexes: file_plugin_codegen_proto_depIdxs, MessageInfos: file_plugin_codegen_proto_msgTypes, }.Build() File_plugin_codegen_proto = out.File file_plugin_codegen_proto_rawDesc = nil file_plugin_codegen_proto_goTypes = nil file_plugin_codegen_proto_depIdxs = nil } ================================================ FILE: internal/plugin/codegen_grpc.pb.go ================================================ // 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", } ================================================ FILE: internal/quickdb/mysql.go ================================================ 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 } ================================================ FILE: internal/quickdb/rpc.go ================================================ package quickdb import ( "crypto/tls" "github.com/riza-io/grpc-go/credentials/basic" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "github.com/sqlc-dev/sqlc/internal/config" pb "github.com/sqlc-dev/sqlc/internal/quickdb/v1" "github.com/sqlc-dev/sqlc/internal/rpc" ) const defaultHostname = "grpc.sqlc.dev" func NewClientFromConfig(cloudConfig config.Cloud) (pb.QuickClient, error) { projectID := cloudConfig.Project return NewClient(projectID, cloudConfig.AuthToken, WithHost(cloudConfig.Hostname)) } type options struct { hostname string } type Option func(*options) func WithHost(host string) Option { return func(o *options) { o.hostname = host } } func NewClient(project, token string, opts ...Option) (pb.QuickClient, error) { var o options for _, apply := range opts { apply(&o) } dialOpts := []grpc.DialOption{ grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})), grpc.WithPerRPCCredentials(basic.NewPerRPCCredentials(project, token)), grpc.WithUnaryInterceptor(rpc.UnaryInterceptor), } hostname := o.hostname if hostname == "" { hostname = defaultHostname } conn, err := grpc.Dial(hostname+":443", dialOpts...) if err != nil { return nil, err } return pb.NewQuickClient(conn), nil } ================================================ FILE: internal/quickdb/v1/quickdb.pb.go ================================================ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 // protoc (unknown) // source: v1/quickdb.proto package quickdbv1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type CreateEphemeralDatabaseRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Region string `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"` Engine string `protobuf:"bytes,2,opt,name=engine,proto3" json:"engine,omitempty"` ServerId string `protobuf:"bytes,3,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"` Migrations []string `protobuf:"bytes,4,rep,name=migrations,proto3" json:"migrations,omitempty"` } func (x *CreateEphemeralDatabaseRequest) Reset() { *x = CreateEphemeralDatabaseRequest{} if protoimpl.UnsafeEnabled { mi := &file_v1_quickdb_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CreateEphemeralDatabaseRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*CreateEphemeralDatabaseRequest) ProtoMessage() {} func (x *CreateEphemeralDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_v1_quickdb_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use CreateEphemeralDatabaseRequest.ProtoReflect.Descriptor instead. func (*CreateEphemeralDatabaseRequest) Descriptor() ([]byte, []int) { return file_v1_quickdb_proto_rawDescGZIP(), []int{0} } func (x *CreateEphemeralDatabaseRequest) GetRegion() string { if x != nil { return x.Region } return "" } func (x *CreateEphemeralDatabaseRequest) GetEngine() string { if x != nil { return x.Engine } return "" } func (x *CreateEphemeralDatabaseRequest) GetServerId() string { if x != nil { return x.ServerId } return "" } func (x *CreateEphemeralDatabaseRequest) GetMigrations() []string { if x != nil { return x.Migrations } return nil } type CreateEphemeralDatabaseResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"` } func (x *CreateEphemeralDatabaseResponse) Reset() { *x = CreateEphemeralDatabaseResponse{} if protoimpl.UnsafeEnabled { mi := &file_v1_quickdb_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *CreateEphemeralDatabaseResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*CreateEphemeralDatabaseResponse) ProtoMessage() {} func (x *CreateEphemeralDatabaseResponse) ProtoReflect() protoreflect.Message { mi := &file_v1_quickdb_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 CreateEphemeralDatabaseResponse.ProtoReflect.Descriptor instead. func (*CreateEphemeralDatabaseResponse) Descriptor() ([]byte, []int) { return file_v1_quickdb_proto_rawDescGZIP(), []int{1} } func (x *CreateEphemeralDatabaseResponse) GetDatabaseId() string { if x != nil { return x.DatabaseId } return "" } func (x *CreateEphemeralDatabaseResponse) GetUri() string { if x != nil { return x.Uri } return "" } type DropEphemeralDatabaseRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields DatabaseId string `protobuf:"bytes,1,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` } func (x *DropEphemeralDatabaseRequest) Reset() { *x = DropEphemeralDatabaseRequest{} if protoimpl.UnsafeEnabled { mi := &file_v1_quickdb_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DropEphemeralDatabaseRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*DropEphemeralDatabaseRequest) ProtoMessage() {} func (x *DropEphemeralDatabaseRequest) ProtoReflect() protoreflect.Message { mi := &file_v1_quickdb_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 DropEphemeralDatabaseRequest.ProtoReflect.Descriptor instead. func (*DropEphemeralDatabaseRequest) Descriptor() ([]byte, []int) { return file_v1_quickdb_proto_rawDescGZIP(), []int{2} } func (x *DropEphemeralDatabaseRequest) GetDatabaseId() string { if x != nil { return x.DatabaseId } return "" } type DropEphemeralDatabaseResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *DropEphemeralDatabaseResponse) Reset() { *x = DropEphemeralDatabaseResponse{} if protoimpl.UnsafeEnabled { mi := &file_v1_quickdb_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DropEphemeralDatabaseResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*DropEphemeralDatabaseResponse) ProtoMessage() {} func (x *DropEphemeralDatabaseResponse) ProtoReflect() protoreflect.Message { mi := &file_v1_quickdb_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use DropEphemeralDatabaseResponse.ProtoReflect.Descriptor instead. func (*DropEphemeralDatabaseResponse) Descriptor() ([]byte, []int) { return file_v1_quickdb_proto_rawDescGZIP(), []int{3} } type File struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Contents []byte `protobuf:"bytes,2,opt,name=contents,proto3" json:"contents,omitempty"` } func (x *File) Reset() { *x = File{} if protoimpl.UnsafeEnabled { mi := &file_v1_quickdb_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *File) String() string { return protoimpl.X.MessageStringOf(x) } func (*File) ProtoMessage() {} func (x *File) ProtoReflect() protoreflect.Message { mi := &file_v1_quickdb_proto_msgTypes[4] 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 File.ProtoReflect.Descriptor instead. func (*File) Descriptor() ([]byte, []int) { return file_v1_quickdb_proto_rawDescGZIP(), []int{4} } func (x *File) GetName() string { if x != nil { return x.Name } return "" } func (x *File) GetContents() []byte { if x != nil { return x.Contents } 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"` // 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_v1_quickdb_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UploadArchiveRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*UploadArchiveRequest) ProtoMessage() {} func (x *UploadArchiveRequest) ProtoReflect() protoreflect.Message { mi := &file_v1_quickdb_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use UploadArchiveRequest.ProtoReflect.Descriptor instead. func (*UploadArchiveRequest) Descriptor() ([]byte, []int) { return file_v1_quickdb_proto_rawDescGZIP(), []int{6} } func (x *UploadArchiveRequest) GetSqlcVersion() string { if x != nil { return x.SqlcVersion } return "" } func (x *UploadArchiveRequest) GetInputs() []*File { if x != nil { return x.Inputs } return nil } func (x *UploadArchiveRequest) GetOutputs() []*File { if x != nil { return x.Outputs } 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 unknownFields protoimpl.UnknownFields Checksum []byte `protobuf:"bytes,1,opt,name=checksum,proto3" json:"checksum,omitempty"` } func (x *UploadArchiveResponse) Reset() { *x = UploadArchiveResponse{} if protoimpl.UnsafeEnabled { mi := &file_v1_quickdb_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *UploadArchiveResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*UploadArchiveResponse) ProtoMessage() {} func (x *UploadArchiveResponse) ProtoReflect() protoreflect.Message { mi := &file_v1_quickdb_proto_msgTypes[7] 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 UploadArchiveResponse.ProtoReflect.Descriptor instead. func (*UploadArchiveResponse) Descriptor() ([]byte, []int) { return file_v1_quickdb_proto_rawDescGZIP(), []int{7} } func (x *UploadArchiveResponse) GetChecksum() []byte { if x != nil { return x.Checksum } return nil } 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, 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, 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, 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_v1_quickdb_proto_rawDescOnce sync.Once file_v1_quickdb_proto_rawDescData = file_v1_quickdb_proto_rawDesc ) 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_v1_quickdb_proto_rawDescData } 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 (*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_v1_quickdb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateEphemeralDatabaseRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_v1_quickdb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateEphemeralDatabaseResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_v1_quickdb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DropEphemeralDatabaseRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_v1_quickdb_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DropEphemeralDatabaseResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_v1_quickdb_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*File); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } 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 case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_v1_quickdb_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UploadArchiveResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: 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_v1_quickdb_proto_rawDesc, NumEnums: 0, NumMessages: 14, NumExtensions: 0, NumServices: 1, }, GoTypes: file_v1_quickdb_proto_goTypes, DependencyIndexes: file_v1_quickdb_proto_depIdxs, MessageInfos: file_v1_quickdb_proto_msgTypes, }.Build() File_v1_quickdb_proto = out.File file_v1_quickdb_proto_rawDesc = nil file_v1_quickdb_proto_goTypes = nil file_v1_quickdb_proto_depIdxs = nil } ================================================ FILE: internal/quickdb/v1/quickdb_grpc.pb.go ================================================ // 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", } ================================================ FILE: internal/remote/gen.pb.go ================================================ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 // protoc v3.21.0 // source: internal/remote/gen.proto package remote import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type GenerateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` Inputs []*File `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"` } func (x *GenerateRequest) Reset() { *x = GenerateRequest{} if protoimpl.UnsafeEnabled { mi := &file_internal_remote_gen_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GenerateRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GenerateRequest) ProtoMessage() {} func (x *GenerateRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_remote_gen_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use GenerateRequest.ProtoReflect.Descriptor instead. func (*GenerateRequest) Descriptor() ([]byte, []int) { return file_internal_remote_gen_proto_rawDescGZIP(), []int{0} } func (x *GenerateRequest) GetVersion() string { if x != nil { return x.Version } return "" } func (x *GenerateRequest) GetInputs() []*File { if x != nil { return x.Inputs } return nil } type GenerateResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Outputs []*File `protobuf:"bytes,1,rep,name=outputs,proto3" json:"outputs,omitempty"` ExitCode int64 `protobuf:"varint,2,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` Stdout []byte `protobuf:"bytes,3,opt,name=stdout,proto3" json:"stdout,omitempty"` Stderr []byte `protobuf:"bytes,4,opt,name=stderr,proto3" json:"stderr,omitempty"` } func (x *GenerateResponse) Reset() { *x = GenerateResponse{} if protoimpl.UnsafeEnabled { mi := &file_internal_remote_gen_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *GenerateResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*GenerateResponse) ProtoMessage() {} func (x *GenerateResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_remote_gen_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 GenerateResponse.ProtoReflect.Descriptor instead. func (*GenerateResponse) Descriptor() ([]byte, []int) { return file_internal_remote_gen_proto_rawDescGZIP(), []int{1} } func (x *GenerateResponse) GetOutputs() []*File { if x != nil { return x.Outputs } return nil } func (x *GenerateResponse) GetExitCode() int64 { if x != nil { return x.ExitCode } return 0 } func (x *GenerateResponse) GetStdout() []byte { if x != nil { return x.Stdout } return nil } func (x *GenerateResponse) GetStderr() []byte { if x != nil { return x.Stderr } return nil } type File struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` Bytes []byte `protobuf:"bytes,3,opt,name=bytes,proto3" json:"bytes,omitempty"` } func (x *File) Reset() { *x = File{} if protoimpl.UnsafeEnabled { mi := &file_internal_remote_gen_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *File) String() string { return protoimpl.X.MessageStringOf(x) } func (*File) ProtoMessage() {} func (x *File) ProtoReflect() protoreflect.Message { mi := &file_internal_remote_gen_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 File.ProtoReflect.Descriptor instead. func (*File) Descriptor() ([]byte, []int) { return file_internal_remote_gen_proto_rawDescGZIP(), []int{2} } func (x *File) GetPath() string { if x != nil { return x.Path } return "" } func (x *File) GetContentType() string { if x != nil { return x.ContentType } return "" } func (x *File) GetBytes() []byte { if x != nil { return x.Bytes } return nil } var File_internal_remote_gen_proto protoreflect.FileDescriptor var file_internal_remote_gen_proto_rawDesc = []byte{ 0x0a, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x47, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x22, 0x61, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x34, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x47, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x47, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x22, 0x53, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x32, 0x64, 0x0a, 0x03, 0x47, 0x65, 0x6e, 0x12, 0x5d, 0x0a, 0x08, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x47, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x73, 0x71, 0x6c, 0x63, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x47, 0x65, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_internal_remote_gen_proto_rawDescOnce sync.Once file_internal_remote_gen_proto_rawDescData = file_internal_remote_gen_proto_rawDesc ) func file_internal_remote_gen_proto_rawDescGZIP() []byte { file_internal_remote_gen_proto_rawDescOnce.Do(func() { file_internal_remote_gen_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_remote_gen_proto_rawDescData) }) return file_internal_remote_gen_proto_rawDescData } var file_internal_remote_gen_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_internal_remote_gen_proto_goTypes = []interface{}{ (*GenerateRequest)(nil), // 0: remote.sqlc.dev.Gen.v1.GenerateRequest (*GenerateResponse)(nil), // 1: remote.sqlc.dev.Gen.v1.GenerateResponse (*File)(nil), // 2: remote.sqlc.dev.Gen.v1.File } var file_internal_remote_gen_proto_depIdxs = []int32{ 2, // 0: remote.sqlc.dev.Gen.v1.GenerateRequest.inputs:type_name -> remote.sqlc.dev.Gen.v1.File 2, // 1: remote.sqlc.dev.Gen.v1.GenerateResponse.outputs:type_name -> remote.sqlc.dev.Gen.v1.File 0, // 2: remote.sqlc.dev.Gen.v1.Gen.Generate:input_type -> remote.sqlc.dev.Gen.v1.GenerateRequest 1, // 3: remote.sqlc.dev.Gen.v1.Gen.Generate:output_type -> remote.sqlc.dev.Gen.v1.GenerateResponse 3, // [3:4] is the sub-list for method output_type 2, // [2:3] 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_internal_remote_gen_proto_init() } func file_internal_remote_gen_proto_init() { if File_internal_remote_gen_proto != nil { return } if !protoimpl.UnsafeEnabled { file_internal_remote_gen_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenerateRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_remote_gen_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenerateResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_internal_remote_gen_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*File); 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_internal_remote_gen_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 1, }, GoTypes: file_internal_remote_gen_proto_goTypes, DependencyIndexes: file_internal_remote_gen_proto_depIdxs, MessageInfos: file_internal_remote_gen_proto_msgTypes, }.Build() File_internal_remote_gen_proto = out.File file_internal_remote_gen_proto_rawDesc = nil file_internal_remote_gen_proto_goTypes = nil file_internal_remote_gen_proto_depIdxs = nil } ================================================ FILE: internal/remote/gen.proto ================================================ syntax = "proto3"; package remote.sqlc.dev.Gen.v1; service Gen { rpc Generate(GenerateRequest) returns (GenerateResponse); } message GenerateRequest { string version = 1; repeated File inputs = 2; } message GenerateResponse { repeated File outputs = 1; int32 exit_code = 2; bytes stdout = 3; bytes stderr = 4; } message File { string path = 1; string content_type = 2; bytes bytes = 3; } ================================================ FILE: internal/remote/gen_grpc.pb.go ================================================ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc v3.21.0 // source: internal/remote/gen.proto package remote 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 // GenClient is the client API for Gen 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 GenClient interface { Generate(ctx context.Context, in *GenerateRequest, opts ...grpc.CallOption) (*GenerateResponse, error) } type genClient struct { cc grpc.ClientConnInterface } func NewGenClient(cc grpc.ClientConnInterface) GenClient { return &genClient{cc} } func (c *genClient) Generate(ctx context.Context, in *GenerateRequest, opts ...grpc.CallOption) (*GenerateResponse, error) { out := new(GenerateResponse) err := c.cc.Invoke(ctx, "/remote.sqlc.dev.Gen.v1.Gen/Generate", in, out, opts...) if err != nil { return nil, err } return out, nil } // GenServer is the server API for Gen service. // All implementations must embed UnimplementedGenServer // for forward compatibility type GenServer interface { Generate(context.Context, *GenerateRequest) (*GenerateResponse, error) mustEmbedUnimplementedGenServer() } // UnimplementedGenServer must be embedded to have forward compatible implementations. type UnimplementedGenServer struct { } func (UnimplementedGenServer) Generate(context.Context, *GenerateRequest) (*GenerateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Generate not implemented") } func (UnimplementedGenServer) mustEmbedUnimplementedGenServer() {} // UnsafeGenServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GenServer will // result in compilation errors. type UnsafeGenServer interface { mustEmbedUnimplementedGenServer() } func RegisterGenServer(s grpc.ServiceRegistrar, srv GenServer) { s.RegisterService(&Gen_ServiceDesc, srv) } func _Gen_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.(GenServer).Generate(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/remote.sqlc.dev.Gen.v1.Gen/Generate", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GenServer).Generate(ctx, req.(*GenerateRequest)) } return interceptor(ctx, in, info, handler) } // Gen_ServiceDesc is the grpc.ServiceDesc for Gen service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Gen_ServiceDesc = grpc.ServiceDesc{ ServiceName: "remote.sqlc.dev.Gen.v1.Gen", HandlerType: (*GenServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Generate", Handler: _Gen_Generate_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "internal/remote/gen.proto", } ================================================ FILE: internal/remote/rpc.go ================================================ package remote import ( "crypto/tls" "github.com/riza-io/grpc-go/credentials/basic" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/rpc" ) const defaultHostname = "remote.sqlc.dev" func NewClient(cloudConfig config.Cloud) (GenClient, error) { authID := cloudConfig.Organization + "/" + cloudConfig.Project opts := []grpc.DialOption{ grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})), grpc.WithPerRPCCredentials(basic.NewPerRPCCredentials(authID, cloudConfig.AuthToken)), grpc.WithUnaryInterceptor(rpc.UnaryInterceptor), } hostname := cloudConfig.Hostname if hostname == "" { hostname = defaultHostname } conn, err := grpc.Dial(hostname+":443", opts...) if err != nil { return nil, err } return NewGenClient(conn), nil } ================================================ FILE: internal/rpc/errors.go ================================================ package rpc import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) const errMessageUnauthenticated = `rpc authentication failed You may be using a sqlc auth token that was created for a different project, or your auth token may have expired.` var ErrUnauthenticated = status.New(codes.Unauthenticated, errMessageUnauthenticated).Err() ================================================ FILE: internal/rpc/interceptor.go ================================================ package rpc import ( "context" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) func UnaryInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { err := invoker(ctx, method, req, reply, cc, opts...) switch status.Convert(err).Code() { case codes.OK: return nil case codes.Unauthenticated: return ErrUnauthenticated default: return err } } ================================================ FILE: internal/shfmt/shfmt.go ================================================ package shfmt import ( "os" "regexp" "strings" ) var pat = regexp.MustCompile(`\$\{[A-Z_]+\}`) type Replacer struct { envmap map[string]string } func (r *Replacer) Replace(f string) string { return pat.ReplaceAllStringFunc(f, func(s string) string { s = strings.TrimPrefix(s, "${") s = strings.TrimSuffix(s, "}") return r.envmap[s] }) } func NewReplacer(env []string) *Replacer { r := Replacer{ envmap: map[string]string{}, } if env == nil { env = os.Environ() } for _, e := range env { k, v, _ := strings.Cut(e, "=") if k == "SQLC_AUTH_TOKEN" { continue } r.envmap[k] = v } return &r } ================================================ FILE: internal/shfmt/shfmt_test.go ================================================ package shfmt import "testing" func TestReplace(t *testing.T) { s := "POSTGRES_SQL://${PG_USER}:${PG_PASSWORD}@${PG_HOST}:${PG_PORT}/AUTHORS" r := NewReplacer([]string{ "PG_USER=user", "PG_PASSWORD=password", "PG_HOST=host", "PG_PORT=port", }) e := "POSTGRES_SQL://user:password@host:port/AUTHORS" if v := r.Replace(s); v != e { t.Errorf("%s != %s", v, e) } } ================================================ FILE: internal/source/code.go ================================================ package source import ( "bufio" "fmt" "sort" "strings" "unicode" ) type Edit struct { Location int Old string New string OldFunc func(string) int } type CommentSyntax struct { Dash bool Hash bool SlashStar bool } func LineNumber(source string, head int) (int, int) { // Calculate the true line and column number for a query, ignoring spaces var comment bool var loc, line, col int for i, char := range source { loc += 1 col += 1 // TODO: Check bounds if char == '-' && source[i+1] == '-' { comment = true } if char == '\n' { comment = false line += 1 col = 0 } if loc <= head { continue } if unicode.IsSpace(char) { continue } if comment { continue } break } return line + 1, col } func Pluck(source string, location, length int) (string, error) { head := location tail := location + length return source[head:tail], nil } func Mutate(raw string, a []Edit) (string, error) { if len(a) == 0 { return raw, nil } sort.Slice(a, func(i, j int) bool { return a[i].Location > a[j].Location }) s := raw for idx, edit := range a { start := edit.Location if start > len(s) || start < 0 { return "", fmt.Errorf("edit start location is out of bounds") } var oldLen int if edit.OldFunc != nil { oldLen = edit.OldFunc(s[start:]) } else { oldLen = len(edit.Old) } stop := edit.Location + oldLen if stop > len(s) { return "", fmt.Errorf("edit stop location is out of bounds") } // If this is not the first edit, (applied backwards), check if // this edit overlaps the previous one (and is therefore a developer error) if idx != 0 { prevEdit := a[idx-1] if prevEdit.Location < edit.Location+oldLen { return "", fmt.Errorf("2 edits overlap") } } s = s[:start] + edit.New + s[stop:] } return s, nil } func StripComments(sql string) (string, []string, error) { s := bufio.NewScanner(strings.NewReader(strings.TrimSpace(sql))) var lines, comments []string for s.Scan() { t := s.Text() if strings.HasPrefix(t, "-- name:") { continue } if strings.HasPrefix(t, "/* name:") && strings.HasSuffix(t, "*/") { continue } if strings.HasPrefix(t, "# name:") { continue } if strings.HasPrefix(t, "--") { comments = append(comments, strings.TrimPrefix(t, "--")) continue } if strings.HasPrefix(t, "/*") && strings.HasSuffix(t, "*/") { t = strings.TrimPrefix(t, "/*") t = strings.TrimSuffix(t, "*/") comments = append(comments, t) continue } if strings.HasPrefix(t, "#") { comments = append(comments, strings.TrimPrefix(t, "#")) continue } lines = append(lines, t) } return strings.Join(lines, "\n"), comments, s.Err() } func CleanedComments(rawSQL string, cs CommentSyntax) ([]string, error) { s := bufio.NewScanner(strings.NewReader(strings.TrimSpace(rawSQL))) var comments []string for s.Scan() { line := s.Text() var prefix string if strings.HasPrefix(line, "--") { if !cs.Dash { continue } prefix = "--" } if strings.HasPrefix(line, "/*") { if !cs.SlashStar { continue } prefix = "/*" } if strings.HasPrefix(line, "#") { if !cs.Hash { continue } prefix = "#" } if prefix == "" { continue } rest := line[len(prefix):] rest = strings.TrimSuffix(rest, "*/") comments = append(comments, rest) } return comments, s.Err() } ================================================ FILE: internal/source/mutate_test.go ================================================ package source import ( "fmt" "testing" ) // newEdit is a testing helper for quickly generating Edits func newEdit(loc int, old, new string) Edit { return Edit{Location: loc, Old: old, New: new} } // TestMutateSingle tests almost every possibility of a single edit func TestMutateSingle(t *testing.T) { type test struct { input string edit Edit expected string } tests := []test{ // Simple edits that replace everything {"", newEdit(0, "", ""), ""}, {"a", newEdit(0, "a", "A"), "A"}, {"abcde", newEdit(0, "abcde", "fghij"), "fghij"}, {"", newEdit(0, "", "fghij"), "fghij"}, {"abcde", newEdit(0, "abcde", ""), ""}, // Edits that start at the very beginning (But don't cover the whole range) {"abcde", newEdit(0, "a", "A"), "Abcde"}, {"abcde", newEdit(0, "ab", "AB"), "ABcde"}, {"abcde", newEdit(0, "abc", "ABC"), "ABCde"}, {"abcde", newEdit(0, "abcd", "ABCD"), "ABCDe"}, // The above repeated, but with different lengths {"abcde", newEdit(0, "a", ""), "bcde"}, {"abcde", newEdit(0, "ab", "A"), "Acde"}, {"abcde", newEdit(0, "abc", "AB"), "ABde"}, {"abcde", newEdit(0, "abcd", "AB"), "ABe"}, // Edits that touch the end (but don't cover the whole range) {"abcde", newEdit(4, "e", "E"), "abcdE"}, {"abcde", newEdit(3, "de", "DE"), "abcDE"}, {"abcde", newEdit(2, "cde", "CDE"), "abCDE"}, {"abcde", newEdit(1, "bcde", "BCDE"), "aBCDE"}, // The above repeated, but with different lengths {"abcde", newEdit(4, "e", ""), "abcd"}, {"abcde", newEdit(3, "de", "D"), "abcD"}, {"abcde", newEdit(2, "cde", "CD"), "abCD"}, {"abcde", newEdit(1, "bcde", "BC"), "aBC"}, // Raw insertions / deletions {"abcde", newEdit(0, "", "_"), "_abcde"}, {"abcde", newEdit(1, "", "_"), "a_bcde"}, {"abcde", newEdit(2, "", "_"), "ab_cde"}, {"abcde", newEdit(3, "", "_"), "abc_de"}, {"abcde", newEdit(4, "", "_"), "abcd_e"}, {"abcde", newEdit(5, "", "_"), "abcde_"}, } origTests := tests // Generate the reverse mutations, for every edit - the opposite edit that makes it "undo" for _, spec := range origTests { tests = append(tests, test{ input: spec.expected, edit: newEdit(spec.edit.Location, spec.edit.New, spec.edit.Old), expected: spec.input, }) } for _, spec := range tests { expected := spec.expected actual, err := Mutate(spec.input, []Edit{spec.edit}) testName := fmt.Sprintf("Mutate(%s, Edit{%v, %v -> %v})", spec.input, spec.edit.Location, spec.edit.Old, spec.edit.New) if err != nil { t.Errorf("%s should not error (%v)", testName, err) continue } if actual != expected { t.Errorf("%s expected %v; got %v", testName, expected, actual) } } } // TestMutateMulti tests combinations of edits func TestMutateMulti(t *testing.T) { type test struct { input string edit1 Edit edit2 Edit expected string } tests := []test{ // Edits that are >1 character from each other {"abcde", newEdit(0, "a", "A"), newEdit(2, "c", "C"), "AbCde"}, {"abcde", newEdit(0, "a", "A"), newEdit(2, "c", "C"), "AbCde"}, // 2 edits bump right up next to each other {"abcde", newEdit(0, "abc", ""), newEdit(3, "de", "DE"), "DE"}, {"abcde", newEdit(0, "abc", "ABC"), newEdit(3, "de", ""), "ABC"}, {"abcde", newEdit(0, "abc", "ABC"), newEdit(3, "de", "DE"), "ABCDE"}, {"abcde", newEdit(1, "b", "BB"), newEdit(2, "c", "CC"), "aBBCCde"}, // 2 edits bump next to each other, but don't cover the whole string {"abcdef", newEdit(1, "bc", "C"), newEdit(3, "de", "D"), "aCDf"}, {"abcde", newEdit(1, "bc", "CCCC"), newEdit(3, "d", "DDD"), "aCCCCDDDe"}, // lengthening edits {"abcde", newEdit(1, "b", "BBBB"), newEdit(2, "c", "CCCC"), "aBBBBCCCCde"}, } origTests := tests // Generate the edits in opposite order mutations, source edits should be independent of // the order the edits are specified for _, spec := range origTests { tests = append(tests, test{ input: spec.input, edit1: spec.edit2, edit2: spec.edit1, expected: spec.expected, }) } for _, spec := range tests { expected := spec.expected actual, err := Mutate(spec.input, []Edit{spec.edit1, spec.edit2}) testName := fmt.Sprintf("Mutate(%s, Edits{(%v, %v -> %v), (%v, %v -> %v)})", spec.input, spec.edit1.Location, spec.edit1.Old, spec.edit1.New, spec.edit2.Location, spec.edit2.Old, spec.edit2.New) if err != nil { t.Errorf("%s should not error (%v)", testName, err) continue } if actual != expected { t.Errorf("%s expected %v; got %v", testName, expected, actual) } } } // TestMutateErrorSingle test errors are generated for trivially incorrect single edits func TestMutateErrorSingle(t *testing.T) { type test struct { input string edit Edit } tests := []test{ // old text is longer than input text {"", newEdit(0, "a", "A")}, {"a", newEdit(0, "aa", "A")}, {"hello", newEdit(0, "hello!", "A")}, // negative indexes {"aaa", newEdit(-1, "aa", "A")}, {"aaa", newEdit(-2, "aa", "A")}, {"aaa", newEdit(-100, "aa", "A")}, } for _, spec := range tests { edit := spec.edit _, err := Mutate(spec.input, []Edit{edit}) testName := fmt.Sprintf("Mutate(%s, Edit{%v, %v -> %v})", spec.input, edit.Location, edit.Old, edit.New) if err == nil { t.Errorf("%s should error (%v)", testName, err) continue } } } // TestMutateErrorMulti tests error that can only happen across multiple errors func TestMutateErrorMulti(t *testing.T) { type test struct { input string edit1 Edit edit2 Edit } tests := []test{ // These edits overlap each other, and are therefore undefined {"abcdef", newEdit(0, "a", ""), newEdit(0, "a", "A")}, {"abcdef", newEdit(0, "ab", ""), newEdit(1, "ab", "AB")}, {"abcdef", newEdit(0, "abc", ""), newEdit(2, "abc", "ABC")}, // the last edit is longer than the string itself {"abcdef", newEdit(0, "abcdefghi", ""), newEdit(2, "abc", "ABC")}, // negative indexes {"abcdef", newEdit(-1, "abc", ""), newEdit(3, "abc", "ABC")}, {"abcdef", newEdit(0, "abc", ""), newEdit(-1, "abc", "ABC")}, } for _, spec := range tests { actual, err := Mutate(spec.input, []Edit{spec.edit1, spec.edit2}) testName := fmt.Sprintf("Mutate(%s, Edits{(%v, %v -> %v), (%v, %v -> %v)})", spec.input, spec.edit1.Location, spec.edit1.Old, spec.edit1.New, spec.edit2.Location, spec.edit2.Old, spec.edit2.New) if err == nil { t.Errorf("%s should error, but got (%v)", testName, actual) } } } ================================================ FILE: internal/sql/ast/CLAUDE.md ================================================ # AST Package - Claude Code Guide This package defines the Abstract Syntax Tree (AST) nodes used by sqlc to represent SQL statements across all supported databases (PostgreSQL, MySQL, SQLite). ## Key Concepts ### Node Interface All AST nodes implement the `Node` interface with: - `Pos() int` - returns the source position - `Format(buf *TrackedBuffer)` - formats the node back to SQL ### TrackedBuffer The `TrackedBuffer` type (`pg_query.go`) handles SQL formatting with dialect-specific behavior: - `astFormat(node Node)` - formats any AST node - `join(list *List, sep string)` - joins list items with separator - `WriteString(s string)` - writes raw SQL - `QuoteIdent(name string)` - quotes identifiers (dialect-specific) - `TypeName(ns, name string)` - formats type names (dialect-specific) ### Dialect Interface Dialect-specific formatting is handled via the `Dialect` interface: ```go type Dialect interface { QuoteIdent(string) string TypeName(ns, name string) string Param(int) string // $1 for PostgreSQL, ? for MySQL NamedParam(string) string // @name for PostgreSQL, :name for SQLite Cast(string) string } ``` ## Adding New AST Nodes When adding a new AST node type: 1. **Create the node file** (e.g., `variable_expr.go`): ```go package ast type VariableExpr struct { Name string Location int } func (n *VariableExpr) Pos() int { return n.Location } func (n *VariableExpr) Format(buf *TrackedBuffer) { if n == nil { return } buf.WriteString("@") buf.WriteString(n.Name) } ``` 2. **Add to `astutils/walk.go`** - Add a case in the Walk function: ```go case *ast.VariableExpr: // Leaf node - no children to traverse ``` 3. **Add to `astutils/rewrite.go`** - Add a case in the Apply function: ```go case *ast.VariableExpr: // Leaf node - no children to traverse ``` 4. **Update the parser/converter** - In the relevant engine (e.g., `dolphin/convert.go` for MySQL) ## Helper Functions for Format Methods - `set(node Node) bool` - returns true if node is non-nil and not an empty List - `items(list *List) bool` - returns true if list has items - `todo(node) Node` - placeholder for unimplemented conversions (returns nil) ## Common Node Types ### Statements - `SelectStmt` - SELECT queries with FromClause, WhereClause, etc. - `InsertStmt` - INSERT with Relation, Cols, SelectStmt, OnConflictClause - `UpdateStmt` - UPDATE with Relations, TargetList, WhereClause - `DeleteStmt` - DELETE with Relations, FromClause (for JOINs), Targets ### Expressions - `A_Expr` - General expression with operator (e.g., `a + b`, `@param`) - `ColumnRef` - Column reference with Fields list - `FuncCall` - Function call with Func, Args, aggregation options - `TypeCast` - Type cast with Arg and TypeName - `ParenExpr` - Parenthesized expression - `VariableExpr` - MySQL user variable (e.g., `@user_id`) ### Table References - `RangeVar` - Table reference with schema, name, alias - `JoinExpr` - JOIN with Larg, Rarg, Jointype, Quals/UsingClause ## MySQL-Specific Nodes - `VariableExpr` - User variables (`@var`), distinct from sqlc's `@param` syntax - `IntervalExpr` - INTERVAL expressions - `OnDuplicateKeyUpdate` - MySQL's ON DUPLICATE KEY UPDATE clause - `ParenExpr` - Explicit parentheses (TiDB parser wraps expressions) ## Important Distinctions ### MySQL @variable vs sqlc @param - MySQL user variables (`@user_id`) use `VariableExpr` - preserved as-is in output - sqlc named parameters (`@param`) use `A_Expr` with `@` operator - replaced with `?` - The `named.IsParamSign()` function checks for `A_Expr` with `@` operator ### Type Modifiers - `TypeName.Typmods` holds type modifiers like `varchar(255)` - For MySQL, only populate Typmods for types where length is user-specified: - VARCHAR, CHAR, VARBINARY, BINARY - need length - DATETIME, TIMESTAMP, DATE - internal flen should NOT be output ================================================ FILE: internal/sql/ast/a_array_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type A_ArrayExpr struct { Elements *List Location int } func (n *A_ArrayExpr) Pos() int { return n.Location } func (n *A_ArrayExpr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("ARRAY[") buf.join(n.Elements, d, ", ") buf.WriteString("]") } ================================================ FILE: internal/sql/ast/a_const.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type A_Const struct { Val Node Location int } func (n *A_Const) Pos() int { return n.Location } func (n *A_Const) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if _, ok := n.Val.(*String); ok { buf.WriteString("'") buf.astFormat(n.Val, d) buf.WriteString("'") } else { buf.astFormat(n.Val, d) } } ================================================ FILE: internal/sql/ast/a_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type A_Expr struct { Kind A_Expr_Kind Name *List Lexpr Node Rexpr Node Location int } func (n *A_Expr) Pos() int { return n.Location } // isNamedParam returns true if this A_Expr represents a named parameter (@name) // and extracts the parameter name if so. func (n *A_Expr) isNamedParam() (string, bool) { if n.Name == nil || len(n.Name.Items) != 1 { return "", false } s, ok := n.Name.Items[0].(*String) if !ok || s.Str != "@" { return "", false } if set(n.Lexpr) || !set(n.Rexpr) { return "", false } if nameStr, ok := n.Rexpr.(*String); ok { return nameStr.Str, true } return "", false } func (n *A_Expr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } // Check for named parameter first (works regardless of Kind) if name, ok := n.isNamedParam(); ok { buf.WriteString(d.NamedParam(name)) return } switch n.Kind { case A_Expr_Kind_IN: buf.astFormat(n.Lexpr, d) buf.WriteString(" IN (") buf.astFormat(n.Rexpr, d) buf.WriteString(")") case A_Expr_Kind_LIKE: buf.astFormat(n.Lexpr, d) buf.WriteString(" LIKE ") buf.astFormat(n.Rexpr, d) case A_Expr_Kind_ILIKE: buf.astFormat(n.Lexpr, d) buf.WriteString(" ILIKE ") buf.astFormat(n.Rexpr, d) case A_Expr_Kind_SIMILAR: buf.astFormat(n.Lexpr, d) buf.WriteString(" SIMILAR TO ") buf.astFormat(n.Rexpr, d) case A_Expr_Kind_BETWEEN: buf.astFormat(n.Lexpr, d) buf.WriteString(" BETWEEN ") if l, ok := n.Rexpr.(*List); ok && len(l.Items) == 2 { buf.astFormat(l.Items[0], d) buf.WriteString(" AND ") buf.astFormat(l.Items[1], d) } case A_Expr_Kind_NOT_BETWEEN: buf.astFormat(n.Lexpr, d) buf.WriteString(" NOT BETWEEN ") if l, ok := n.Rexpr.(*List); ok && len(l.Items) == 2 { buf.astFormat(l.Items[0], d) buf.WriteString(" AND ") buf.astFormat(l.Items[1], d) } case A_Expr_Kind_DISTINCT: buf.astFormat(n.Lexpr, d) buf.WriteString(" IS DISTINCT FROM ") buf.astFormat(n.Rexpr, d) case A_Expr_Kind_NOT_DISTINCT: buf.astFormat(n.Lexpr, d) buf.WriteString(" IS NOT DISTINCT FROM ") buf.astFormat(n.Rexpr, d) case A_Expr_Kind_NULLIF: buf.WriteString("NULLIF(") buf.astFormat(n.Lexpr, d) buf.WriteString(", ") buf.astFormat(n.Rexpr, d) buf.WriteString(")") default: // Standard operator (including A_Expr_Kind_OP) if set(n.Lexpr) { buf.astFormat(n.Lexpr, d) buf.WriteString(" ") } buf.astFormat(n.Name, d) if set(n.Rexpr) { buf.WriteString(" ") buf.astFormat(n.Rexpr, d) } } } ================================================ FILE: internal/sql/ast/a_expr_kind.go ================================================ package ast type A_Expr_Kind uint const ( A_Expr_Kind_OP A_Expr_Kind = 1 A_Expr_Kind_OP_ANY A_Expr_Kind = 2 A_Expr_Kind_OP_ALL A_Expr_Kind = 3 A_Expr_Kind_DISTINCT A_Expr_Kind = 4 A_Expr_Kind_NOT_DISTINCT A_Expr_Kind = 5 A_Expr_Kind_NULLIF A_Expr_Kind = 6 A_Expr_Kind_IN A_Expr_Kind = 7 A_Expr_Kind_LIKE A_Expr_Kind = 8 A_Expr_Kind_ILIKE A_Expr_Kind = 9 A_Expr_Kind_SIMILAR A_Expr_Kind = 10 A_Expr_Kind_BETWEEN A_Expr_Kind = 11 A_Expr_Kind_NOT_BETWEEN A_Expr_Kind = 12 A_Expr_Kind_BETWEEN_SYM A_Expr_Kind = 13 A_Expr_Kind_NOT_BETWEEN_SYM A_Expr_Kind = 14 ) func (n *A_Expr_Kind) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/a_indices.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type A_Indices struct { IsSlice bool Lidx Node Uidx Node } func (n *A_Indices) Pos() int { return 0 } func (n *A_Indices) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("[") if n.IsSlice { if set(n.Lidx) { buf.astFormat(n.Lidx, d) } buf.WriteString(":") if set(n.Uidx) { buf.astFormat(n.Uidx, d) } } else { buf.astFormat(n.Uidx, d) } buf.WriteString("]") } ================================================ FILE: internal/sql/ast/a_indirection.go ================================================ package ast type A_Indirection struct { Arg Node Indirection *List } func (n *A_Indirection) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/a_star.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type A_Star struct { } func (n *A_Star) Pos() int { return 0 } func (n *A_Star) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteRune('*') } ================================================ FILE: internal/sql/ast/access_priv.go ================================================ package ast type AccessPriv struct { PrivName *string Cols *List } func (n *AccessPriv) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/agg_split.go ================================================ package ast type AggSplit uint func (n *AggSplit) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/agg_strategy.go ================================================ package ast type AggStrategy uint func (n *AggStrategy) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/aggref.go ================================================ package ast type Aggref struct { Xpr Node Aggfnoid Oid Aggtype Oid Aggcollid Oid Inputcollid Oid Aggargtypes *List Aggdirectargs *List Args *List Aggorder *List Aggdistinct *List Aggfilter Node Aggstar bool Aggvariadic bool Aggkind byte Agglevelsup Index Aggsplit AggSplit Location int } func (n *Aggref) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/alias.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type Alias struct { Aliasname *string Colnames *List } func (n *Alias) Pos() int { return 0 } func (n *Alias) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.Aliasname != nil { buf.WriteString(*n.Aliasname) } if items(n.Colnames) { buf.WriteString("(") buf.astFormat(n.Colnames, d) buf.WriteString(")") } } ================================================ FILE: internal/sql/ast/alter_collation_stmt.go ================================================ package ast type AlterCollationStmt struct { Collname *List } func (n *AlterCollationStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_database_set_stmt.go ================================================ package ast type AlterDatabaseSetStmt struct { Dbname *string Setstmt *VariableSetStmt } func (n *AlterDatabaseSetStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_database_stmt.go ================================================ package ast type AlterDatabaseStmt struct { Dbname *string Options *List } func (n *AlterDatabaseStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_default_privileges_stmt.go ================================================ package ast type AlterDefaultPrivilegesStmt struct { Options *List Action *GrantStmt } func (n *AlterDefaultPrivilegesStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_domain_stmt.go ================================================ package ast type AlterDomainStmt struct { Subtype byte TypeName *List Name *string Def Node Behavior DropBehavior MissingOk bool } func (n *AlterDomainStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_enum_stmt.go ================================================ package ast type AlterEnumStmt struct { TypeName *List OldVal *string NewVal *string NewValNeighbor *string NewValIsAfter bool SkipIfNewValExists bool } func (n *AlterEnumStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_event_trig_stmt.go ================================================ package ast type AlterEventTrigStmt struct { Trigname *string Tgenabled byte } func (n *AlterEventTrigStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_extension_contents_stmt.go ================================================ package ast type AlterExtensionContentsStmt struct { Extname *string Action int Objtype ObjectType Object Node } func (n *AlterExtensionContentsStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_extension_stmt.go ================================================ package ast type AlterExtensionStmt struct { Extname *string Options *List } func (n *AlterExtensionStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_fdw_stmt.go ================================================ package ast type AlterFdwStmt struct { Fdwname *string FuncOptions *List Options *List } func (n *AlterFdwStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_foreign_server_stmt.go ================================================ package ast type AlterForeignServerStmt struct { Servername *string Version *string Options *List HasVersion bool } func (n *AlterForeignServerStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_function_stmt.go ================================================ package ast type AlterFunctionStmt struct { Func *ObjectWithArgs Actions *List } func (n *AlterFunctionStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_object_depends_stmt.go ================================================ package ast type AlterObjectDependsStmt struct { ObjectType ObjectType Relation *RangeVar Object Node Extname Node } func (n *AlterObjectDependsStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_object_schema_stmt.go ================================================ package ast type AlterObjectSchemaStmt struct { ObjectType ObjectType Relation *RangeVar Object Node Newschema *string MissingOk bool } func (n *AlterObjectSchemaStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_op_family_stmt.go ================================================ package ast type AlterOpFamilyStmt struct { Opfamilyname *List Amname *string IsDrop bool Items *List } func (n *AlterOpFamilyStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_operator_stmt.go ================================================ package ast type AlterOperatorStmt struct { Opername *ObjectWithArgs Options *List } func (n *AlterOperatorStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_owner_stmt.go ================================================ package ast type AlterOwnerStmt struct { ObjectType ObjectType Relation *RangeVar Object Node Newowner *RoleSpec } func (n *AlterOwnerStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_policy_stmt.go ================================================ package ast type AlterPolicyStmt struct { PolicyName *string Table *RangeVar Roles *List Qual Node WithCheck Node } func (n *AlterPolicyStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_publication_stmt.go ================================================ package ast type AlterPublicationStmt struct { Pubname *string Options *List Tables *List ForAllTables bool TableAction DefElemAction } func (n *AlterPublicationStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_role_set_stmt.go ================================================ package ast type AlterRoleSetStmt struct { Role *RoleSpec Database *string Setstmt *VariableSetStmt } func (n *AlterRoleSetStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_role_stmt.go ================================================ package ast type AlterRoleStmt struct { Role *RoleSpec Options *List Action int } func (n *AlterRoleStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_seq_stmt.go ================================================ package ast type AlterSeqStmt struct { Sequence *RangeVar Options *List ForIdentity bool MissingOk bool } func (n *AlterSeqStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_subscription_stmt.go ================================================ package ast type AlterSubscriptionStmt struct { Kind AlterSubscriptionType Subname *string Conninfo *string Publication *List Options *List } func (n *AlterSubscriptionStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_subscription_type.go ================================================ package ast type AlterSubscriptionType uint func (n *AlterSubscriptionType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_system_stmt.go ================================================ package ast type AlterSystemStmt struct { Setstmt *VariableSetStmt } func (n *AlterSystemStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_table_cmd.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" const ( AT_AddColumn AlterTableType = iota AT_AlterColumnType AT_DropColumn AT_DropNotNull AT_SetNotNull ) type AlterTableType int func (t AlterTableType) String() string { switch t { case AT_AddColumn: return "AddColumn" case AT_AlterColumnType: return "AlterColumnType" case AT_DropColumn: return "DropColumn" case AT_DropNotNull: return "DropNotNull" case AT_SetNotNull: return "SetNotNull" default: return "Unknown" } } type AlterTableCmd struct { Subtype AlterTableType Name *string Def *ColumnDef Newowner *RoleSpec Behavior DropBehavior MissingOk bool } func (n *AlterTableCmd) Pos() int { return 0 } func (n *AlterTableCmd) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } switch n.Subtype { case AT_AddColumn: buf.WriteString(" ADD COLUMN ") case AT_DropColumn: buf.WriteString(" DROP COLUMN ") } buf.astFormat(n.Def, d) } ================================================ FILE: internal/sql/ast/alter_table_move_all_stmt.go ================================================ package ast type AlterTableMoveAllStmt struct { OrigTablespacename *string Objtype ObjectType Roles *List NewTablespacename *string Nowait bool } func (n *AlterTableMoveAllStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_table_set_schema_stmt.go ================================================ package ast type AlterTableSetSchemaStmt struct { Table *TableName NewSchema *string MissingOk bool } func (n *AlterTableSetSchemaStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_table_space_options_stmt.go ================================================ package ast type AlterTableSpaceOptionsStmt struct { Tablespacename *string Options *List IsReset bool } func (n *AlterTableSpaceOptionsStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_table_stmt.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type AlterTableStmt struct { // TODO: Only TableName or Relation should be defined Relation *RangeVar Table *TableName Cmds *List MissingOk bool Relkind ObjectType } func (n *AlterTableStmt) Pos() int { return 0 } func (n *AlterTableStmt) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("ALTER TABLE ") buf.astFormat(n.Relation, d) buf.astFormat(n.Table, d) buf.astFormat(n.Cmds, d) } ================================================ FILE: internal/sql/ast/alter_table_type.go ================================================ package ast type AlterTableType_PG uint func (n *AlterTableType_PG) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_ts_config_type.go ================================================ package ast type AlterTSConfigType uint func (n *AlterTSConfigType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_ts_configuration_stmt.go ================================================ package ast type AlterTSConfigurationStmt struct { Kind AlterTSConfigType Cfgname *List Tokentype *List Dicts *List Override bool Replace bool MissingOk bool } func (n *AlterTSConfigurationStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_ts_dictionary_stmt.go ================================================ package ast type AlterTSDictionaryStmt struct { Dictname *List Options *List } func (n *AlterTSDictionaryStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_type_add_value_stmt.go ================================================ package ast type AlterTypeAddValueStmt struct { Type *TypeName NewValue *string NewValHasNeighbor bool NewValNeighbor *string NewValIsAfter bool SkipIfNewValExists bool } func (n *AlterTypeAddValueStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_type_rename_value_stmt.go ================================================ package ast type AlterTypeRenameValueStmt struct { Type *TypeName OldValue *string NewValue *string } func (n *AlterTypeRenameValueStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_type_set_schema_stmt.go ================================================ package ast type AlterTypeSetSchemaStmt struct { Type *TypeName NewSchema *string } func (n *AlterTypeSetSchemaStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alter_user_mapping_stmt.go ================================================ package ast type AlterUserMappingStmt struct { User *RoleSpec Servername *string Options *List } func (n *AlterUserMappingStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/alternative_sub_plan.go ================================================ package ast type AlternativeSubPlan struct { Xpr Node Subplans *List } func (n *AlternativeSubPlan) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/array_coerce_expr.go ================================================ package ast type ArrayCoerceExpr struct { Xpr Node Arg Node Elemfuncid Oid Resulttype Oid Resulttypmod int32 Resultcollid Oid IsExplicit bool Coerceformat CoercionForm Location int } func (n *ArrayCoerceExpr) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/array_expr.go ================================================ package ast type ArrayExpr struct { Xpr Node ArrayTypeid Oid ArrayCollid Oid ElementTypeid Oid Elements *List Multidims bool Location int } func (n *ArrayExpr) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/array_ref.go ================================================ package ast type ArrayRef struct { Xpr Node Refarraytype Oid Refelemtype Oid Reftypmod int32 Refcollid Oid Refupperindexpr *List Reflowerindexpr *List Refexpr Node Refassgnexpr Node } func (n *ArrayRef) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/between_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type BetweenExpr struct { // Expr is the value expression to be compared. Expr Node // Left is the left expression in the between statement. Left Node // Right is the right expression in the between statement. Right Node // Not is true, the expression is "not between". Not bool Location int } func (n *BetweenExpr) Pos() int { return n.Location } func (n *BetweenExpr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.astFormat(n.Expr, d) if n.Not { buf.WriteString(" NOT BETWEEN ") } else { buf.WriteString(" BETWEEN ") } buf.astFormat(n.Left, d) buf.WriteString(" AND ") buf.astFormat(n.Right, d) } ================================================ FILE: internal/sql/ast/bit_string.go ================================================ package ast type BitString struct { Str string } func (n *BitString) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/block_id_data.go ================================================ package ast type BlockIdData struct { BiHi uint16 BiLo uint16 } func (n *BlockIdData) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/bool_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type BoolExpr struct { Xpr Node Boolop BoolExprType Args *List Location int } func (n *BoolExpr) Pos() int { return n.Location } func (n *BoolExpr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } switch n.Boolop { case BoolExprTypeIsNull: if items(n.Args) && len(n.Args.Items) > 0 { buf.astFormat(n.Args.Items[0], d) } buf.WriteString(" IS NULL") case BoolExprTypeIsNotNull: if items(n.Args) && len(n.Args.Items) > 0 { buf.astFormat(n.Args.Items[0], d) } buf.WriteString(" IS NOT NULL") case BoolExprTypeNot: // NOT expression: format as NOT buf.WriteString("NOT ") if items(n.Args) && len(n.Args.Items) > 0 { buf.astFormat(n.Args.Items[0], d) } default: buf.WriteString("(") if items(n.Args) { switch n.Boolop { case BoolExprTypeAnd: buf.join(n.Args, d, " AND ") case BoolExprTypeOr: buf.join(n.Args, d, " OR ") } } buf.WriteString(")") } } ================================================ FILE: internal/sql/ast/bool_expr_type.go ================================================ package ast // https://github.com/pganalyze/libpg_query/blob/13-latest/protobuf/pg_query.proto#L2783-L2789 const ( _ BoolExprType = iota BoolExprTypeAnd BoolExprTypeOr BoolExprTypeNot // Added for MySQL BoolExprTypeIsNull BoolExprTypeIsNotNull ) type BoolExprType uint func (n *BoolExprType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/bool_test_type.go ================================================ package ast type BoolTestType uint func (n *BoolTestType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/boolean.go ================================================ package ast import ( "fmt" "github.com/sqlc-dev/sqlc/internal/sql/format" ) type Boolean struct { Boolval bool } func (n *Boolean) Pos() int { return 0 } func (n *Boolean) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.Boolval { fmt.Fprintf(buf, "true") } else { fmt.Fprintf(buf, "false") } } ================================================ FILE: internal/sql/ast/boolean_test_expr.go ================================================ package ast type BooleanTest struct { Xpr Node Arg Node Booltesttype BoolTestType Location int } func (n *BooleanTest) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/call_stmt.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type CallStmt struct { FuncCall *FuncCall } func (n *CallStmt) Pos() int { if n.FuncCall == nil { return 0 } return n.FuncCall.Pos() } func (n *CallStmt) Format(buf *TrackedBuffer, d format.Dialect) { buf.WriteString("CALL ") buf.astFormat(n.FuncCall, d) } ================================================ FILE: internal/sql/ast/case_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type CaseExpr struct { Xpr Node Casetype Oid Casecollid Oid Arg Node Args *List Defresult Node Location int } func (n *CaseExpr) Pos() int { return n.Location } func (n *CaseExpr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("CASE ") if set(n.Arg) { buf.astFormat(n.Arg, d) buf.WriteString(" ") } buf.join(n.Args, d, " ") if set(n.Defresult) { buf.WriteString(" ELSE ") buf.astFormat(n.Defresult, d) } buf.WriteString(" END") } ================================================ FILE: internal/sql/ast/case_test_expr.go ================================================ package ast type CaseTestExpr struct { Xpr Node TypeId Oid TypeMod int32 Collation Oid } func (n *CaseTestExpr) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/case_when.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type CaseWhen struct { Xpr Node Expr Node Result Node Location int } func (n *CaseWhen) Pos() int { return n.Location } func (n *CaseWhen) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("WHEN ") buf.astFormat(n.Expr, d) buf.WriteString(" THEN ") buf.astFormat(n.Result, d) } ================================================ FILE: internal/sql/ast/check_point_stmt.go ================================================ package ast type CheckPointStmt struct { } func (n *CheckPointStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/close_portal_stmt.go ================================================ package ast type ClosePortalStmt struct { Portalname *string } func (n *ClosePortalStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/cluster_stmt.go ================================================ package ast type ClusterStmt struct { Relation *RangeVar Indexname *string Verbose bool } func (n *ClusterStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/cmd_type.go ================================================ package ast type CmdType uint func (n *CmdType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/coalesce_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type CoalesceExpr struct { Xpr Node Coalescetype Oid Coalescecollid Oid Args *List Location int } func (n *CoalesceExpr) Pos() int { return n.Location } func (n *CoalesceExpr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("COALESCE(") buf.astFormat(n.Args, d) buf.WriteString(")") } ================================================ FILE: internal/sql/ast/coerce_to_domain.go ================================================ package ast type CoerceToDomain struct { Xpr Node Arg Node Resulttype Oid Resulttypmod int32 Resultcollid Oid Coercionformat CoercionForm Location int } func (n *CoerceToDomain) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/coerce_to_domain_value.go ================================================ package ast type CoerceToDomainValue struct { Xpr Node TypeId Oid TypeMod int32 Collation Oid Location int } func (n *CoerceToDomainValue) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/coerce_via_io.go ================================================ package ast type CoerceViaIO struct { Xpr Node Arg Node Resulttype Oid Resultcollid Oid Coerceformat CoercionForm Location int } func (n *CoerceViaIO) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/coercion_context.go ================================================ package ast type CoercionContext uint func (n *CoercionContext) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/coercion_form.go ================================================ package ast type CoercionForm uint func (n *CoercionForm) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/collate_clause.go ================================================ package ast type CollateClause struct { Arg Node Collname *List Location int } func (n *CollateClause) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/collate_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type CollateExpr struct { Xpr Node Arg Node CollOid Oid Location int } func (n *CollateExpr) Pos() int { return n.Location } func (n *CollateExpr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.astFormat(n.Xpr, d) buf.WriteString(" COLLATE ") buf.astFormat(n.Arg, d) } ================================================ FILE: internal/sql/ast/column_def.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type ColumnDef struct { Colname string TypeName *TypeName IsNotNull bool IsUnsigned bool IsArray bool ArrayDims int Vals *List Length *int PrimaryKey bool // From pg.ColumnDef Inhcount int IsLocal bool IsFromType bool IsFromParent bool Storage byte RawDefault Node CookedDefault Node Identity byte CollClause *CollateClause CollOid Oid Constraints *List Fdwoptions *List Location int Comment string } func (n *ColumnDef) Pos() int { return n.Location } func (n *ColumnDef) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString(n.Colname) buf.WriteString(" ") buf.astFormat(n.TypeName, d) // Use IsArray from ColumnDef since TypeName.ArrayBounds may not be set // (for type resolution compatibility) if n.IsArray && !items(n.TypeName.ArrayBounds) { buf.WriteString("[]") } if n.PrimaryKey { buf.WriteString(" PRIMARY KEY") } else if n.IsNotNull { buf.WriteString(" NOT NULL") } buf.astFormat(n.Constraints, d) } ================================================ FILE: internal/sql/ast/column_ref.go ================================================ package ast import ( "strings" "github.com/sqlc-dev/sqlc/internal/sql/format" ) type ColumnRef struct { Name string // From pg.ColumnRef Fields *List Location int } func (n *ColumnRef) Pos() int { return n.Location } func (n *ColumnRef) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.Fields != nil { var items []string for _, item := range n.Fields.Items { switch nn := item.(type) { case *String: items = append(items, d.QuoteIdent(nn.Str)) case *A_Star: items = append(items, "*") } } buf.WriteString(strings.Join(items, ".")) } } ================================================ FILE: internal/sql/ast/comment_on_column_stmt.go ================================================ package ast type CommentOnColumnStmt struct { Table *TableName Col *ColumnRef Comment *string } func (n *CommentOnColumnStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/comment_on_schema_stmt.go ================================================ package ast type CommentOnSchemaStmt struct { Schema *String Comment *string } func (n *CommentOnSchemaStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/comment_on_table_stmt.go ================================================ package ast type CommentOnTableStmt struct { Table *TableName Comment *string } func (n *CommentOnTableStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/comment_on_type_stmt.go ================================================ package ast type CommentOnTypeStmt struct { Type *TypeName Comment *string } func (n *CommentOnTypeStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/comment_on_view_stmt.go ================================================ package ast type CommentOnViewStmt struct { View *TableName Comment *string } func (n *CommentOnViewStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/comment_stmt.go ================================================ package ast type CommentStmt struct { Objtype ObjectType Object Node Comment *string } func (n *CommentStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/common_table_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type CommonTableExpr struct { Ctename *string Aliascolnames *List Ctequery Node Location int Cterecursive bool Cterefcount int Ctecolnames *List Ctecoltypes *List Ctecoltypmods *List Ctecolcollations *List } func (n *CommonTableExpr) Pos() int { return n.Location } func (n *CommonTableExpr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.Ctename != nil { buf.WriteString(*n.Ctename) } if items(n.Aliascolnames) { buf.WriteString("(") buf.join(n.Aliascolnames, d, ", ") buf.WriteString(")") } buf.WriteString(" AS (") buf.astFormat(n.Ctequery, d) buf.WriteString(")") } ================================================ FILE: internal/sql/ast/composite_type_stmt.go ================================================ package ast type CompositeTypeStmt struct { TypeName *TypeName } func (n *CompositeTypeStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/const.go ================================================ package ast type Const struct { Xpr Node Consttype Oid Consttypmod int32 Constcollid Oid Constlen int Constvalue Datum Constisnull bool Constbyval bool Location int } func (n *Const) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/constr_type.go ================================================ package ast type ConstrType uint func (n *ConstrType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/constraint.go ================================================ package ast type Constraint struct { Contype ConstrType Conname *string Deferrable bool Initdeferred bool Location int IsNoInherit bool RawExpr Node CookedExpr *string GeneratedWhen byte Keys *List Exclusions *List Options *List Indexname *string Indexspace *string AccessMethod *string WhereClause Node Pktable *RangeVar FkAttrs *List PkAttrs *List FkMatchtype byte FkUpdAction byte FkDelAction byte OldConpfeqop *List OldPktableOid Oid SkipValidation bool InitiallyValid bool } func (n *Constraint) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/constraints_set_stmt.go ================================================ package ast type ConstraintsSetStmt struct { Constraints *List Deferred bool } func (n *ConstraintsSetStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/convert_rowtype_expr.go ================================================ package ast type ConvertRowtypeExpr struct { Xpr Node Arg Node Resulttype Oid Convertformat CoercionForm Location int } func (n *ConvertRowtypeExpr) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/copy_stmt.go ================================================ package ast type CopyStmt struct { Relation *RangeVar Query Node Attlist *List IsFrom bool IsProgram bool Filename *string Options *List } func (n *CopyStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_am_stmt.go ================================================ package ast type CreateAmStmt struct { Amname *string HandlerName *List Amtype byte } func (n *CreateAmStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_cast_stmt.go ================================================ package ast type CreateCastStmt struct { Sourcetype *TypeName Targettype *TypeName Func *ObjectWithArgs Context CoercionContext Inout bool } func (n *CreateCastStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_conversion_stmt.go ================================================ package ast type CreateConversionStmt struct { ConversionName *List ForEncodingName *string ToEncodingName *string FuncName *List Def bool } func (n *CreateConversionStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_domain_stmt.go ================================================ package ast type CreateDomainStmt struct { Domainname *List TypeName *TypeName CollClause *CollateClause Constraints *List } func (n *CreateDomainStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_enum_stmt.go ================================================ package ast type CreateEnumStmt struct { TypeName *TypeName Vals *List } func (n *CreateEnumStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_event_trig_stmt.go ================================================ package ast type CreateEventTrigStmt struct { Trigname *string Eventname *string Whenclause *List Funcname *List } func (n *CreateEventTrigStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_extension_stmt.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type CreateExtensionStmt struct { Extname *string IfNotExists bool Options *List } func (n *CreateExtensionStmt) Pos() int { return 0 } func (n *CreateExtensionStmt) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("CREATE EXTENSION ") if n.IfNotExists { buf.WriteString("IF NOT EXISTS ") } if n.Extname != nil { buf.WriteString(*n.Extname) } } ================================================ FILE: internal/sql/ast/create_fdw_stmt.go ================================================ package ast type CreateFdwStmt struct { Fdwname *string FuncOptions *List Options *List } func (n *CreateFdwStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_foreign_server_stmt.go ================================================ package ast type CreateForeignServerStmt struct { Servername *string Servertype *string Version *string Fdwname *string IfNotExists bool Options *List } func (n *CreateForeignServerStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_foreign_table_stmt.go ================================================ package ast type CreateForeignTableStmt struct { Base *CreateStmt Servername *string Options *List } func (n *CreateForeignTableStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_function_stmt.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type CreateFunctionStmt struct { Replace bool Params *List ReturnType *TypeName Func *FuncName // TODO: Understand these two fields Options *List WithClause *List } func (n *CreateFunctionStmt) Pos() int { return 0 } func (n *CreateFunctionStmt) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("CREATE ") if n.Replace { buf.WriteString("OR REPLACE ") } buf.WriteString("FUNCTION ") buf.astFormat(n.Func, d) buf.WriteString("(") if items(n.Params) { buf.join(n.Params, d, ", ") } buf.WriteString(")") if n.ReturnType != nil { buf.WriteString(" RETURNS ") buf.astFormat(n.ReturnType, d) } // Format options (AS, LANGUAGE, etc.) if items(n.Options) { for _, opt := range n.Options.Items { buf.WriteString(" ") buf.astFormat(opt, d) } } } ================================================ FILE: internal/sql/ast/create_op_class_item.go ================================================ package ast type CreateOpClassItem struct { Itemtype int Name *ObjectWithArgs Number int OrderFamily *List ClassArgs *List Storedtype *TypeName } func (n *CreateOpClassItem) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_op_class_stmt.go ================================================ package ast type CreateOpClassStmt struct { Opclassname *List Opfamilyname *List Amname *string Datatype *TypeName Items *List IsDefault bool } func (n *CreateOpClassStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_op_family_stmt.go ================================================ package ast type CreateOpFamilyStmt struct { Opfamilyname *List Amname *string } func (n *CreateOpFamilyStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_p_lang_stmt.go ================================================ package ast type CreatePLangStmt struct { Replace bool Plname *string Plhandler *List Plinline *List Plvalidator *List Pltrusted bool } func (n *CreatePLangStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_policy_stmt.go ================================================ package ast type CreatePolicyStmt struct { PolicyName *string Table *RangeVar CmdName *string Permissive bool Roles *List Qual Node WithCheck Node } func (n *CreatePolicyStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_publication_stmt.go ================================================ package ast type CreatePublicationStmt struct { Pubname *string Options *List Tables *List ForAllTables bool } func (n *CreatePublicationStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_range_stmt.go ================================================ package ast type CreateRangeStmt struct { TypeName *List Params *List } func (n *CreateRangeStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_role_stmt.go ================================================ package ast type CreateRoleStmt struct { StmtType RoleStmtType Role *string Options *List } func (n *CreateRoleStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_schema_stmt.go ================================================ package ast type CreateSchemaStmt struct { Name *string SchemaElts *List Authrole *RoleSpec IfNotExists bool } func (n *CreateSchemaStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_seq_stmt.go ================================================ package ast type CreateSeqStmt struct { Sequence *RangeVar Options *List OwnerId Oid ForIdentity bool IfNotExists bool } func (n *CreateSeqStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_stats_stmt.go ================================================ package ast type CreateStatsStmt struct { Defnames *List StatTypes *List Exprs *List Relations *List IfNotExists bool } func (n *CreateStatsStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_stmt.go ================================================ package ast type CreateStmt struct { Relation *RangeVar TableElts *List InhRelations *List Partbound *PartitionBoundSpec Partspec *PartitionSpec OfTypename *TypeName Constraints *List Options *List Oncommit OnCommitAction Tablespacename *string IfNotExists bool } func (n *CreateStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_subscription_stmt.go ================================================ package ast type CreateSubscriptionStmt struct { Subname *string Conninfo *string Publication *List Options *List } func (n *CreateSubscriptionStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_table_as_stmt.go ================================================ package ast type CreateTableAsStmt struct { Query Node Into *IntoClause Relkind ObjectType IsSelectInto bool IfNotExists bool } func (n *CreateTableAsStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_table_space_stmt.go ================================================ package ast type CreateTableSpaceStmt struct { Tablespacename *string Owner *RoleSpec Location *string Options *List } func (n *CreateTableSpaceStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_table_stmt.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type CreateTableStmt struct { IfNotExists bool Name *TableName Cols []*ColumnDef ReferTable *TableName Comment string Inherits []*TableName } func (n *CreateTableStmt) Pos() int { return 0 } func (n *CreateTableStmt) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("CREATE TABLE ") buf.astFormat(n.Name, d) buf.WriteString("(") for i, col := range n.Cols { if i > 0 { buf.WriteString(", ") } buf.astFormat(col, d) } buf.WriteString(")") } ================================================ FILE: internal/sql/ast/create_transform_stmt.go ================================================ package ast type CreateTransformStmt struct { Replace bool TypeName *TypeName Lang *string Fromsql *ObjectWithArgs Tosql *ObjectWithArgs } func (n *CreateTransformStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_trig_stmt.go ================================================ package ast type CreateTrigStmt struct { Trigname *string Relation *RangeVar Funcname *List Args *List Row bool Timing int16 Events int16 Columns *List WhenClause Node Isconstraint bool TransitionRels *List Deferrable bool Initdeferred bool Constrrel *RangeVar } func (n *CreateTrigStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/create_user_mapping_stmt.go ================================================ package ast type CreateUserMappingStmt struct { User *RoleSpec Servername *string IfNotExists bool Options *List } func (n *CreateUserMappingStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/createdb_stmt.go ================================================ package ast type CreatedbStmt struct { Dbname *string Options *List } func (n *CreatedbStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/current_of_expr.go ================================================ package ast type CurrentOfExpr struct { Xpr Node Cvarno Index CursorName *string CursorParam int } func (n *CurrentOfExpr) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/deallocate_stmt.go ================================================ package ast type DeallocateStmt struct { Name *string } func (n *DeallocateStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/declare_cursor_stmt.go ================================================ package ast type DeclareCursorStmt struct { Portalname *string Options int Query Node } func (n *DeclareCursorStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/def_elem.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type DefElem struct { Defnamespace *string Defname *string Arg Node Defaction DefElemAction Location int } func (n *DefElem) Pos() int { return n.Location } func (n *DefElem) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.Defname != nil { switch *n.Defname { case "as": buf.WriteString("AS ") // AS clause contains function body which needs quoting if l, ok := n.Arg.(*List); ok { for i, item := range l.Items { if i > 0 { buf.WriteString(", ") } if s, ok := item.(*String); ok { buf.WriteString("'") buf.WriteString(s.Str) buf.WriteString("'") } else { buf.astFormat(item, d) } } } else { buf.astFormat(n.Arg, d) } case "language": buf.WriteString("LANGUAGE ") buf.astFormat(n.Arg, d) case "volatility": // VOLATILE, STABLE, IMMUTABLE buf.astFormat(n.Arg, d) case "strict": if s, ok := n.Arg.(*Boolean); ok && s.Boolval { buf.WriteString("STRICT") } else { buf.WriteString("CALLED ON NULL INPUT") } case "security": if s, ok := n.Arg.(*Boolean); ok && s.Boolval { buf.WriteString("SECURITY DEFINER") } else { buf.WriteString("SECURITY INVOKER") } default: buf.WriteString(*n.Defname) if n.Arg != nil { buf.WriteString(" ") buf.astFormat(n.Arg, d) } } } } ================================================ FILE: internal/sql/ast/def_elem_action.go ================================================ package ast type DefElemAction uint func (n *DefElemAction) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/define_stmt.go ================================================ package ast type DefineStmt struct { Kind ObjectType Oldstyle bool Defnames *List Args *List Definition *List IfNotExists bool } func (n *DefineStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/delete_stmt.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type DeleteStmt struct { Relations *List UsingClause *List WhereClause Node LimitCount Node ReturningList *List WithClause *WithClause // MySQL multi-table DELETE support Targets *List // Tables to delete from (e.g., jt.*, pt.*) FromClause Node // FROM clause with JOINs (Node to support JoinExpr) } func (n *DeleteStmt) Pos() int { return 0 } func (n *DeleteStmt) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.WithClause != nil { buf.astFormat(n.WithClause, d) buf.WriteString(" ") } buf.WriteString("DELETE ") // MySQL multi-table DELETE: DELETE t1.*, t2.* FROM t1 JOIN t2 ... if items(n.Targets) { buf.join(n.Targets, d, ", ") buf.WriteString(" FROM ") if set(n.FromClause) { buf.astFormat(n.FromClause, d) } else if items(n.Relations) { buf.astFormat(n.Relations, d) } } else { buf.WriteString("FROM ") if items(n.Relations) { buf.astFormat(n.Relations, d) } } if items(n.UsingClause) { buf.WriteString(" USING ") buf.join(n.UsingClause, d, ", ") } if set(n.WhereClause) { buf.WriteString(" WHERE ") buf.astFormat(n.WhereClause, d) } if set(n.LimitCount) { buf.WriteString(" LIMIT ") buf.astFormat(n.LimitCount, d) } if items(n.ReturningList) { buf.WriteString(" RETURNING ") buf.astFormat(n.ReturningList, d) } } ================================================ FILE: internal/sql/ast/discard_mode.go ================================================ package ast type DiscardMode uint func (n *DiscardMode) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/discard_stmt.go ================================================ package ast type DiscardStmt struct { Target DiscardMode } func (n *DiscardStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/do_stmt.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type DoStmt struct { Args *List } func (n *DoStmt) Pos() int { return 0 } func (n *DoStmt) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("DO ") // Find the "as" argument which contains the body if items(n.Args) { for _, arg := range n.Args.Items { if de, ok := arg.(*DefElem); ok && de.Defname != nil && *de.Defname == "as" { if s, ok := de.Arg.(*String); ok { buf.WriteString("$$") buf.WriteString(s.Str) buf.WriteString("$$") } } } } } ================================================ FILE: internal/sql/ast/drop_behavior.go ================================================ package ast type DropBehavior uint func (n *DropBehavior) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/drop_function_stmt.go ================================================ package ast type DropFunctionStmt struct { Funcs []*FuncSpec MissingOk bool } func (n *DropFunctionStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/drop_owned_stmt.go ================================================ package ast type DropOwnedStmt struct { Roles *List Behavior DropBehavior } func (n *DropOwnedStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/drop_role_stmt.go ================================================ package ast type DropRoleStmt struct { Roles *List MissingOk bool } func (n *DropRoleStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/drop_schema_stmt.go ================================================ package ast type DropSchemaStmt struct { Schemas []*String MissingOk bool } func (n *DropSchemaStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/drop_stmt.go ================================================ package ast type DropStmt struct { Objects *List RemoveType ObjectType Behavior DropBehavior MissingOk bool Concurrent bool } func (n *DropStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/drop_subscription_stmt.go ================================================ package ast type DropSubscriptionStmt struct { Subname *string MissingOk bool Behavior DropBehavior } func (n *DropSubscriptionStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/drop_table_space_stmt.go ================================================ package ast type DropTableSpaceStmt struct { Tablespacename *string MissingOk bool } func (n *DropTableSpaceStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/drop_table_stmt.go ================================================ package ast type DropTableStmt struct { IfExists bool Tables []*TableName } func (n *DropTableStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/drop_type_stmt.go ================================================ package ast type DropTypeStmt struct { IfExists bool Types []*TypeName } func (n *DropTypeStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/drop_user_mapping_stmt.go ================================================ package ast type DropUserMappingStmt struct { User *RoleSpec Servername *string MissingOk bool } func (n *DropUserMappingStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/dropdb_stmt.go ================================================ package ast type DropdbStmt struct { Dbname *string MissingOk bool } func (n *DropdbStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/execute_stmt.go ================================================ package ast type ExecuteStmt struct { Name *string Params *List } func (n *ExecuteStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/explain_stmt.go ================================================ package ast type ExplainStmt struct { Query Node Options *List } func (n *ExplainStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/expr.go ================================================ package ast type Expr struct { } func (n *Expr) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/fetch_direction.go ================================================ package ast type FetchDirection uint func (n *FetchDirection) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/fetch_stmt.go ================================================ package ast type FetchStmt struct { Direction FetchDirection HowMany int64 Portalname *string Ismove bool } func (n *FetchStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/field_select.go ================================================ package ast type FieldSelect struct { Xpr Node Arg Node Fieldnum AttrNumber Resulttype Oid Resulttypmod int32 Resultcollid Oid } func (n *FieldSelect) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/field_store.go ================================================ package ast type FieldStore struct { Xpr Node Arg Node Newvals *List Fieldnums *List Resulttype Oid } func (n *FieldStore) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/float.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type Float struct { Str string } func (n *Float) Pos() int { return 0 } func (n *Float) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString(n.Str) } ================================================ FILE: internal/sql/ast/from_expr.go ================================================ package ast type FromExpr struct { Fromlist *List Quals Node } func (n *FromExpr) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/func_call.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type FuncCall struct { Func *FuncName Funcname *List Args *List AggOrder *List AggFilter Node AggWithinGroup bool AggStar bool AggDistinct bool FuncVariadic bool Over *WindowDef Separator *string // MySQL GROUP_CONCAT SEPARATOR Location int } func (n *FuncCall) Pos() int { return n.Location } func (n *FuncCall) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.astFormat(n.Func, d) buf.WriteString("(") if n.AggDistinct { buf.WriteString("DISTINCT ") } if n.AggStar { buf.WriteString("*") } else { buf.astFormat(n.Args, d) } // ORDER BY inside function call (not WITHIN GROUP) if items(n.AggOrder) && !n.AggWithinGroup { buf.WriteString(" ORDER BY ") buf.join(n.AggOrder, d, ", ") } // SEPARATOR for GROUP_CONCAT (MySQL) if n.Separator != nil { buf.WriteString(" SEPARATOR ") buf.WriteString("'") buf.WriteString(*n.Separator) buf.WriteString("'") } buf.WriteString(")") // WITHIN GROUP clause for ordered-set aggregates if items(n.AggOrder) && n.AggWithinGroup { buf.WriteString(" WITHIN GROUP (ORDER BY ") buf.join(n.AggOrder, d, ", ") buf.WriteString(")") } if set(n.AggFilter) { buf.WriteString(" FILTER (WHERE ") buf.astFormat(n.AggFilter, d) buf.WriteString(")") } if n.Over != nil { buf.WriteString(" OVER ") buf.astFormat(n.Over, d) } } ================================================ FILE: internal/sql/ast/func_expr.go ================================================ package ast type FuncExpr struct { Xpr Node Funcid Oid Funcresulttype Oid Funcretset bool Funcvariadic bool Funcformat CoercionForm Funccollid Oid Inputcollid Oid Args *List Location int } func (n *FuncExpr) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/func_name.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type FuncName struct { Catalog string Schema string Name string } func (n *FuncName) Pos() int { return 0 } func (n *FuncName) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.Schema != "" { buf.WriteString(n.Schema) buf.WriteString(".") } if n.Name != "" { buf.WriteString(n.Name) } } ================================================ FILE: internal/sql/ast/func_param.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type FuncParamMode int const ( FuncParamIn FuncParamMode = iota FuncParamOut FuncParamInOut FuncParamVariadic FuncParamTable FuncParamDefault ) type FuncParam struct { Name *string Type *TypeName DefExpr Node // Will always be &ast.TODO Mode FuncParamMode } func (n *FuncParam) Pos() int { return 0 } func (n *FuncParam) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } // Parameter mode prefix (OUT, INOUT, VARIADIC) switch n.Mode { case FuncParamOut: buf.WriteString("OUT ") case FuncParamInOut: buf.WriteString("INOUT ") case FuncParamVariadic: buf.WriteString("VARIADIC ") } // Parameter name (if present) if n.Name != nil { buf.WriteString(*n.Name) buf.WriteString(" ") } // Parameter type buf.astFormat(n.Type, d) } ================================================ FILE: internal/sql/ast/func_spec.go ================================================ package ast type FuncSpec struct { Name *FuncName Args []*TypeName HasArgs bool } func (n *FuncSpec) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/function_parameter.go ================================================ package ast type FunctionParameter struct { Name *string ArgType *TypeName Mode FunctionParameterMode Defexpr Node } func (n *FunctionParameter) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/function_parameter_mode.go ================================================ package ast type FunctionParameterMode uint func (n *FunctionParameterMode) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/grant_object_type.go ================================================ package ast type GrantObjectType uint func (n *GrantObjectType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/grant_role_stmt.go ================================================ package ast type GrantRoleStmt struct { GrantedRoles *List GranteeRoles *List IsGrant bool Grantor *RoleSpec Behavior DropBehavior } func (n *GrantRoleStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/grant_stmt.go ================================================ package ast type GrantStmt struct { IsGrant bool Targtype GrantTargetType Objtype GrantObjectType Objects *List Privileges *List Grantees *List GrantOption bool Behavior DropBehavior } func (n *GrantStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/grant_target_type.go ================================================ package ast type GrantTargetType uint func (n *GrantTargetType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/grouping_func.go ================================================ package ast type GroupingFunc struct { Xpr Node Args *List Refs *List Cols *List Agglevelsup Index Location int } func (n *GroupingFunc) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/grouping_set.go ================================================ package ast type GroupingSet struct { Kind GroupingSetKind Content *List Location int } func (n *GroupingSet) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/grouping_set_kind.go ================================================ package ast type GroupingSetKind uint func (n *GroupingSetKind) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/import_foreign_schema_stmt.go ================================================ package ast type ImportForeignSchemaStmt struct { ServerName *string RemoteSchema *string LocalSchema *string ListType ImportForeignSchemaType TableList *List Options *List } func (n *ImportForeignSchemaStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/import_foreign_schema_type.go ================================================ package ast type ImportForeignSchemaType uint func (n *ImportForeignSchemaType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/in.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" // In describes a 'select foo in (bar, baz)' type statement, though there are multiple important variants handled. type In struct { // Expr is the value expression to be compared. Expr Node // List is the list expression in compare list. List []Node // Not is true, the expression is "not in". Not bool // Sel is the subquery, may be rewritten to other type of expression. Sel Node Location int } // Pos returns the location. func (n *In) Pos() int { return n.Location } // Format formats the In expression. func (n *In) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.astFormat(n.Expr, d) if n.Not { buf.WriteString(" NOT IN ") } else { buf.WriteString(" IN ") } if n.Sel != nil { buf.WriteString("(") buf.astFormat(n.Sel, d) buf.WriteString(")") } else if len(n.List) > 0 { buf.WriteString("(") for i, item := range n.List { if i > 0 { buf.WriteString(", ") } buf.astFormat(item, d) } buf.WriteString(")") } } ================================================ FILE: internal/sql/ast/index_elem.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type IndexElem struct { Name *string Expr Node Indexcolname *string Collation *List Opclass *List Ordering SortByDir NullsOrdering SortByNulls } func (n *IndexElem) Pos() int { return 0 } func (n *IndexElem) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.Name != nil && *n.Name != "" { buf.WriteString(*n.Name) } else if set(n.Expr) { buf.astFormat(n.Expr, d) } } ================================================ FILE: internal/sql/ast/index_stmt.go ================================================ package ast type IndexStmt struct { Idxname *string Relation *RangeVar AccessMethod *string TableSpace *string IndexParams *List Options *List WhereClause Node ExcludeOpNames *List Idxcomment *string IndexOid Oid Unique bool Primary bool Isconstraint bool Deferrable bool Initdeferred bool Transformed bool Concurrent bool IfNotExists bool } func (n *IndexStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/infer_clause.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type InferClause struct { IndexElems *List WhereClause Node Conname *string Location int } func (n *InferClause) Pos() int { return n.Location } func (n *InferClause) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.Conname != nil && *n.Conname != "" { buf.WriteString("ON CONSTRAINT ") buf.WriteString(*n.Conname) } else if items(n.IndexElems) { buf.WriteString("(") buf.join(n.IndexElems, d, ", ") buf.WriteString(")") if set(n.WhereClause) { buf.WriteString(" WHERE ") buf.astFormat(n.WhereClause, d) } } } ================================================ FILE: internal/sql/ast/inference_elem.go ================================================ package ast type InferenceElem struct { Xpr Node Expr Node Infercollid Oid Inferopclass Oid } func (n *InferenceElem) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/inline_code_block.go ================================================ package ast type InlineCodeBlock struct { SourceText *string LangOid Oid LangIsTrusted bool } func (n *InlineCodeBlock) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/insert_stmt.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type InsertStmt struct { Relation *RangeVar Cols *List SelectStmt Node OnConflictClause *OnConflictClause OnDuplicateKeyUpdate *OnDuplicateKeyUpdate // MySQL-specific ReturningList *List WithClause *WithClause Override OverridingKind DefaultValues bool // SQLite-specific: INSERT INTO ... DEFAULT VALUES } func (n *InsertStmt) Pos() int { return 0 } func (n *InsertStmt) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.WithClause != nil { buf.astFormat(n.WithClause, d) buf.WriteString(" ") } buf.WriteString("INSERT INTO ") if n.Relation != nil { buf.astFormat(n.Relation, d) } if items(n.Cols) { buf.WriteString(" (") buf.astFormat(n.Cols, d) buf.WriteString(")") } if n.DefaultValues { buf.WriteString(" DEFAULT VALUES") } else if set(n.SelectStmt) { buf.WriteString(" ") buf.astFormat(n.SelectStmt, d) } if n.OnConflictClause != nil { buf.WriteString(" ") buf.astFormat(n.OnConflictClause, d) } if n.OnDuplicateKeyUpdate != nil { buf.WriteString(" ") buf.astFormat(n.OnDuplicateKeyUpdate, d) } if items(n.ReturningList) { buf.WriteString(" RETURNING ") buf.astFormat(n.ReturningList, d) } } ================================================ FILE: internal/sql/ast/integer.go ================================================ package ast import ( "strconv" "github.com/sqlc-dev/sqlc/internal/sql/format" ) type Integer struct { Ival int64 } func (n *Integer) Pos() int { return 0 } func (n *Integer) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString(strconv.FormatInt(n.Ival, 10)) } ================================================ FILE: internal/sql/ast/interval_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" // IntervalExpr represents a MySQL INTERVAL expression like "INTERVAL 1 DAY" type IntervalExpr struct { Value Node Unit string Location int } func (n *IntervalExpr) Pos() int { return n.Location } func (n *IntervalExpr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("INTERVAL ") buf.astFormat(n.Value, d) buf.WriteString(" ") buf.WriteString(n.Unit) } ================================================ FILE: internal/sql/ast/into_clause.go ================================================ package ast type IntoClause struct { Rel *RangeVar ColNames *List Options *List OnCommit OnCommitAction TableSpaceName *string ViewQuery Node SkipData bool } func (n *IntoClause) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/join_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type JoinExpr struct { Jointype JoinType IsNatural bool Larg Node Rarg Node UsingClause *List Quals Node Alias *Alias Rtindex int } func (n *JoinExpr) Pos() int { return 0 } func (n *JoinExpr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.astFormat(n.Larg, d) if n.IsNatural { buf.WriteString(" NATURAL") } switch n.Jointype { case JoinTypeLeft: buf.WriteString(" LEFT JOIN ") case JoinTypeRight: buf.WriteString(" RIGHT JOIN ") case JoinTypeFull: buf.WriteString(" FULL JOIN ") case JoinTypeInner: // CROSS JOIN has no ON or USING clause if !items(n.UsingClause) && !set(n.Quals) { buf.WriteString(" CROSS JOIN ") } else { buf.WriteString(" JOIN ") } default: buf.WriteString(" JOIN ") } buf.astFormat(n.Rarg, d) if items(n.UsingClause) { buf.WriteString(" USING (") buf.join(n.UsingClause, d, ", ") buf.WriteString(")") } else if set(n.Quals) { buf.WriteString(" ON ") buf.astFormat(n.Quals, d) } } ================================================ FILE: internal/sql/ast/join_type.go ================================================ package ast // JoinType is the reported type of the join // Enum copies https://github.com/pganalyze/libpg_query/blob/13-latest/protobuf/pg_query.proto#L2890-L2901 const ( _ JoinType = iota JoinTypeInner JoinTypeLeft JoinTypeFull JoinTypeRight JoinTypeSemi JoinTypeAnti JoinTypeUniqueOuter JoinTypeUniqueInner ) type JoinType uint func (n *JoinType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/list.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type List struct { Items []Node } func (n *List) Pos() int { return 0 } func (n *List) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.join(n, d, ", ") } ================================================ FILE: internal/sql/ast/listen_stmt.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type ListenStmt struct { Conditionname *string } func (n *ListenStmt) Pos() int { return 0 } func (n *ListenStmt) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("LISTEN ") if n.Conditionname != nil { buf.WriteString(*n.Conditionname) } } ================================================ FILE: internal/sql/ast/load_stmt.go ================================================ package ast type LoadStmt struct { Filename *string } func (n *LoadStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/lock_clause_strength.go ================================================ package ast type LockClauseStrength uint func (n *LockClauseStrength) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/lock_stmt.go ================================================ package ast type LockStmt struct { Relations *List Mode int Nowait bool } func (n *LockStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/lock_wait_policy.go ================================================ package ast type LockWaitPolicy uint func (n *LockWaitPolicy) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/locking_clause.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type LockingClause struct { LockedRels *List Strength LockClauseStrength WaitPolicy LockWaitPolicy } func (n *LockingClause) Pos() int { return 0 } // LockClauseStrength values (matching pg_query_go) const ( LockClauseStrengthUndefined LockClauseStrength = 0 LockClauseStrengthNone LockClauseStrength = 1 LockClauseStrengthForKeyShare LockClauseStrength = 2 LockClauseStrengthForShare LockClauseStrength = 3 LockClauseStrengthForNoKeyUpdate LockClauseStrength = 4 LockClauseStrengthForUpdate LockClauseStrength = 5 ) // LockWaitPolicy values const ( LockWaitPolicyBlock LockWaitPolicy = 1 LockWaitPolicySkip LockWaitPolicy = 2 LockWaitPolicyError LockWaitPolicy = 3 ) func (n *LockingClause) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("FOR ") switch n.Strength { case LockClauseStrengthForKeyShare: buf.WriteString("KEY SHARE") case LockClauseStrengthForShare: buf.WriteString("SHARE") case LockClauseStrengthForNoKeyUpdate: buf.WriteString("NO KEY UPDATE") case LockClauseStrengthForUpdate: buf.WriteString("UPDATE") } if items(n.LockedRels) { buf.WriteString(" OF ") buf.join(n.LockedRels, d, ", ") } switch n.WaitPolicy { case LockWaitPolicySkip: buf.WriteString(" SKIP LOCKED") case LockWaitPolicyError: buf.WriteString(" NOWAIT") } } ================================================ FILE: internal/sql/ast/min_max_expr.go ================================================ package ast type MinMaxExpr struct { Xpr Node Minmaxtype Oid Minmaxcollid Oid Inputcollid Oid Op MinMaxOp Args *List Location int } func (n *MinMaxExpr) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/min_max_op.go ================================================ package ast type MinMaxOp uint func (n *MinMaxOp) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/multi_assign_ref.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type MultiAssignRef struct { Source Node Colno int Ncolumns int } func (n *MultiAssignRef) Pos() int { return 0 } func (n *MultiAssignRef) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.astFormat(n.Source, d) } ================================================ FILE: internal/sql/ast/named_arg_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type NamedArgExpr struct { Xpr Node Arg Node Name *string Argnumber int Location int } func (n *NamedArgExpr) Pos() int { return n.Location } func (n *NamedArgExpr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.Name != nil { buf.WriteString(*n.Name) } buf.WriteString(" => ") buf.astFormat(n.Arg, d) } ================================================ FILE: internal/sql/ast/next_value_expr.go ================================================ package ast type NextValueExpr struct { Xpr Node Seqid Oid TypeId Oid } func (n *NextValueExpr) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/node.go ================================================ package ast type Node interface { Pos() int } ================================================ FILE: internal/sql/ast/notify_stmt.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type NotifyStmt struct { Conditionname *string Payload *string } func (n *NotifyStmt) Pos() int { return 0 } func (n *NotifyStmt) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("NOTIFY ") if n.Conditionname != nil { buf.WriteString(*n.Conditionname) } if n.Payload != nil { buf.WriteString(", '") buf.WriteString(*n.Payload) buf.WriteString("'") } } ================================================ FILE: internal/sql/ast/null.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type Null struct { } func (n *Null) Pos() int { return 0 } func (n *Null) Format(buf *TrackedBuffer, d format.Dialect) { buf.WriteString("NULL") } ================================================ FILE: internal/sql/ast/null_test_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type NullTest struct { Xpr Node Arg Node Nulltesttype NullTestType Argisrow bool Location int } func (n *NullTest) Pos() int { return n.Location } // NullTestType values const ( NullTestTypeIsNull NullTestType = 1 NullTestTypeIsNotNull NullTestType = 2 ) func (n *NullTest) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.astFormat(n.Arg, d) switch n.Nulltesttype { case NullTestTypeIsNull: buf.WriteString(" IS NULL") case NullTestTypeIsNotNull: buf.WriteString(" IS NOT NULL") } } ================================================ FILE: internal/sql/ast/null_test_type.go ================================================ package ast type NullTestType uint func (n *NullTestType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/object_type.go ================================================ package ast type ObjectType uint func (n *ObjectType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/object_with_args.go ================================================ package ast type ObjectWithArgs struct { Objname *List Objargs *List ArgsUnspecified bool } func (n *ObjectWithArgs) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/on_commit_action.go ================================================ package ast type OnCommitAction uint func (n *OnCommitAction) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/on_conflict_action.go ================================================ package ast type OnConflictAction uint func (n *OnConflictAction) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/on_conflict_clause.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type OnConflictClause struct { Action OnConflictAction Infer *InferClause TargetList *List WhereClause Node Location int } func (n *OnConflictClause) Pos() int { return n.Location } // OnConflictAction values matching pg_query_go const ( OnConflictActionUndefined OnConflictAction = 0 OnConflictActionNone OnConflictAction = 1 OnConflictActionNothing OnConflictAction = 2 OnConflictActionUpdate OnConflictAction = 3 ) func (n *OnConflictClause) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("ON CONFLICT ") if n.Infer != nil { buf.astFormat(n.Infer, d) buf.WriteString(" ") } switch n.Action { case OnConflictActionNothing: buf.WriteString("DO NOTHING") case OnConflictActionUpdate: buf.WriteString("DO UPDATE SET ") // Format as assignment list: name = val if n.TargetList != nil { for i, item := range n.TargetList.Items { if i > 0 { buf.WriteString(", ") } if rt, ok := item.(*ResTarget); ok { if rt.Name != nil { buf.WriteString(*rt.Name) } buf.WriteString(" = ") buf.astFormat(rt.Val, d) } else { buf.astFormat(item, d) } } } if set(n.WhereClause) { buf.WriteString(" WHERE ") buf.astFormat(n.WhereClause, d) } } } ================================================ FILE: internal/sql/ast/on_conflict_expr.go ================================================ package ast type OnConflictExpr struct { Action OnConflictAction ArbiterElems *List ArbiterWhere Node Constraint Oid OnConflictSet *List OnConflictWhere Node ExclRelIndex int ExclRelTlist *List } func (n *OnConflictExpr) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/on_duplicate_key_update.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" // OnDuplicateKeyUpdate represents MySQL's ON DUPLICATE KEY UPDATE clause type OnDuplicateKeyUpdate struct { // TargetList contains the assignments (column = value pairs) TargetList *List Location int } func (n *OnDuplicateKeyUpdate) Pos() int { return n.Location } func (n *OnDuplicateKeyUpdate) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("ON DUPLICATE KEY UPDATE ") if n.TargetList != nil { for i, item := range n.TargetList.Items { if i > 0 { buf.WriteString(", ") } if rt, ok := item.(*ResTarget); ok { if rt.Name != nil { buf.WriteString(*rt.Name) } buf.WriteString(" = ") buf.astFormat(rt.Val, d) } else { buf.astFormat(item, d) } } } } ================================================ FILE: internal/sql/ast/op_expr.go ================================================ package ast type OpExpr struct { Xpr Node Opno Oid Opresulttype Oid Opretset bool Opcollid Oid Inputcollid Oid Args *List Location int } func (n *OpExpr) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/overriding_kind.go ================================================ package ast type OverridingKind uint func (n *OverridingKind) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/param.go ================================================ package ast type Param struct { Xpr Node Paramkind ParamKind Paramid int Paramtype Oid Paramtypmod int32 Paramcollid Oid Location int } func (n *Param) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/param_exec_data.go ================================================ package ast type ParamExecData struct { ExecPlan interface{} Value Datum Isnull bool } func (n *ParamExecData) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/param_extern_data.go ================================================ package ast type ParamExternData struct { Value Datum Isnull bool Pflags uint16 Ptype Oid } func (n *ParamExternData) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/param_kind.go ================================================ package ast type ParamKind uint func (n *ParamKind) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/param_list_info_data.go ================================================ package ast type ParamListInfoData struct { ParamFetchArg interface{} ParserSetupArg interface{} NumParams int ParamMask []uint32 } func (n *ParamListInfoData) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/param_ref.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type ParamRef struct { Number int Location int Dollar bool } func (n *ParamRef) Pos() int { return n.Location } func (n *ParamRef) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString(d.Param(n.Number)) } ================================================ FILE: internal/sql/ast/paren_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" // ParenExpr represents a parenthesized expression type ParenExpr struct { Expr Node Location int } func (n *ParenExpr) Pos() int { return n.Location } func (n *ParenExpr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("(") buf.astFormat(n.Expr, d) buf.WriteString(")") } ================================================ FILE: internal/sql/ast/partition_bound_spec.go ================================================ package ast type PartitionBoundSpec struct { Strategy byte Listdatums *List Lowerdatums *List Upperdatums *List Location int } func (n *PartitionBoundSpec) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/partition_cmd.go ================================================ package ast type PartitionCmd struct { Name *RangeVar Bound *PartitionBoundSpec } func (n *PartitionCmd) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/partition_elem.go ================================================ package ast type PartitionElem struct { Name *string Expr Node Collation *List Opclass *List Location int } func (n *PartitionElem) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/partition_range_datum.go ================================================ package ast type PartitionRangeDatum struct { Kind PartitionRangeDatumKind Value Node Location int } func (n *PartitionRangeDatum) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/partition_range_datum_kind.go ================================================ package ast type PartitionRangeDatumKind uint func (n *PartitionRangeDatumKind) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/partition_spec.go ================================================ package ast type PartitionSpec struct { Strategy *string PartParams *List Location int } func (n *PartitionSpec) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/prepare_stmt.go ================================================ package ast type PrepareStmt struct { Name *string Argtypes *List Query Node } func (n *PrepareStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/print.go ================================================ package ast import ( "strings" "github.com/sqlc-dev/sqlc/internal/debug" "github.com/sqlc-dev/sqlc/internal/sql/format" ) type nodeFormatter interface { Format(*TrackedBuffer, format.Dialect) } type TrackedBuffer struct { *strings.Builder } // NewTrackedBuffer creates a new TrackedBuffer. func NewTrackedBuffer() *TrackedBuffer { return &TrackedBuffer{ Builder: new(strings.Builder), } } func (t *TrackedBuffer) astFormat(n Node, d format.Dialect) { if ft, ok := n.(nodeFormatter); ok { ft.Format(t, d) } else { debug.Dump(n) } } func (t *TrackedBuffer) join(n *List, d format.Dialect, sep string) { if n == nil { return } for i, item := range n.Items { if _, ok := item.(*TODO); ok { continue } if i > 0 { t.WriteString(sep) } t.astFormat(item, d) } } func Format(n Node, d format.Dialect) string { tb := NewTrackedBuffer() if ft, ok := n.(nodeFormatter); ok { ft.Format(tb, d) } return tb.String() } func set(n Node) bool { if n == nil { return false } _, ok := n.(*TODO) if ok { return false } return true } func items(n *List) bool { if n == nil { return false } return len(n.Items) > 0 } func todo(n *List) bool { for _, item := range n.Items { if _, ok := item.(*TODO); !ok { return false } } return true } ================================================ FILE: internal/sql/ast/query.go ================================================ package ast type Query struct { CommandType CmdType QuerySource QuerySource QueryId uint32 CanSetTag bool UtilityStmt Node ResultRelation int HasAggs bool HasWindowFuncs bool HasTargetSrfs bool HasSubLinks bool HasDistinctOn bool HasRecursive bool HasModifyingCte bool HasForUpdate bool HasRowSecurity bool CteList *List Rtable *List Jointree *FromExpr TargetList *List Override OverridingKind OnConflict *OnConflictExpr ReturningList *List GroupClause *List GroupingSets *List HavingQual Node WindowClause *List DistinctClause *List SortClause *List LimitOffset Node LimitCount Node RowMarks *List SetOperations Node ConstraintDeps *List WithCheckOptions *List StmtLocation int StmtLen int } func (n *Query) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/query_source.go ================================================ package ast type QuerySource uint func (n *QuerySource) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/range_function.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type RangeFunction struct { Lateral bool Ordinality bool IsRowsfrom bool Functions *List Alias *Alias Coldeflist *List } func (n *RangeFunction) Pos() int { return 0 } func (n *RangeFunction) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.Lateral { buf.WriteString("LATERAL ") } buf.astFormat(n.Functions, d) if n.Ordinality { buf.WriteString(" WITH ORDINALITY") } if n.Alias != nil { buf.WriteString(" AS ") buf.astFormat(n.Alias, d) } } ================================================ FILE: internal/sql/ast/range_subselect.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type RangeSubselect struct { Lateral bool Subquery Node Alias *Alias } func (n *RangeSubselect) Pos() int { return 0 } func (n *RangeSubselect) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.Lateral { buf.WriteString("LATERAL ") } buf.WriteString("(") buf.astFormat(n.Subquery, d) buf.WriteString(")") if n.Alias != nil { buf.WriteString(" AS ") buf.astFormat(n.Alias, d) } } ================================================ FILE: internal/sql/ast/range_table_func.go ================================================ package ast type RangeTableFunc struct { Lateral bool Docexpr Node Rowexpr Node Namespaces *List Columns *List Alias *Alias Location int } func (n *RangeTableFunc) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/range_table_func_col.go ================================================ package ast type RangeTableFuncCol struct { Colname *string TypeName *TypeName ForOrdinality bool IsNotNull bool Colexpr Node Coldefexpr Node Location int } func (n *RangeTableFuncCol) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/range_table_sample.go ================================================ package ast type RangeTableSample struct { Relation Node Method *List Args *List Repeatable Node Location int } func (n *RangeTableSample) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/range_tbl_entry.go ================================================ package ast type RangeTblEntry struct { Rtekind RTEKind Relid Oid Relkind byte Tablesample *TableSampleClause Subquery *Query SecurityBarrier bool Jointype JoinType Joinaliasvars *List Functions *List Funcordinality bool Tablefunc *TableFunc ValuesLists *List Ctename *string Ctelevelsup Index SelfReference bool Coltypes *List Coltypmods *List Colcollations *List Enrname *string Enrtuples float64 Alias *Alias Eref *Alias Lateral bool Inh bool InFromCl bool RequiredPerms AclMode CheckAsUser Oid SelectedCols []uint32 InsertedCols []uint32 UpdatedCols []uint32 SecurityQuals *List } func (n *RangeTblEntry) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/range_tbl_function.go ================================================ package ast type RangeTblFunction struct { Funcexpr Node Funccolcount int Funccolnames *List Funccoltypes *List Funccoltypmods *List Funccolcollations *List Funcparams []uint32 } func (n *RangeTblFunction) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/range_tbl_ref.go ================================================ package ast type RangeTblRef struct { Rtindex int } func (n *RangeTblRef) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/range_var.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type RangeVar struct { Catalogname *string Schemaname *string Relname *string Inh bool Relpersistence byte Alias *Alias Location int } func (n *RangeVar) Pos() int { return n.Location } func (n *RangeVar) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.Schemaname != nil && *n.Schemaname != "" { buf.WriteString(d.QuoteIdent(*n.Schemaname)) buf.WriteString(".") } if n.Relname != nil { buf.WriteString(d.QuoteIdent(*n.Relname)) } if n.Alias != nil { buf.WriteString(" AS ") buf.astFormat(n.Alias, d) } } ================================================ FILE: internal/sql/ast/raw_stmt.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type RawStmt struct { Stmt Node StmtLocation int StmtLen int } func (n *RawStmt) Pos() int { return n.StmtLocation } func (n *RawStmt) Format(buf *TrackedBuffer, d format.Dialect) { if n.Stmt != nil { buf.astFormat(n.Stmt, d) } buf.WriteString(";") } ================================================ FILE: internal/sql/ast/reassign_owned_stmt.go ================================================ package ast type ReassignOwnedStmt struct { Roles *List Newrole *RoleSpec } func (n *ReassignOwnedStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/refresh_mat_view_stmt.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type RefreshMatViewStmt struct { Concurrent bool SkipData bool Relation *RangeVar } func (n *RefreshMatViewStmt) Pos() int { return 0 } func (n *RefreshMatViewStmt) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("REFRESH MATERIALIZED VIEW ") buf.astFormat(n.Relation, d) } ================================================ FILE: internal/sql/ast/reindex_object_type.go ================================================ package ast type ReindexObjectType uint func (n *ReindexObjectType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/reindex_stmt.go ================================================ package ast type ReindexStmt struct { Kind ReindexObjectType Relation *RangeVar Name *string Options int } func (n *ReindexStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/relabel_type.go ================================================ package ast type RelabelType struct { Xpr Node Arg Node Resulttype Oid Resulttypmod int32 Resultcollid Oid Relabelformat CoercionForm Location int } func (n *RelabelType) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/rename_column_stmt.go ================================================ package ast type RenameColumnStmt struct { Table *TableName Col *ColumnRef NewName *string MissingOk bool } func (n *RenameColumnStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/rename_stmt.go ================================================ package ast type RenameStmt struct { RenameType ObjectType RelationType ObjectType Relation *RangeVar Object Node Subname *string Newname *string Behavior DropBehavior MissingOk bool } func (n *RenameStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/rename_table_stmt.go ================================================ package ast type RenameTableStmt struct { Table *TableName NewName *string MissingOk bool } func (n *RenameTableStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/rename_type_stmt.go ================================================ package ast type RenameTypeStmt struct { Type *TypeName NewName *string } func (n *RenameTypeStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/replica_identity_stmt.go ================================================ package ast type ReplicaIdentityStmt struct { IdentityType byte Name *string } func (n *ReplicaIdentityStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/res_target.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type ResTarget struct { Name *string Indirection *List Val Node Location int } func (n *ResTarget) Pos() int { return n.Location } func (n *ResTarget) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if set(n.Val) { buf.astFormat(n.Val, d) if n.Name != nil { buf.WriteString(" AS ") buf.WriteString(d.QuoteIdent(*n.Name)) } } else { if n.Name != nil { buf.WriteString(d.QuoteIdent(*n.Name)) } } } ================================================ FILE: internal/sql/ast/role_spec.go ================================================ package ast type RoleSpec struct { Roletype RoleSpecType Rolename *string Location int } func (n *RoleSpec) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/role_spec_type.go ================================================ package ast type RoleSpecType uint func (n *RoleSpecType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/role_stmt_type.go ================================================ package ast type RoleStmtType uint func (n *RoleStmtType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/row_compare_expr.go ================================================ package ast type RowCompareExpr struct { Xpr Node Rctype RowCompareType Opnos *List Opfamilies *List Inputcollids *List Largs *List Rargs *List } func (n *RowCompareExpr) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/row_compare_type.go ================================================ package ast type RowCompareType uint func (n *RowCompareType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/row_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type RowExpr struct { Xpr Node Args *List RowTypeid Oid RowFormat CoercionForm Colnames *List Location int } func (n *RowExpr) Pos() int { return n.Location } func (n *RowExpr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if items(n.Args) { buf.WriteString("args") buf.astFormat(n.Args, d) } buf.astFormat(n.Xpr, d) if items(n.Colnames) { buf.WriteString("cols") buf.astFormat(n.Colnames, d) } } ================================================ FILE: internal/sql/ast/row_mark_clause.go ================================================ package ast type RowMarkClause struct { Rti Index Strength LockClauseStrength WaitPolicy LockWaitPolicy PushedDown bool } func (n *RowMarkClause) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/rte_kind.go ================================================ package ast type RTEKind uint func (n *RTEKind) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/rule_stmt.go ================================================ package ast type RuleStmt struct { Relation *RangeVar Rulename *string WhereClause Node Event CmdType Instead bool Actions *List Replace bool } func (n *RuleStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/scalar_array_op_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type ScalarArrayOpExpr struct { Xpr Node Opno Oid UseOr bool Inputcollid Oid Args *List Location int } func (n *ScalarArrayOpExpr) Pos() int { return n.Location } func (n *ScalarArrayOpExpr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } // ScalarArrayOpExpr represents "scalar op ANY/ALL (array)" // Args[0] is the left operand, Args[1] is the array if n.Args != nil && len(n.Args.Items) >= 2 { buf.astFormat(n.Args.Items[0], d) buf.WriteString(" = ") // TODO: Use actual operator based on Opno if n.UseOr { buf.WriteString("ANY(") } else { buf.WriteString("ALL(") } buf.astFormat(n.Args.Items[1], d) buf.WriteString(")") } } ================================================ FILE: internal/sql/ast/scan_direction.go ================================================ package ast type ScanDirection uint func (n *ScanDirection) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/sec_label_stmt.go ================================================ package ast type SecLabelStmt struct { Objtype ObjectType Object Node Provider *string Label *string } func (n *SecLabelStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/select_stmt.go ================================================ package ast import ( "fmt" "github.com/sqlc-dev/sqlc/internal/sql/format" ) type SelectStmt struct { DistinctClause *List IntoClause *IntoClause TargetList *List FromClause *List WhereClause Node GroupClause *List HavingClause Node WindowClause *List ValuesLists *List SortClause *List LimitOffset Node LimitCount Node LockingClause *List WithClause *WithClause Op SetOperation All bool Larg *SelectStmt Rarg *SelectStmt } func (n *SelectStmt) Pos() int { return 0 } func (n *SelectStmt) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if items(n.ValuesLists) { buf.WriteString("VALUES ") // ValuesLists is a list of rows, where each row is a List of values for i, row := range n.ValuesLists.Items { if i > 0 { buf.WriteString(", ") } buf.WriteString("(") buf.astFormat(row, d) buf.WriteString(")") } return } if n.WithClause != nil { buf.astFormat(n.WithClause, d) buf.WriteString(" ") } if n.Larg != nil && n.Rarg != nil { buf.astFormat(n.Larg, d) switch n.Op { case Union: buf.WriteString(" UNION ") case Except: buf.WriteString(" EXCEPT ") case Intersect: buf.WriteString(" INTERSECT ") } if n.All { buf.WriteString("ALL ") } buf.astFormat(n.Rarg, d) } else { buf.WriteString("SELECT ") } if items(n.DistinctClause) { buf.WriteString("DISTINCT ") if !todo(n.DistinctClause) { fmt.Fprintf(buf, "ON (") buf.astFormat(n.DistinctClause, d) fmt.Fprintf(buf, ")") } } buf.astFormat(n.TargetList, d) if items(n.FromClause) { buf.WriteString(" FROM ") buf.astFormat(n.FromClause, d) } if set(n.WhereClause) { buf.WriteString(" WHERE ") buf.astFormat(n.WhereClause, d) } if items(n.GroupClause) { buf.WriteString(" GROUP BY ") buf.astFormat(n.GroupClause, d) } if set(n.HavingClause) { buf.WriteString(" HAVING ") buf.astFormat(n.HavingClause, d) } if items(n.SortClause) { buf.WriteString(" ORDER BY ") buf.astFormat(n.SortClause, d) } if set(n.LimitCount) { buf.WriteString(" LIMIT ") buf.astFormat(n.LimitCount, d) } if set(n.LimitOffset) { buf.WriteString(" OFFSET ") buf.astFormat(n.LimitOffset, d) } if items(n.LockingClause) { buf.WriteString(" ") buf.astFormat(n.LockingClause, d) } } ================================================ FILE: internal/sql/ast/set_op_cmd.go ================================================ package ast type SetOpCmd uint func (n *SetOpCmd) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/set_op_strategy.go ================================================ package ast type SetOpStrategy uint func (n *SetOpStrategy) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/set_operation.go ================================================ package ast import "strconv" const ( None SetOperation = iota Union Intersect Except ) type SetOperation uint func (n *SetOperation) Pos() int { return 0 } func (n SetOperation) String() string { switch n { case None: return "None" case Union: return "Union" case Intersect: return "Intersect" case Except: return "Except" default: return "Unknown(" + strconv.FormatUint(uint64(n), 10) + ")" } } ================================================ FILE: internal/sql/ast/set_operation_stmt.go ================================================ package ast type SetOperationStmt struct { Op SetOperation All bool Larg Node Rarg Node ColTypes *List ColTypmods *List ColCollations *List GroupClauses *List } func (n *SetOperationStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/set_to_default.go ================================================ package ast type SetToDefault struct { Xpr Node TypeId Oid TypeMod int32 Collation Oid Location int } func (n *SetToDefault) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/sort_by.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type SortBy struct { Node Node SortbyDir SortByDir SortbyNulls SortByNulls UseOp *List Location int } func (n *SortBy) Pos() int { return n.Location } func (n *SortBy) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.astFormat(n.Node, d) switch n.SortbyDir { case SortByDirAsc: buf.WriteString(" ASC") case SortByDirDesc: buf.WriteString(" DESC") } switch n.SortbyNulls { case SortByNullsFirst: buf.WriteString(" NULLS FIRST") case SortByNullsLast: buf.WriteString(" NULLS LAST") } } ================================================ FILE: internal/sql/ast/sort_by_dir.go ================================================ package ast type SortByDir uint func (n *SortByDir) Pos() int { return 0 } const ( SortByDirUndefined SortByDir = 0 SortByDirDefault SortByDir = 1 SortByDirAsc SortByDir = 2 SortByDirDesc SortByDir = 3 SortByDirUsing SortByDir = 4 ) ================================================ FILE: internal/sql/ast/sort_by_nulls.go ================================================ package ast type SortByNulls uint func (n *SortByNulls) Pos() int { return 0 } const ( SortByNullsUndefined SortByNulls = 0 SortByNullsDefault SortByNulls = 1 SortByNullsFirst SortByNulls = 2 SortByNullsLast SortByNulls = 3 ) ================================================ FILE: internal/sql/ast/sort_group_clause.go ================================================ package ast type SortGroupClause struct { TleSortGroupRef Index Eqop Oid Sortop Oid NullsFirst bool Hashable bool } func (n *SortGroupClause) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/sql_value_function.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type SQLValueFunction struct { Xpr Node Op SQLValueFunctionOp Type Oid Typmod int32 Location int } func (n *SQLValueFunction) Pos() int { return n.Location } func (n *SQLValueFunction) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } switch n.Op { case SVFOpCurrentDate: buf.WriteString("CURRENT_DATE") case SVFOpCurrentTime: case SVFOpCurrentTimeN: case SVFOpCurrentTimestamp: case SVFOpCurrentTimestampN: case SVFOpLocaltime: case SVFOpLocaltimeN: case SVFOpLocaltimestamp: case SVFOpLocaltimestampN: case SVFOpCurrentRole: case SVFOpCurrentUser: case SVFOpUser: case SVFOpSessionUser: case SVFOpCurrentCatalog: case SVFOpCurrentSchema: } } ================================================ FILE: internal/sql/ast/sql_value_function_op.go ================================================ package ast type SQLValueFunctionOp uint const ( // https://github.com/pganalyze/libpg_query/blob/15-latest/protobuf/pg_query.proto#L2984C1-L3003C1 _ SQLValueFunctionOp = iota SVFOpCurrentDate SVFOpCurrentTime SVFOpCurrentTimeN SVFOpCurrentTimestamp SVFOpCurrentTimestampN SVFOpLocaltime SVFOpLocaltimeN SVFOpLocaltimestamp SVFOpLocaltimestampN SVFOpCurrentRole SVFOpCurrentUser SVFOpUser SVFOpSessionUser SVFOpCurrentCatalog SVFOpCurrentSchema ) func (n *SQLValueFunctionOp) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/statement.go ================================================ package ast type Statement struct { Raw *RawStmt } func (n *Statement) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/string.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type String struct { Str string } func (n *String) Pos() int { return 0 } func (n *String) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString(n.Str) } ================================================ FILE: internal/sql/ast/sub_link.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type SubLinkType uint const ( EXISTS_SUBLINK SubLinkType = iota ALL_SUBLINK ANY_SUBLINK ROWCOMPARE_SUBLINK EXPR_SUBLINK MULTIEXPR_SUBLINK ARRAY_SUBLINK CTE_SUBLINK /* for SubPlans only */ ) type SubLink struct { Xpr Node SubLinkType SubLinkType SubLinkId int Testexpr Node OperName *List Subselect Node Location int } func (n *SubLink) Pos() int { return n.Location } func (n *SubLink) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } // Format the test expression if present (for IN subqueries etc.) hasTestExpr := n.Testexpr != nil if hasTestExpr { buf.astFormat(n.Testexpr, d) } switch n.SubLinkType { case EXISTS_SUBLINK: buf.WriteString("EXISTS (") case ANY_SUBLINK: if hasTestExpr { buf.WriteString(" IN (") } else { buf.WriteString("IN (") } default: if hasTestExpr { buf.WriteString(" (") } else { buf.WriteString("(") } } buf.astFormat(n.Subselect, d) buf.WriteString(")") } ================================================ FILE: internal/sql/ast/sub_plan.go ================================================ package ast type SubPlan struct { Xpr Node SubLinkType SubLinkType Testexpr Node ParamIds *List PlanId int PlanName *string FirstColType Oid FirstColTypmod int32 FirstColCollation Oid UseHashTable bool UnknownEqFalse bool ParallelSafe bool SetParam *List ParParam *List Args *List StartupCost Cost PerCallCost Cost } func (n *SubPlan) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/table_func.go ================================================ package ast type TableFunc struct { NsUris *List NsNames *List Docexpr Node Rowexpr Node Colnames *List Coltypes *List Coltypmods *List Colcollations *List Colexprs *List Coldefexprs *List Notnulls []uint32 Ordinalitycol int Location int } func (n *TableFunc) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/table_like_clause.go ================================================ package ast type TableLikeClause struct { Relation *RangeVar Options uint32 } func (n *TableLikeClause) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/table_like_option.go ================================================ package ast type TableLikeOption uint func (n *TableLikeOption) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/table_name.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type TableName struct { Catalog string Schema string Name string } func (n *TableName) Pos() int { return 0 } func (n *TableName) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.Schema != "" { buf.WriteString(n.Schema) buf.WriteString(".") } if n.Name != "" { buf.WriteString(n.Name) } } ================================================ FILE: internal/sql/ast/table_sample_clause.go ================================================ package ast type TableSampleClause struct { Tsmhandler Oid Args *List Repeatable Node } func (n *TableSampleClause) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/target_entry.go ================================================ package ast type TargetEntry struct { Xpr Node Expr Node Resno AttrNumber Resname *string Ressortgroupref Index Resorigtbl Oid Resorigcol AttrNumber Resjunk bool } func (n *TargetEntry) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/todo.go ================================================ package ast type TODO struct { } func (n *TODO) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/transaction_stmt.go ================================================ package ast type TransactionStmt struct { Kind TransactionStmtKind Options *List Gid *string } func (n *TransactionStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/transaction_stmt_kind.go ================================================ package ast type TransactionStmtKind uint func (n *TransactionStmtKind) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/trigger_transition.go ================================================ package ast type TriggerTransition struct { Name *string IsNew bool IsTable bool } func (n *TriggerTransition) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/truncate_stmt.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type TruncateStmt struct { Relations *List RestartSeqs bool Behavior DropBehavior } func (n *TruncateStmt) Pos() int { return 0 } func (n *TruncateStmt) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("TRUNCATE ") buf.astFormat(n.Relations, d) } ================================================ FILE: internal/sql/ast/type_cast.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type TypeCast struct { Arg Node TypeName *TypeName Location int } func (n *TypeCast) Pos() int { return n.Location } func (n *TypeCast) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } // Format the arg and type to strings first argBuf := NewTrackedBuffer() argBuf.astFormat(n.Arg, d) typeBuf := NewTrackedBuffer() typeBuf.astFormat(n.TypeName, d) buf.WriteString(d.Cast(argBuf.String(), typeBuf.String())) } ================================================ FILE: internal/sql/ast/type_name.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type TypeName struct { Catalog string Schema string Name string // From pg.TypeName Names *List TypeOid Oid Setof bool PctType bool Typmods *List Typemod int32 ArrayBounds *List Location int } func (n *TypeName) Pos() int { return n.Location } func (n *TypeName) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if items(n.Names) { // Check if this is a qualified type (e.g., pg_catalog.int4) if len(n.Names.Items) == 2 { first, _ := n.Names.Items[0].(*String) second, _ := n.Names.Items[1].(*String) if first != nil && second != nil { buf.WriteString(d.TypeName(first.Str, second.Str)) goto addMods } } // For single name types, just output as-is if len(n.Names.Items) == 1 { if s, ok := n.Names.Items[0].(*String); ok { buf.WriteString(d.TypeName("", s.Str)) goto addMods } } buf.join(n.Names, d, ".") } else { buf.WriteString(d.TypeName(n.Schema, n.Name)) } addMods: // Add type modifiers (e.g., varchar(255)) if items(n.Typmods) { buf.WriteString("(") buf.join(n.Typmods, d, ", ") buf.WriteString(")") } if items(n.ArrayBounds) { buf.WriteString("[]") } } ================================================ FILE: internal/sql/ast/typedefs.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type AclMode uint32 func (n *AclMode) Pos() int { return 0 } type DistinctExpr OpExpr func (n *DistinctExpr) Pos() int { return 0 } type NullIfExpr OpExpr func (n *NullIfExpr) Pos() int { return 0 } func (n *NullIfExpr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("NULLIF(") buf.join(n.Args, d, ", ") buf.WriteString(")") } type Selectivity float64 func (n *Selectivity) Pos() int { return 0 } type Cost float64 func (n *Cost) Pos() int { return 0 } type ParamListInfo ParamListInfoData func (n *ParamListInfo) Pos() int { return 0 } type AttrNumber int16 func (n *AttrNumber) Pos() int { return 0 } type Pointer byte func (n *Pointer) Pos() int { return 0 } type Index uint64 func (n *Index) Pos() int { return 0 } type Offset int64 func (n *Offset) Pos() int { return 0 } type regproc Oid func (n *regproc) Pos() int { return 0 } type RegProcedure regproc func (n *RegProcedure) Pos() int { return 0 } type TransactionId uint32 func (n *TransactionId) Pos() int { return 0 } type LocalTransactionId uint32 func (n *LocalTransactionId) Pos() int { return 0 } type SubTransactionId uint32 func (n *SubTransactionId) Pos() int { return 0 } type MultiXactId TransactionId func (n *MultiXactId) Pos() int { return 0 } type MultiXactOffset uint32 func (n *MultiXactOffset) Pos() int { return 0 } type CommandId uint32 func (n *CommandId) Pos() int { return 0 } type Datum uintptr func (n *Datum) Pos() int { return 0 } type DatumPtr Datum func (n *DatumPtr) Pos() int { return 0 } type Oid uint64 func (n *Oid) Pos() int { return 0 } type BlockNumber uint32 func (n *BlockNumber) Pos() int { return 0 } type BlockId BlockIdData func (n *BlockId) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/unlisten_stmt.go ================================================ package ast type UnlistenStmt struct { Conditionname *string } func (n *UnlistenStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/update_stmt.go ================================================ package ast import ( "strings" "github.com/sqlc-dev/sqlc/internal/sql/format" ) type UpdateStmt struct { Relations *List TargetList *List WhereClause Node FromClause *List LimitCount Node ReturningList *List WithClause *WithClause } func (n *UpdateStmt) Pos() int { return 0 } func (n *UpdateStmt) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } if n.WithClause != nil { buf.astFormat(n.WithClause, d) buf.WriteString(" ") } buf.WriteString("UPDATE ") if items(n.Relations) { buf.astFormat(n.Relations, d) } if items(n.TargetList) { buf.WriteString(" SET ") multi := false for _, item := range n.TargetList.Items { switch nn := item.(type) { case *ResTarget: if _, ok := nn.Val.(*MultiAssignRef); ok { multi = true } } } if multi { names := []string{} vals := &List{} for _, item := range n.TargetList.Items { res, ok := item.(*ResTarget) if !ok { continue } if res.Name != nil { names = append(names, *res.Name) } multi, ok := res.Val.(*MultiAssignRef) if !ok { vals.Items = append(vals.Items, res.Val) continue } row, ok := multi.Source.(*RowExpr) if !ok { vals.Items = append(vals.Items, res.Val) continue } vals.Items = append(vals.Items, row.Args.Items[multi.Colno-1]) } buf.WriteString("(") buf.WriteString(strings.Join(names, ",")) buf.WriteString(") = (") buf.join(vals, d, ",") buf.WriteString(")") } else { for i, item := range n.TargetList.Items { if i > 0 { buf.WriteString(", ") } switch nn := item.(type) { case *ResTarget: if nn.Name != nil { buf.WriteString(d.QuoteIdent(*nn.Name)) } // Handle array subscript indirection (e.g., names[$1]) if items(nn.Indirection) { for _, ind := range nn.Indirection.Items { buf.astFormat(ind, d) } } buf.WriteString(" = ") buf.astFormat(nn.Val, d) default: buf.astFormat(item, d) } } } } if items(n.FromClause) { buf.WriteString(" FROM ") buf.astFormat(n.FromClause, d) } if set(n.WhereClause) { buf.WriteString(" WHERE ") buf.astFormat(n.WhereClause, d) } if set(n.LimitCount) { buf.WriteString(" LIMIT ") buf.astFormat(n.LimitCount, d) } if items(n.ReturningList) { buf.WriteString(" RETURNING ") buf.astFormat(n.ReturningList, d) } } ================================================ FILE: internal/sql/ast/vacuum_option.go ================================================ package ast type VacuumOption uint func (n *VacuumOption) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/vacuum_stmt.go ================================================ package ast type VacuumStmt struct { Options int Relation *RangeVar VaCols *List } func (n *VacuumStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/var.go ================================================ package ast type Var struct { Xpr Node Varno Index Varattno AttrNumber Vartype Oid Vartypmod int32 Varcollid Oid Varlevelsup Index Varnoold Index Varoattno AttrNumber Location int } func (n *Var) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/variable_expr.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" // VariableExpr represents a MySQL user variable (e.g., @user_id) // This is distinct from sqlc's @param named parameter syntax. type VariableExpr struct { Name string Location int } func (n *VariableExpr) Pos() int { return n.Location } func (n *VariableExpr) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("@") buf.WriteString(n.Name) } ================================================ FILE: internal/sql/ast/variable_set_kind.go ================================================ package ast type VariableSetKind uint func (n *VariableSetKind) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/variable_set_stmt.go ================================================ package ast type VariableSetStmt struct { Kind VariableSetKind Name *string Args *List IsLocal bool } func (n *VariableSetStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/variable_show_stmt.go ================================================ package ast type VariableShowStmt struct { Name *string } func (n *VariableShowStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/view_check_option.go ================================================ package ast type ViewCheckOption uint func (n *ViewCheckOption) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/view_stmt.go ================================================ package ast type ViewStmt struct { View *RangeVar Aliases *List Query Node Replace bool Options *List WithCheckOption ViewCheckOption } func (n *ViewStmt) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/wco_kind.go ================================================ package ast type WCOKind uint func (n *WCOKind) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/window_clause.go ================================================ package ast type WindowClause struct { Name *string Refname *string PartitionClause *List OrderClause *List FrameOptions int StartOffset Node EndOffset Node Winref Index CopiedOrder bool } func (n *WindowClause) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/window_def.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type WindowDef struct { Name *string Refname *string PartitionClause *List OrderClause *List FrameOptions int StartOffset Node EndOffset Node Location int } func (n *WindowDef) Pos() int { return n.Location } // Frame option constants (from PostgreSQL's parsenodes.h) const ( FrameOptionNonDefault = 0x00001 FrameOptionRange = 0x00002 FrameOptionRows = 0x00004 FrameOptionGroups = 0x00008 FrameOptionBetween = 0x00010 FrameOptionStartUnboundedPreceding = 0x00020 FrameOptionEndUnboundedPreceding = 0x00040 FrameOptionStartUnboundedFollowing = 0x00080 FrameOptionEndUnboundedFollowing = 0x00100 FrameOptionStartCurrentRow = 0x00200 FrameOptionEndCurrentRow = 0x00400 FrameOptionStartOffset = 0x00800 FrameOptionEndOffset = 0x01000 FrameOptionExcludeCurrentRow = 0x02000 FrameOptionExcludeGroup = 0x04000 FrameOptionExcludeTies = 0x08000 ) func (n *WindowDef) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } // Named window reference if n.Refname != nil && *n.Refname != "" { buf.WriteString(*n.Refname) return } buf.WriteString("(") needSpace := false if items(n.PartitionClause) { buf.WriteString("PARTITION BY ") buf.join(n.PartitionClause, d, ", ") needSpace = true } if items(n.OrderClause) { if needSpace { buf.WriteString(" ") } buf.WriteString("ORDER BY ") buf.join(n.OrderClause, d, ", ") needSpace = true } // Frame clause if n.FrameOptions&FrameOptionNonDefault != 0 { if needSpace { buf.WriteString(" ") } // Frame type if n.FrameOptions&FrameOptionRows != 0 { buf.WriteString("ROWS ") } else if n.FrameOptions&FrameOptionRange != 0 { buf.WriteString("RANGE ") } else if n.FrameOptions&FrameOptionGroups != 0 { buf.WriteString("GROUPS ") } if n.FrameOptions&FrameOptionBetween != 0 { buf.WriteString("BETWEEN ") } // Start bound if n.FrameOptions&FrameOptionStartUnboundedPreceding != 0 { buf.WriteString("UNBOUNDED PRECEDING") } else if n.FrameOptions&FrameOptionStartCurrentRow != 0 { buf.WriteString("CURRENT ROW") } else if n.FrameOptions&FrameOptionStartOffset != 0 { buf.astFormat(n.StartOffset, d) buf.WriteString(" PRECEDING") } if n.FrameOptions&FrameOptionBetween != 0 { buf.WriteString(" AND ") // End bound if n.FrameOptions&FrameOptionEndUnboundedFollowing != 0 { buf.WriteString("UNBOUNDED FOLLOWING") } else if n.FrameOptions&FrameOptionEndCurrentRow != 0 { buf.WriteString("CURRENT ROW") } else if n.FrameOptions&FrameOptionEndOffset != 0 { buf.astFormat(n.EndOffset, d) buf.WriteString(" FOLLOWING") } } } buf.WriteString(")") } ================================================ FILE: internal/sql/ast/window_func.go ================================================ package ast type WindowFunc struct { Xpr Node Winfnoid Oid Wintype Oid Wincollid Oid Inputcollid Oid Args *List Aggfilter Node Winref Index Winstar bool Winagg bool Location int } func (n *WindowFunc) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/with_check_option.go ================================================ package ast type WithCheckOption struct { Kind WCOKind Relname *string Polname *string Qual Node Cascaded bool } func (n *WithCheckOption) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/with_clause.go ================================================ package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type WithClause struct { Ctes *List Recursive bool Location int } func (n *WithClause) Pos() int { return n.Location } func (n *WithClause) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("WITH ") if n.Recursive { buf.WriteString("RECURSIVE ") } buf.join(n.Ctes, d, ", ") } ================================================ FILE: internal/sql/ast/xml_expr.go ================================================ package ast type XmlExpr struct { Xpr Node Op XmlExprOp Name *string NamedArgs *List ArgNames *List Args *List Xmloption XmlOptionType Type Oid Typmod int32 Location int } func (n *XmlExpr) Pos() int { return n.Location } ================================================ FILE: internal/sql/ast/xml_expr_op.go ================================================ package ast type XmlExprOp uint func (n *XmlExprOp) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/xml_option_type.go ================================================ package ast type XmlOptionType uint func (n *XmlOptionType) Pos() int { return 0 } ================================================ FILE: internal/sql/ast/xml_serialize.go ================================================ package ast type XmlSerialize struct { Xmloption XmlOptionType Expr Node TypeName *TypeName Location int } func (n *XmlSerialize) Pos() int { return n.Location } ================================================ FILE: internal/sql/astutils/CLAUDE.md ================================================ # AST Utilities Package - Claude Code Guide This package provides utilities for traversing and transforming AST nodes. ## Key Functions ### Walk `Walk(f Visitor, node ast.Node)` traverses the AST depth-first, calling `f.Visit()` on each node. ```go type Visitor interface { Visit(node ast.Node) Visitor } ``` **Important**: When adding new AST node types, you MUST add a case to the switch statement in `walk.go`, otherwise you'll get a panic: ``` panic: walk: unexpected node type *ast.YourNewType ``` ### Apply (Rewrite) `Apply(root ast.Node, pre, post ApplyFunc) ast.Node` traverses and optionally transforms the AST. ```go type ApplyFunc func(*Cursor) bool ``` The `Cursor` provides: - `Node()` - current node - `Parent()` - parent node - `Name()` - field name in parent - `Index()` - index if in a list - `Replace(node)` - replace current node **Important**: When adding new AST node types, you MUST add a case to the switch statement in `rewrite.go`, otherwise you'll get a panic: ``` panic: Apply: unexpected node type *ast.YourNewType ``` ### Search `Search(root ast.Node, fn func(ast.Node) bool) *ast.List` finds all nodes matching a predicate. ### Join `Join(list *ast.List, sep string) string` joins string nodes with a separator. ## Adding Support for New AST Nodes When you create a new AST node type, you must update BOTH `walk.go` and `rewrite.go`: ### In walk.go Add a case that walks all child nodes: ```go case *ast.YourNewType: if n.ChildField != nil { Walk(f, n.ChildField) } if n.ChildList != nil { Walk(f, n.ChildList) } ``` For leaf nodes with no children: ```go case *ast.YourNewType: // Leaf node - no children to traverse ``` ### In rewrite.go Add a case that applies to all child nodes: ```go case *ast.YourNewType: a.apply(n, "ChildField", nil, n.ChildField) a.apply(n, "ChildList", nil, n.ChildList) ``` For leaf nodes: ```go case *ast.YourNewType: // Leaf node - no children to traverse ``` ## Common Patterns ### Finding All Tables in a Statement ```go var tv tableVisitor astutils.Walk(&tv, stmt.FromClause) // tv.list now contains all RangeVar nodes ``` ### Replacing Named Parameters The `rewrite/parameters.go` uses Apply to replace `sqlc.arg()` calls with `ParamRef`: ```go astutils.Apply(root, func(cr *astutils.Cursor) bool { if named.IsParamFunc(cr.Node()) { cr.Replace(&ast.ParamRef{Number: nextParam()}) } return true }, nil) ``` ## Node Types That Must Be Handled All node types in `internal/sql/ast/` must have cases in both walk.go and rewrite.go. Key MySQL-specific nodes: - `IntervalExpr` - INTERVAL expressions - `OnDuplicateKeyUpdate` - MySQL ON DUPLICATE KEY UPDATE - `ParenExpr` - Parenthesized expressions - `VariableExpr` - MySQL user variables (@var) ## Debugging Tips If you see a panic like: ``` panic: walk: unexpected node type *ast.SomeType ``` Check that `SomeType` has a case in both `walk.go` and `rewrite.go`. ================================================ FILE: internal/sql/astutils/join.go ================================================ package astutils import ( "strings" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) func Join(list *ast.List, sep string) string { if list == nil { return "" } var items []string for _, item := range list.Items { if n, ok := item.(*ast.String); ok { items = append(items, n.Str) } } return strings.Join(items, sep) } ================================================ FILE: internal/sql/astutils/rewrite.go ================================================ // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package astutils import ( "fmt" "reflect" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) // An ApplyFunc is invoked by Apply for each node n, even if n is nil, // before and/or after the node's children, using a Cursor describing // the current node and providing operations on it. // // The return value of ApplyFunc controls the syntax tree traversal. // See Apply for details. type ApplyFunc func(*Cursor) bool // Apply traverses a syntax tree recursively, starting with root, // and calling pre and post for each node as described below. // Apply returns the syntax tree, possibly modified. // // If pre is not nil, it is called for each node before the node's // children are traversed (pre-order). If pre returns false, no // children are traversed, and post is not called for that node. // // If post is not nil, and a prior call of pre didn't return false, // post is called for each node after its children are traversed // (post-order). If post returns false, traversal is terminated and // Apply returns immediately. // // Only fields that refer to AST nodes are considered children; // i.e., token.Pos, Scopes, Objects, and fields of basic types // (strings, etc.) are ignored. // // Children are traversed in the order in which they appear in the // respective node's struct definition. A package's files are // traversed in the filenames' alphabetical order. func Apply(root ast.Node, pre, post ApplyFunc) (result ast.Node) { parent := &struct{ ast.Node }{root} defer func() { if r := recover(); r != nil && r != abort { panic(r) } result = parent.Node }() a := &application{pre: pre, post: post} a.apply(parent, "Node", nil, root) return } var abort = new(int) // singleton, to signal termination of Apply // A Cursor describes a node encountered during Apply. // Information about the node and its parent is available // from the Node, Parent, Name, and Index methods. // // If p is a variable of type and value of the current parent node // c.Parent(), and f is the field identifier with name c.Name(), // the following invariants hold: // // p.f == c.Node() if c.Index() < 0 // p.f[c.Index()] == c.Node() if c.Index() >= 0 // // The methods Replace, Delete, InsertBefore, and InsertAfter // can be used to change the AST without disrupting Apply. type Cursor struct { parent ast.Node name string iter *iterator // valid if non-nil node ast.Node } // Node returns the current Node. func (c *Cursor) Node() ast.Node { return c.node } // Parent returns the parent of the current Node. func (c *Cursor) Parent() ast.Node { return c.parent } // Name returns the name of the parent Node field that contains the current Node. // If the parent is a *ast.Package and the current Node is a *ast.File, Name returns // the filename for the current Node. func (c *Cursor) Name() string { return c.name } // Index reports the index >= 0 of the current Node in the slice of Nodes that // contains it, or a value < 0 if the current Node is not part of a slice. // The index of the current node changes if InsertBefore is called while // processing the current node. func (c *Cursor) Index() int { if c.iter != nil { return c.iter.index } return -1 } // field returns the current node's parent field value. func (c *Cursor) field() reflect.Value { return reflect.Indirect(reflect.ValueOf(c.parent)).FieldByName(c.name) } // Replace replaces the current Node with n. // The replacement node is not walked by Apply. func (c *Cursor) Replace(n ast.Node) { v := c.field() if i := c.Index(); i >= 0 { v = v.Index(i) } v.Set(reflect.ValueOf(n)) } // D// application carries all the shared data so we can pass it around cheaply. type application struct { pre, post ApplyFunc cursor Cursor iter iterator } func (a *application) apply(parent ast.Node, name string, iter *iterator, n ast.Node) { // convert typed nil into untyped nil if v := reflect.ValueOf(n); v.Kind() == reflect.Ptr && v.IsNil() { n = nil } // avoid heap-allocating a new cursor for each apply call; reuse a.cursor instead saved := a.cursor a.cursor.parent = parent a.cursor.name = name a.cursor.iter = iter a.cursor.node = n if a.pre != nil && !a.pre(&a.cursor) { a.cursor = saved return } // walk children // (the order of the cases matches the order of the corresponding node types in go/ast) switch n := n.(type) { case nil: // nothing to do case *ast.AlterTableSetSchemaStmt: a.apply(n, "Table", nil, n.Table) case *ast.AlterTypeAddValueStmt: a.apply(n, "Type", nil, n.Type) case *ast.AlterTypeRenameValueStmt: a.apply(n, "Type", nil, n.Type) case *ast.CommentOnColumnStmt: a.apply(n, "Table", nil, n.Table) a.apply(n, "Col", nil, n.Col) case *ast.CommentOnSchemaStmt: a.apply(n, "Schema", nil, n.Schema) case *ast.CommentOnTableStmt: a.apply(n, "Table", nil, n.Table) case *ast.CommentOnTypeStmt: a.apply(n, "Type", nil, n.Type) case *ast.CommentOnViewStmt: a.apply(n, "View", nil, n.View) case *ast.CreateTableStmt: a.apply(n, "Name", nil, n.Name) case *ast.DropFunctionStmt: // pass case *ast.DropSchemaStmt: // pass case *ast.DropTableStmt: // pass case *ast.DropTypeStmt: // pass case *ast.FuncName: // pass case *ast.FuncParam: a.apply(n, "Type", nil, n.Type) a.apply(n, "DefExpr", nil, n.DefExpr) case *ast.FuncSpec: a.apply(n, "Name", nil, n.Name) case *ast.In: a.applyList(n, "List") a.apply(n, "Sel", nil, n.Sel) case *ast.List: // Since item is a slice a.applyList(n, "Items") case *ast.RawStmt: a.apply(n, "Stmt", nil, n.Stmt) case *ast.RenameColumnStmt: a.apply(n, "Table", nil, n.Table) a.apply(n, "Col", nil, n.Col) case *ast.RenameTableStmt: a.apply(n, "Table", nil, n.Table) case *ast.RenameTypeStmt: a.apply(n, "Type", nil, n.Type) case *ast.Statement: a.apply(n, "Raw", nil, n.Raw) case *ast.String: // pass case *ast.TODO: // pass case *ast.TableName: // pass case *ast.A_ArrayExpr: a.apply(n, "Elements", nil, n.Elements) case *ast.A_Const: a.apply(n, "Val", nil, n.Val) case *ast.A_Expr: a.apply(n, "Name", nil, n.Name) a.apply(n, "Lexpr", nil, n.Lexpr) a.apply(n, "Rexpr", nil, n.Rexpr) case *ast.A_Indices: a.apply(n, "Lidx", nil, n.Lidx) a.apply(n, "Uidx", nil, n.Uidx) case *ast.A_Indirection: a.apply(n, "Arg", nil, n.Arg) a.apply(n, "Indirection", nil, n.Indirection) case *ast.A_Star: // pass case *ast.AccessPriv: a.apply(n, "Cols", nil, n.Cols) case *ast.Aggref: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Aggargtypes", nil, n.Aggargtypes) a.apply(n, "Aggdirectargs", nil, n.Aggdirectargs) a.apply(n, "Args", nil, n.Args) a.apply(n, "Aggorder", nil, n.Aggorder) a.apply(n, "Aggdistinct", nil, n.Aggdistinct) a.apply(n, "Aggfilter", nil, n.Aggfilter) case *ast.Alias: a.apply(n, "Colnames", nil, n.Colnames) case *ast.AlterCollationStmt: a.apply(n, "Collname", nil, n.Collname) case *ast.AlterDatabaseSetStmt: a.apply(n, "Setstmt", nil, n.Setstmt) case *ast.AlterDatabaseStmt: a.apply(n, "Options", nil, n.Options) case *ast.AlterDefaultPrivilegesStmt: a.apply(n, "Options", nil, n.Options) a.apply(n, "Action", nil, n.Action) case *ast.AlterDomainStmt: a.apply(n, "TypeName", nil, n.TypeName) a.apply(n, "Def", nil, n.Def) case *ast.AlterEnumStmt: a.apply(n, "TypeName", nil, n.TypeName) case *ast.AlterEventTrigStmt: // pass case *ast.AlterExtensionContentsStmt: a.apply(n, "Object", nil, n.Object) case *ast.AlterExtensionStmt: a.apply(n, "Options", nil, n.Options) case *ast.AlterFdwStmt: a.apply(n, "FuncOptions", nil, n.FuncOptions) a.apply(n, "Options", nil, n.Options) case *ast.AlterForeignServerStmt: a.apply(n, "Options", nil, n.Options) case *ast.AlterFunctionStmt: a.apply(n, "Func", nil, n.Func) a.apply(n, "Actions", nil, n.Actions) case *ast.AlterObjectDependsStmt: a.apply(n, "Relation", nil, n.Relation) a.apply(n, "Object", nil, n.Object) a.apply(n, "Extname", nil, n.Extname) case *ast.AlterObjectSchemaStmt: a.apply(n, "Relation", nil, n.Relation) a.apply(n, "Object", nil, n.Object) case *ast.AlterOpFamilyStmt: a.apply(n, "Opfamilyname", nil, n.Opfamilyname) a.apply(n, "Items", nil, n.Items) case *ast.AlterOperatorStmt: a.apply(n, "Opername", nil, n.Opername) a.apply(n, "Options", nil, n.Options) case *ast.AlterOwnerStmt: a.apply(n, "Relation", nil, n.Relation) a.apply(n, "Object", nil, n.Object) a.apply(n, "Newowner", nil, n.Newowner) case *ast.AlterPolicyStmt: a.apply(n, "Table", nil, n.Table) a.apply(n, "Roles", nil, n.Roles) a.apply(n, "Qual", nil, n.Qual) a.apply(n, "WithCheck", nil, n.WithCheck) case *ast.AlterPublicationStmt: a.apply(n, "Options", nil, n.Options) a.apply(n, "Tables", nil, n.Tables) case *ast.AlterRoleSetStmt: a.apply(n, "Role", nil, n.Role) a.apply(n, "Setstmt", nil, n.Setstmt) case *ast.AlterRoleStmt: a.apply(n, "Role", nil, n.Role) a.apply(n, "Options", nil, n.Options) case *ast.AlterSeqStmt: a.apply(n, "Sequence", nil, n.Sequence) a.apply(n, "Options", nil, n.Options) case *ast.AlterSubscriptionStmt: a.apply(n, "Publication", nil, n.Publication) a.apply(n, "Options", nil, n.Options) case *ast.AlterSystemStmt: a.apply(n, "Setstmt", nil, n.Setstmt) case *ast.AlterTSConfigurationStmt: a.apply(n, "Cfgname", nil, n.Cfgname) a.apply(n, "Tokentype", nil, n.Tokentype) a.apply(n, "Dicts", nil, n.Dicts) case *ast.AlterTSDictionaryStmt: a.apply(n, "Dictname", nil, n.Dictname) a.apply(n, "Options", nil, n.Options) case *ast.AlterTableCmd: a.apply(n, "Newowner", nil, n.Newowner) a.apply(n, "Def", nil, n.Def) case *ast.AlterTableMoveAllStmt: a.apply(n, "Roles", nil, n.Roles) case *ast.AlterTableSpaceOptionsStmt: a.apply(n, "Options", nil, n.Options) case *ast.AlterTableStmt: a.apply(n, "Relation", nil, n.Relation) a.apply(n, "Table", nil, n.Table) a.apply(n, "Cmds", nil, n.Cmds) case *ast.AlterUserMappingStmt: a.apply(n, "User", nil, n.User) a.apply(n, "Options", nil, n.Options) case *ast.AlternativeSubPlan: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Subplans", nil, n.Subplans) case *ast.ArrayCoerceExpr: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Arg", nil, n.Arg) case *ast.ArrayExpr: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Elements", nil, n.Elements) case *ast.ArrayRef: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Refupperindexpr", nil, n.Refupperindexpr) a.apply(n, "Reflowerindexpr", nil, n.Reflowerindexpr) a.apply(n, "Refexpr", nil, n.Refexpr) a.apply(n, "Refassgnexpr", nil, n.Refassgnexpr) case *ast.BetweenExpr: a.apply(n, "Expr", nil, n.Expr) a.apply(n, "Left", nil, n.Left) a.apply(n, "Right", nil, n.Right) case *ast.BitString: // pass case *ast.BlockIdData: // pass case *ast.Boolean: // pass case *ast.BoolExpr: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Args", nil, n.Args) case *ast.BooleanTest: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Arg", nil, n.Arg) case *ast.CallStmt: a.apply(n, "FuncCall", nil, n.FuncCall) case *ast.CaseExpr: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Arg", nil, n.Arg) a.apply(n, "Args", nil, n.Args) a.apply(n, "Defresult", nil, n.Defresult) case *ast.CaseTestExpr: a.apply(n, "Xpr", nil, n.Xpr) case *ast.CaseWhen: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Expr", nil, n.Expr) a.apply(n, "Result", nil, n.Result) case *ast.CheckPointStmt: // pass case *ast.ClosePortalStmt: // pass case *ast.ClusterStmt: a.apply(n, "Relation", nil, n.Relation) case *ast.CoalesceExpr: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Args", nil, n.Args) case *ast.CoerceToDomain: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Arg", nil, n.Arg) case *ast.CoerceToDomainValue: a.apply(n, "Xpr", nil, n.Xpr) case *ast.CoerceViaIO: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Arg", nil, n.Arg) case *ast.CollateClause: a.apply(n, "Arg", nil, n.Arg) a.apply(n, "Collname", nil, n.Collname) case *ast.CollateExpr: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Arg", nil, n.Arg) case *ast.ColumnDef: a.apply(n, "TypeName", nil, n.TypeName) a.apply(n, "RawDefault", nil, n.RawDefault) a.apply(n, "CookedDefault", nil, n.CookedDefault) a.apply(n, "CollClause", nil, n.CollClause) a.apply(n, "Constraints", nil, n.Constraints) a.apply(n, "Fdwoptions", nil, n.Fdwoptions) case *ast.ColumnRef: a.apply(n, "Fields", nil, n.Fields) case *ast.CommentStmt: a.apply(n, "Object", nil, n.Object) case *ast.CommonTableExpr: a.apply(n, "Aliascolnames", nil, n.Aliascolnames) a.apply(n, "Ctequery", nil, n.Ctequery) a.apply(n, "Ctecolnames", nil, n.Ctecolnames) a.apply(n, "Ctecoltypes", nil, n.Ctecoltypes) a.apply(n, "Ctecoltypmods", nil, n.Ctecoltypmods) a.apply(n, "Ctecolcollations", nil, n.Ctecolcollations) case *ast.CompositeTypeStmt: a.apply(n, "TypeName", nil, n.TypeName) case *ast.Const: a.apply(n, "Xpr", nil, n.Xpr) case *ast.Constraint: a.apply(n, "RawExpr", nil, n.RawExpr) a.apply(n, "Keys", nil, n.Keys) a.apply(n, "Exclusions", nil, n.Exclusions) a.apply(n, "Options", nil, n.Options) a.apply(n, "WhereClause", nil, n.WhereClause) a.apply(n, "Pktable", nil, n.Pktable) a.apply(n, "FkAttrs", nil, n.FkAttrs) a.apply(n, "PkAttrs", nil, n.PkAttrs) a.apply(n, "OldConpfeqop", nil, n.OldConpfeqop) case *ast.ConstraintsSetStmt: a.apply(n, "Constraints", nil, n.Constraints) case *ast.ConvertRowtypeExpr: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Arg", nil, n.Arg) case *ast.CopyStmt: a.apply(n, "Relation", nil, n.Relation) a.apply(n, "Query", nil, n.Query) a.apply(n, "Attlist", nil, n.Attlist) a.apply(n, "Options", nil, n.Options) case *ast.CreateAmStmt: a.apply(n, "HandlerName", nil, n.HandlerName) case *ast.CreateCastStmt: a.apply(n, "Sourcetype", nil, n.Sourcetype) a.apply(n, "Targettype", nil, n.Targettype) a.apply(n, "Func", nil, n.Func) case *ast.CreateConversionStmt: a.apply(n, "ConversionName", nil, n.ConversionName) a.apply(n, "FuncName", nil, n.FuncName) case *ast.CreateDomainStmt: a.apply(n, "Domainname", nil, n.Domainname) a.apply(n, "TypeName", nil, n.TypeName) a.apply(n, "CollClause", nil, n.CollClause) a.apply(n, "Constraints", nil, n.Constraints) case *ast.CreateEnumStmt: a.apply(n, "TypeName", nil, n.TypeName) a.apply(n, "Vals", nil, n.Vals) case *ast.CreateEventTrigStmt: a.apply(n, "Whenclause", nil, n.Whenclause) a.apply(n, "Funcname", nil, n.Funcname) case *ast.CreateExtensionStmt: a.apply(n, "Options", nil, n.Options) case *ast.CreateFdwStmt: a.apply(n, "FuncOptions", nil, n.FuncOptions) a.apply(n, "Options", nil, n.Options) case *ast.CreateForeignServerStmt: a.apply(n, "Options", nil, n.Options) case *ast.CreateForeignTableStmt: a.apply(n, "Base", nil, n.Base) a.apply(n, "Options", nil, n.Options) case *ast.CreateFunctionStmt: a.apply(n, "Func", nil, n.Func) a.apply(n, "Params", nil, n.Params) a.apply(n, "ReturnType", nil, n.ReturnType) a.apply(n, "Options", nil, n.Options) a.apply(n, "WithClause", nil, n.WithClause) case *ast.CreateOpClassItem: a.apply(n, "Name", nil, n.Name) a.apply(n, "OrderFamily", nil, n.OrderFamily) a.apply(n, "ClassArgs", nil, n.ClassArgs) a.apply(n, "Storedtype", nil, n.Storedtype) case *ast.CreateOpClassStmt: a.apply(n, "Opclassname", nil, n.Opclassname) a.apply(n, "Opfamilyname", nil, n.Opfamilyname) a.apply(n, "Datatype", nil, n.Datatype) a.apply(n, "Items", nil, n.Items) case *ast.CreateOpFamilyStmt: a.apply(n, "Opfamilyname", nil, n.Opfamilyname) case *ast.CreatePLangStmt: a.apply(n, "Plhandler", nil, n.Plhandler) a.apply(n, "Plinline", nil, n.Plinline) a.apply(n, "Plvalidator", nil, n.Plvalidator) case *ast.CreatePolicyStmt: a.apply(n, "Table", nil, n.Table) a.apply(n, "Roles", nil, n.Roles) a.apply(n, "Qual", nil, n.Qual) a.apply(n, "WithCheck", nil, n.WithCheck) case *ast.CreatePublicationStmt: a.apply(n, "Options", nil, n.Options) a.apply(n, "Tables", nil, n.Tables) case *ast.CreateRangeStmt: a.apply(n, "TypeName", nil, n.TypeName) a.apply(n, "Params", nil, n.Params) case *ast.CreateRoleStmt: a.apply(n, "Options", nil, n.Options) case *ast.CreateSchemaStmt: a.apply(n, "Authrole", nil, n.Authrole) a.apply(n, "SchemaElts", nil, n.SchemaElts) case *ast.CreateSeqStmt: a.apply(n, "Sequence", nil, n.Sequence) a.apply(n, "Options", nil, n.Options) case *ast.CreateStatsStmt: a.apply(n, "Defnames", nil, n.Defnames) a.apply(n, "StatTypes", nil, n.StatTypes) a.apply(n, "Exprs", nil, n.Exprs) a.apply(n, "Relations", nil, n.Relations) case *ast.CreateStmt: a.apply(n, "Relation", nil, n.Relation) a.apply(n, "TableElts", nil, n.TableElts) a.apply(n, "InhRelations", nil, n.InhRelations) a.apply(n, "Partbound", nil, n.Partbound) a.apply(n, "Partspec", nil, n.Partspec) a.apply(n, "OfTypename", nil, n.OfTypename) a.apply(n, "Constraints", nil, n.Constraints) a.apply(n, "Options", nil, n.Options) case *ast.CreateSubscriptionStmt: a.apply(n, "Publication", nil, n.Publication) a.apply(n, "Options", nil, n.Options) case *ast.CreateTableAsStmt: a.apply(n, "Query", nil, n.Query) a.apply(n, "Into", nil, n.Into) case *ast.CreateTableSpaceStmt: a.apply(n, "Owner", nil, n.Owner) a.apply(n, "Options", nil, n.Options) case *ast.CreateTransformStmt: a.apply(n, "TypeName", nil, n.TypeName) a.apply(n, "Fromsql", nil, n.Fromsql) a.apply(n, "Tosql", nil, n.Tosql) case *ast.CreateTrigStmt: a.apply(n, "Relation", nil, n.Relation) a.apply(n, "Funcname", nil, n.Funcname) a.apply(n, "Args", nil, n.Args) a.apply(n, "Columns", nil, n.Columns) a.apply(n, "WhenClause", nil, n.WhenClause) a.apply(n, "TransitionRels", nil, n.TransitionRels) a.apply(n, "Constrrel", nil, n.Constrrel) case *ast.CreateUserMappingStmt: a.apply(n, "User", nil, n.User) a.apply(n, "Options", nil, n.Options) case *ast.CreatedbStmt: a.apply(n, "Options", nil, n.Options) case *ast.CurrentOfExpr: a.apply(n, "Xpr", nil, n.Xpr) case *ast.DeallocateStmt: // pass case *ast.DeclareCursorStmt: a.apply(n, "Query", nil, n.Query) case *ast.DefElem: a.apply(n, "Arg", nil, n.Arg) case *ast.DefineStmt: a.apply(n, "Defnames", nil, n.Defnames) a.apply(n, "Args", nil, n.Args) a.apply(n, "Definition", nil, n.Definition) case *ast.DeleteStmt: a.apply(n, "Relations", nil, n.Relations) a.apply(n, "UsingClause", nil, n.UsingClause) a.apply(n, "WhereClause", nil, n.WhereClause) a.apply(n, "ReturningList", nil, n.ReturningList) a.apply(n, "WithClause", nil, n.WithClause) a.apply(n, "Targets", nil, n.Targets) a.apply(n, "FromClause", nil, n.FromClause) case *ast.DiscardStmt: // pass case *ast.DoStmt: a.apply(n, "Args", nil, n.Args) case *ast.DropOwnedStmt: a.apply(n, "Roles", nil, n.Roles) case *ast.DropRoleStmt: a.apply(n, "Roles", nil, n.Roles) case *ast.DropStmt: a.apply(n, "Objects", nil, n.Objects) case *ast.DropSubscriptionStmt: // pass case *ast.DropTableSpaceStmt: // pass case *ast.DropUserMappingStmt: a.apply(n, "User", nil, n.User) case *ast.DropdbStmt: // pass case *ast.ExecuteStmt: a.apply(n, "Params", nil, n.Params) case *ast.ExplainStmt: a.apply(n, "Query", nil, n.Query) a.apply(n, "Options", nil, n.Options) case *ast.Expr: // pass case *ast.FetchStmt: // pass case *ast.FieldSelect: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Arg", nil, n.Arg) case *ast.FieldStore: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Arg", nil, n.Arg) a.apply(n, "Newvals", nil, n.Newvals) a.apply(n, "Fieldnums", nil, n.Fieldnums) case *ast.Float: // pass case *ast.FromExpr: a.apply(n, "Fromlist", nil, n.Fromlist) a.apply(n, "Quals", nil, n.Quals) case *ast.FuncCall: a.apply(n, "Func", nil, n.Func) a.apply(n, "Funcname", nil, n.Funcname) a.apply(n, "Args", nil, n.Args) a.apply(n, "AggOrder", nil, n.AggOrder) a.apply(n, "AggFilter", nil, n.AggFilter) a.apply(n, "Over", nil, n.Over) case *ast.FuncExpr: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Args", nil, n.Args) case *ast.FunctionParameter: a.apply(n, "ArgType", nil, n.ArgType) a.apply(n, "Defexpr", nil, n.Defexpr) case *ast.GrantRoleStmt: a.apply(n, "GrantedRoles", nil, n.GrantedRoles) a.apply(n, "GranteeRoles", nil, n.GranteeRoles) a.apply(n, "Grantor", nil, n.Grantor) case *ast.GrantStmt: a.apply(n, "Objects", nil, n.Objects) a.apply(n, "Privileges", nil, n.Privileges) a.apply(n, "Grantees", nil, n.Grantees) case *ast.GroupingFunc: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Args", nil, n.Args) a.apply(n, "Refs", nil, n.Refs) a.apply(n, "Cols", nil, n.Cols) case *ast.GroupingSet: a.apply(n, "Content", nil, n.Content) case *ast.ImportForeignSchemaStmt: a.apply(n, "TableList", nil, n.TableList) a.apply(n, "Options", nil, n.Options) case *ast.IndexElem: a.apply(n, "Expr", nil, n.Expr) a.apply(n, "Collation", nil, n.Collation) a.apply(n, "Opclass", nil, n.Opclass) case *ast.IndexStmt: a.apply(n, "Relation", nil, n.Relation) a.apply(n, "IndexParams", nil, n.IndexParams) a.apply(n, "Options", nil, n.Options) a.apply(n, "WhereClause", nil, n.WhereClause) a.apply(n, "ExcludeOpNames", nil, n.ExcludeOpNames) case *ast.InferClause: a.apply(n, "IndexElems", nil, n.IndexElems) a.apply(n, "WhereClause", nil, n.WhereClause) case *ast.InferenceElem: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Expr", nil, n.Expr) case *ast.InlineCodeBlock: // pass case *ast.InsertStmt: a.apply(n, "Relation", nil, n.Relation) a.apply(n, "Cols", nil, n.Cols) a.apply(n, "SelectStmt", nil, n.SelectStmt) a.apply(n, "OnConflictClause", nil, n.OnConflictClause) a.apply(n, "OnDuplicateKeyUpdate", nil, n.OnDuplicateKeyUpdate) a.apply(n, "ReturningList", nil, n.ReturningList) a.apply(n, "WithClause", nil, n.WithClause) case *ast.Integer: // pass case *ast.IntervalExpr: a.apply(n, "Value", nil, n.Value) case *ast.IntoClause: a.apply(n, "Rel", nil, n.Rel) a.apply(n, "ColNames", nil, n.ColNames) a.apply(n, "Options", nil, n.Options) a.apply(n, "ViewQuery", nil, n.ViewQuery) case *ast.JoinExpr: a.apply(n, "Larg", nil, n.Larg) a.apply(n, "Rarg", nil, n.Rarg) a.apply(n, "UsingClause", nil, n.UsingClause) a.apply(n, "Quals", nil, n.Quals) a.apply(n, "Alias", nil, n.Alias) case *ast.ListenStmt: // pass case *ast.LoadStmt: // pass case *ast.LockStmt: a.apply(n, "Relations", nil, n.Relations) case *ast.LockingClause: a.apply(n, "LockedRels", nil, n.LockedRels) case *ast.MinMaxExpr: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Args", nil, n.Args) case *ast.MultiAssignRef: a.apply(n, "Source", nil, n.Source) case *ast.NamedArgExpr: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Arg", nil, n.Arg) case *ast.NextValueExpr: a.apply(n, "Xpr", nil, n.Xpr) case *ast.NotifyStmt: // pass case *ast.Null: // pass case *ast.NullTest: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Arg", nil, n.Arg) case *ast.ObjectWithArgs: a.apply(n, "Objname", nil, n.Objname) a.apply(n, "Objargs", nil, n.Objargs) case *ast.OnConflictClause: a.apply(n, "Infer", nil, n.Infer) a.apply(n, "TargetList", nil, n.TargetList) a.apply(n, "WhereClause", nil, n.WhereClause) case *ast.OnConflictExpr: a.apply(n, "ArbiterElems", nil, n.ArbiterElems) a.apply(n, "ArbiterWhere", nil, n.ArbiterWhere) a.apply(n, "OnConflictSet", nil, n.OnConflictSet) a.apply(n, "OnConflictWhere", nil, n.OnConflictWhere) a.apply(n, "ExclRelTlist", nil, n.ExclRelTlist) case *ast.OnDuplicateKeyUpdate: a.apply(n, "TargetList", nil, n.TargetList) case *ast.OpExpr: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Args", nil, n.Args) case *ast.Param: a.apply(n, "Xpr", nil, n.Xpr) case *ast.ParamExecData: // pass case *ast.ParamExternData: // pass case *ast.ParamListInfoData: // pass case *ast.ParamRef: // pass case *ast.ParenExpr: a.apply(n, "Expr", nil, n.Expr) case *ast.VariableExpr: // Leaf node - no children to traverse case *ast.PartitionBoundSpec: a.apply(n, "Listdatums", nil, n.Listdatums) a.apply(n, "Lowerdatums", nil, n.Lowerdatums) a.apply(n, "Upperdatums", nil, n.Upperdatums) case *ast.PartitionCmd: a.apply(n, "Name", nil, n.Name) a.apply(n, "Bound", nil, n.Bound) case *ast.PartitionElem: a.apply(n, "Expr", nil, n.Expr) a.apply(n, "Collation", nil, n.Collation) a.apply(n, "Opclass", nil, n.Opclass) case *ast.PartitionRangeDatum: a.apply(n, "Value", nil, n.Value) case *ast.PartitionSpec: a.apply(n, "PartParams", nil, n.PartParams) case *ast.PrepareStmt: a.apply(n, "Argtypes", nil, n.Argtypes) a.apply(n, "Query", nil, n.Query) case *ast.Query: a.apply(n, "UtilityStmt", nil, n.UtilityStmt) a.apply(n, "CteList", nil, n.CteList) a.apply(n, "Rtable", nil, n.Rtable) a.apply(n, "Jointree", nil, n.Jointree) a.apply(n, "TargetList", nil, n.TargetList) a.apply(n, "OnConflict", nil, n.OnConflict) a.apply(n, "ReturningList", nil, n.ReturningList) a.apply(n, "GroupClause", nil, n.GroupClause) a.apply(n, "GroupingSets", nil, n.GroupingSets) a.apply(n, "HavingQual", nil, n.HavingQual) a.apply(n, "WindowClause", nil, n.WindowClause) a.apply(n, "DistinctClause", nil, n.DistinctClause) a.apply(n, "SortClause", nil, n.SortClause) a.apply(n, "LimitOffset", nil, n.LimitOffset) a.apply(n, "LimitCount", nil, n.LimitCount) a.apply(n, "RowMarks", nil, n.RowMarks) a.apply(n, "SetOperations", nil, n.SetOperations) a.apply(n, "ConstraintDeps", nil, n.ConstraintDeps) a.apply(n, "WithCheckOptions", nil, n.WithCheckOptions) case *ast.RangeFunction: a.apply(n, "Functions", nil, n.Functions) a.apply(n, "Alias", nil, n.Alias) a.apply(n, "Coldeflist", nil, n.Coldeflist) case *ast.RangeSubselect: a.apply(n, "Subquery", nil, n.Subquery) a.apply(n, "Alias", nil, n.Alias) case *ast.RangeTableFunc: a.apply(n, "Docexpr", nil, n.Docexpr) a.apply(n, "Rowexpr", nil, n.Rowexpr) a.apply(n, "Namespaces", nil, n.Namespaces) a.apply(n, "Columns", nil, n.Columns) a.apply(n, "Alias", nil, n.Alias) case *ast.RangeTableFuncCol: a.apply(n, "TypeName", nil, n.TypeName) a.apply(n, "Colexpr", nil, n.Colexpr) a.apply(n, "Coldefexpr", nil, n.Coldefexpr) case *ast.RangeTableSample: a.apply(n, "Relation", nil, n.Relation) a.apply(n, "Method", nil, n.Method) a.apply(n, "Args", nil, n.Args) a.apply(n, "Repeatable", nil, n.Repeatable) case *ast.RangeTblEntry: a.apply(n, "Tablesample", nil, n.Tablesample) a.apply(n, "Subquery", nil, n.Subquery) a.apply(n, "Joinaliasvars", nil, n.Joinaliasvars) a.apply(n, "Functions", nil, n.Functions) a.apply(n, "Tablefunc", nil, n.Tablefunc) a.apply(n, "ValuesLists", nil, n.ValuesLists) a.apply(n, "Coltypes", nil, n.Coltypes) a.apply(n, "Coltypmods", nil, n.Coltypmods) a.apply(n, "Colcollations", nil, n.Colcollations) a.apply(n, "Alias", nil, n.Alias) a.apply(n, "Eref", nil, n.Eref) a.apply(n, "SecurityQuals", nil, n.SecurityQuals) case *ast.RangeTblFunction: a.apply(n, "Funcexpr", nil, n.Funcexpr) a.apply(n, "Funccolnames", nil, n.Funccolnames) a.apply(n, "Funccoltypes", nil, n.Funccoltypes) a.apply(n, "Funccoltypmods", nil, n.Funccoltypmods) a.apply(n, "Funccolcollations", nil, n.Funccolcollations) case *ast.RangeTblRef: // pass case *ast.RangeVar: a.apply(n, "Alias", nil, n.Alias) case *ast.ReassignOwnedStmt: a.apply(n, "Roles", nil, n.Roles) a.apply(n, "Newrole", nil, n.Newrole) case *ast.RefreshMatViewStmt: a.apply(n, "Relation", nil, n.Relation) case *ast.ReindexStmt: a.apply(n, "Relation", nil, n.Relation) case *ast.RelabelType: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Arg", nil, n.Arg) case *ast.RenameStmt: a.apply(n, "Relation", nil, n.Relation) a.apply(n, "Object", nil, n.Object) case *ast.ReplicaIdentityStmt: // pass case *ast.ResTarget: a.apply(n, "Indirection", nil, n.Indirection) a.apply(n, "Val", nil, n.Val) case *ast.RoleSpec: // pass case *ast.RowCompareExpr: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Opnos", nil, n.Opnos) a.apply(n, "Opfamilies", nil, n.Opfamilies) a.apply(n, "Inputcollids", nil, n.Inputcollids) a.apply(n, "Largs", nil, n.Largs) a.apply(n, "Rargs", nil, n.Rargs) case *ast.RowExpr: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Args", nil, n.Args) a.apply(n, "Colnames", nil, n.Colnames) case *ast.RowMarkClause: // pass case *ast.RuleStmt: a.apply(n, "Relation", nil, n.Relation) a.apply(n, "WhereClause", nil, n.WhereClause) a.apply(n, "Actions", nil, n.Actions) case *ast.SQLValueFunction: a.apply(n, "Xpr", nil, n.Xpr) case *ast.ScalarArrayOpExpr: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Args", nil, n.Args) case *ast.SecLabelStmt: a.apply(n, "Object", nil, n.Object) case *ast.SelectStmt: a.apply(n, "DistinctClause", nil, n.DistinctClause) a.apply(n, "IntoClause", nil, n.IntoClause) a.apply(n, "TargetList", nil, n.TargetList) a.apply(n, "FromClause", nil, n.FromClause) a.apply(n, "WhereClause", nil, n.WhereClause) a.apply(n, "GroupClause", nil, n.GroupClause) a.apply(n, "HavingClause", nil, n.HavingClause) a.apply(n, "WindowClause", nil, n.WindowClause) a.apply(n, "ValuesLists", nil, n.ValuesLists) a.apply(n, "SortClause", nil, n.SortClause) a.apply(n, "LimitOffset", nil, n.LimitOffset) a.apply(n, "LimitCount", nil, n.LimitCount) a.apply(n, "LockingClause", nil, n.LockingClause) a.apply(n, "WithClause", nil, n.WithClause) a.apply(n, "Larg", nil, n.Larg) a.apply(n, "Rarg", nil, n.Rarg) case *ast.SetOperationStmt: a.apply(n, "Larg", nil, n.Larg) a.apply(n, "Rarg", nil, n.Rarg) a.apply(n, "ColTypes", nil, n.ColTypes) a.apply(n, "ColTypmods", nil, n.ColTypmods) a.apply(n, "ColCollations", nil, n.ColCollations) a.apply(n, "GroupClauses", nil, n.GroupClauses) case *ast.SetToDefault: a.apply(n, "Xpr", nil, n.Xpr) case *ast.SortBy: a.apply(n, "Node", nil, n.Node) a.apply(n, "UseOp", nil, n.UseOp) case *ast.SortGroupClause: // pass case *ast.SubLink: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Testexpr", nil, n.Testexpr) a.apply(n, "OperName", nil, n.OperName) a.apply(n, "Subselect", nil, n.Subselect) case *ast.SubPlan: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Testexpr", nil, n.Testexpr) a.apply(n, "ParamIds", nil, n.ParamIds) a.apply(n, "SetParam", nil, n.SetParam) a.apply(n, "ParParam", nil, n.ParParam) a.apply(n, "Args", nil, n.Args) case *ast.TableFunc: a.apply(n, "NsUris", nil, n.NsUris) a.apply(n, "NsNames", nil, n.NsNames) a.apply(n, "Docexpr", nil, n.Docexpr) a.apply(n, "Rowexpr", nil, n.Rowexpr) a.apply(n, "Colnames", nil, n.Colnames) a.apply(n, "Coltypes", nil, n.Coltypes) a.apply(n, "Coltypmods", nil, n.Coltypmods) a.apply(n, "Colcollations", nil, n.Colcollations) a.apply(n, "Colexprs", nil, n.Colexprs) a.apply(n, "Coldefexprs", nil, n.Coldefexprs) case *ast.TableLikeClause: a.apply(n, "Relation", nil, n.Relation) case *ast.TableSampleClause: a.apply(n, "Args", nil, n.Args) a.apply(n, "Repeatable", nil, n.Repeatable) case *ast.TargetEntry: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Expr", nil, n.Expr) case *ast.TransactionStmt: a.apply(n, "Options", nil, n.Options) case *ast.TriggerTransition: // pass case *ast.TruncateStmt: a.apply(n, "Relations", nil, n.Relations) case *ast.TypeCast: a.apply(n, "Arg", nil, n.Arg) a.apply(n, "TypeName", nil, n.TypeName) case *ast.TypeName: a.apply(n, "Names", nil, n.Names) a.apply(n, "Typmods", nil, n.Typmods) a.apply(n, "ArrayBounds", nil, n.ArrayBounds) case *ast.UnlistenStmt: // pass case *ast.UpdateStmt: a.apply(n, "Relations", nil, n.Relations) a.apply(n, "TargetList", nil, n.TargetList) a.apply(n, "WhereClause", nil, n.WhereClause) a.apply(n, "FromClause", nil, n.FromClause) a.apply(n, "ReturningList", nil, n.ReturningList) a.apply(n, "WithClause", nil, n.WithClause) case *ast.VacuumStmt: a.apply(n, "Relation", nil, n.Relation) a.apply(n, "VaCols", nil, n.VaCols) case *ast.Var: a.apply(n, "Xpr", nil, n.Xpr) case *ast.VariableSetStmt: a.apply(n, "Args", nil, n.Args) case *ast.VariableShowStmt: // pass case *ast.ViewStmt: a.apply(n, "View", nil, n.View) a.apply(n, "Aliases", nil, n.Aliases) a.apply(n, "Query", nil, n.Query) a.apply(n, "Options", nil, n.Options) case *ast.WindowClause: a.apply(n, "PartitionClause", nil, n.PartitionClause) a.apply(n, "OrderClause", nil, n.OrderClause) a.apply(n, "StartOffset", nil, n.StartOffset) a.apply(n, "EndOffset", nil, n.EndOffset) case *ast.WindowDef: a.apply(n, "PartitionClause", nil, n.PartitionClause) a.apply(n, "OrderClause", nil, n.OrderClause) a.apply(n, "StartOffset", nil, n.StartOffset) a.apply(n, "EndOffset", nil, n.EndOffset) case *ast.WindowFunc: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "Args", nil, n.Args) a.apply(n, "Aggfilter", nil, n.Aggfilter) case *ast.WithCheckOption: a.apply(n, "Qual", nil, n.Qual) case *ast.WithClause: a.apply(n, "Ctes", nil, n.Ctes) case *ast.XmlExpr: a.apply(n, "Xpr", nil, n.Xpr) a.apply(n, "NamedArgs", nil, n.NamedArgs) a.apply(n, "ArgNames", nil, n.ArgNames) a.apply(n, "Args", nil, n.Args) case *ast.XmlSerialize: a.apply(n, "Expr", nil, n.Expr) a.apply(n, "TypeName", nil, n.TypeName) // Comments and fields default: panic(fmt.Sprintf("Apply: unexpected node type %T", n)) } if a.post != nil && !a.post(&a.cursor) { panic(abort) } a.cursor = saved } // An iterator controls iteration over a slice of nodes. type iterator struct { index, step int } func (a *application) applyList(parent ast.Node, name string) { // avoid heap-allocating a new iterator for each applyList call; reuse a.iter instead saved := a.iter a.iter.index = 0 for { // must reload parent.name each time, since cursor modifications might change it v := reflect.Indirect(reflect.ValueOf(parent)).FieldByName(name) if a.iter.index >= v.Len() { break } // element x may be nil in a bad AST - be cautious var x ast.Node if e := v.Index(a.iter.index); e.IsValid() { x = e.Interface().(ast.Node) } a.iter.step = 1 a.apply(parent, name, &a.iter, x) a.iter.index += a.iter.step } a.iter = saved } ================================================ FILE: internal/sql/astutils/search.go ================================================ package astutils import "github.com/sqlc-dev/sqlc/internal/sql/ast" type nodeSearch struct { list *ast.List check func(ast.Node) bool } func (s *nodeSearch) Visit(node ast.Node) Visitor { if s.check(node) { s.list.Items = append(s.list.Items, node) } return s } func Search(root ast.Node, f func(ast.Node) bool) *ast.List { ns := &nodeSearch{check: f, list: &ast.List{}} Walk(ns, root) return ns.list } ================================================ FILE: internal/sql/astutils/walk.go ================================================ package astutils import ( "fmt" "github.com/sqlc-dev/sqlc/internal/sql/ast" ) type Visitor interface { Visit(ast.Node) Visitor } type VisitorFunc func(ast.Node) func (vf VisitorFunc) Visit(node ast.Node) Visitor { vf(node) return vf } func Walk(f Visitor, node ast.Node) { if f = f.Visit(node); f == nil { return } switch n := node.(type) { case *ast.AlterTableSetSchemaStmt: if n.Table != nil { Walk(f, n.Table) } case *ast.AlterTableStmt: if n.Relation != nil { Walk(f, n.Relation) } if n.Table != nil { Walk(f, n.Table) } if n.Cmds != nil { Walk(f, n.Cmds) } case *ast.AlterTypeAddValueStmt: if n.Type != nil { Walk(f, n.Type) } case *ast.AlterTypeSetSchemaStmt: if n.Type != nil { Walk(f, n.Type) } case *ast.AlterTypeRenameValueStmt: if n.Type != nil { Walk(f, n.Type) } case *ast.CommentOnColumnStmt: if n.Table != nil { Walk(f, n.Table) } if n.Col != nil { Walk(f, n.Col) } case *ast.CommentOnSchemaStmt: if n.Schema != nil { Walk(f, n.Schema) } case *ast.CommentOnTableStmt: if n.Table != nil { Walk(f, n.Table) } case *ast.CommentOnTypeStmt: if n.Type != nil { Walk(f, n.Type) } case *ast.CommentOnViewStmt: if n.View != nil { Walk(f, n.View) } case *ast.CompositeTypeStmt: if n.TypeName != nil { Walk(f, n.TypeName) } case *ast.CreateTableStmt: if n.Name != nil { Walk(f, n.Name) } case *ast.DropFunctionStmt: // pass case *ast.DropSchemaStmt: // pass case *ast.DropTableStmt: // pass case *ast.DropTypeStmt: // pass case *ast.FuncName: // pass case *ast.FuncParam: if n.Type != nil { Walk(f, n.Type) } if n.DefExpr != nil { Walk(f, n.DefExpr) } case *ast.FuncSpec: if n.Name != nil { Walk(f, n.Name) } case *ast.List: for _, item := range n.Items { Walk(f, item) } case *ast.RenameColumnStmt: if n.Table != nil { Walk(f, n.Table) } if n.Col != nil { Walk(f, n.Col) } case *ast.RenameTableStmt: if n.Table != nil { Walk(f, n.Table) } case *ast.RenameTypeStmt: if n.Type != nil { Walk(f, n.Type) } case *ast.Statement: if n.Raw != nil { Walk(f, n.Raw) } case *ast.TODO: // pass case *ast.TableName: // pass case *ast.A_ArrayExpr: if n.Elements != nil { Walk(f, n.Elements) } case *ast.A_Const: if n.Val != nil { Walk(f, n.Val) } case *ast.A_Expr: if n.Name != nil { Walk(f, n.Name) } if n.Lexpr != nil { Walk(f, n.Lexpr) } if n.Rexpr != nil { Walk(f, n.Rexpr) } case *ast.A_Indices: if n.Lidx != nil { Walk(f, n.Lidx) } if n.Uidx != nil { Walk(f, n.Uidx) } case *ast.A_Indirection: if n.Arg != nil { Walk(f, n.Arg) } if n.Indirection != nil { Walk(f, n.Indirection) } case *ast.A_Star: // pass case *ast.AccessPriv: if n.Cols != nil { Walk(f, n.Cols) } case *ast.Aggref: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Aggargtypes != nil { Walk(f, n.Aggargtypes) } if n.Aggdirectargs != nil { Walk(f, n.Aggdirectargs) } if n.Args != nil { Walk(f, n.Args) } if n.Aggorder != nil { Walk(f, n.Aggorder) } if n.Aggdistinct != nil { Walk(f, n.Aggdistinct) } if n.Aggfilter != nil { Walk(f, n.Aggfilter) } case *ast.Alias: if n.Colnames != nil { Walk(f, n.Colnames) } case *ast.AlterCollationStmt: if n.Collname != nil { Walk(f, n.Collname) } case *ast.AlterDatabaseSetStmt: if n.Setstmt != nil { Walk(f, n.Setstmt) } case *ast.AlterDatabaseStmt: if n.Options != nil { Walk(f, n.Options) } case *ast.AlterDefaultPrivilegesStmt: if n.Options != nil { Walk(f, n.Options) } if n.Action != nil { Walk(f, n.Action) } case *ast.AlterDomainStmt: if n.TypeName != nil { Walk(f, n.TypeName) } if n.Def != nil { Walk(f, n.Def) } case *ast.AlterEnumStmt: if n.TypeName != nil { Walk(f, n.TypeName) } case *ast.AlterEventTrigStmt: // pass case *ast.AlterExtensionContentsStmt: if n.Object != nil { Walk(f, n.Object) } case *ast.AlterExtensionStmt: if n.Options != nil { Walk(f, n.Options) } case *ast.AlterFdwStmt: if n.FuncOptions != nil { Walk(f, n.FuncOptions) } if n.Options != nil { Walk(f, n.Options) } case *ast.AlterForeignServerStmt: if n.Options != nil { Walk(f, n.Options) } case *ast.AlterFunctionStmt: if n.Func != nil { Walk(f, n.Func) } if n.Actions != nil { Walk(f, n.Actions) } case *ast.AlterObjectDependsStmt: if n.Relation != nil { Walk(f, n.Relation) } if n.Object != nil { Walk(f, n.Object) } if n.Extname != nil { Walk(f, n.Extname) } case *ast.AlterObjectSchemaStmt: if n.Relation != nil { Walk(f, n.Relation) } if n.Object != nil { Walk(f, n.Object) } case *ast.AlterOpFamilyStmt: if n.Opfamilyname != nil { Walk(f, n.Opfamilyname) } if n.Items != nil { Walk(f, n.Items) } case *ast.AlterOperatorStmt: if n.Opername != nil { Walk(f, n.Opername) } if n.Options != nil { Walk(f, n.Options) } case *ast.AlterOwnerStmt: if n.Relation != nil { Walk(f, n.Relation) } if n.Object != nil { Walk(f, n.Object) } if n.Newowner != nil { Walk(f, n.Newowner) } case *ast.AlterPolicyStmt: if n.Table != nil { Walk(f, n.Table) } if n.Roles != nil { Walk(f, n.Roles) } if n.Qual != nil { Walk(f, n.Qual) } if n.WithCheck != nil { Walk(f, n.WithCheck) } case *ast.AlterPublicationStmt: if n.Options != nil { Walk(f, n.Options) } if n.Tables != nil { Walk(f, n.Tables) } case *ast.AlterRoleSetStmt: if n.Role != nil { Walk(f, n.Role) } if n.Setstmt != nil { Walk(f, n.Setstmt) } case *ast.AlterRoleStmt: if n.Role != nil { Walk(f, n.Role) } if n.Options != nil { Walk(f, n.Options) } case *ast.AlterSeqStmt: if n.Sequence != nil { Walk(f, n.Sequence) } if n.Options != nil { Walk(f, n.Options) } case *ast.AlterSubscriptionStmt: if n.Publication != nil { Walk(f, n.Publication) } if n.Options != nil { Walk(f, n.Options) } case *ast.AlterSystemStmt: if n.Setstmt != nil { Walk(f, n.Setstmt) } case *ast.AlterTSConfigurationStmt: if n.Cfgname != nil { Walk(f, n.Cfgname) } if n.Tokentype != nil { Walk(f, n.Tokentype) } if n.Dicts != nil { Walk(f, n.Dicts) } case *ast.AlterTSDictionaryStmt: if n.Dictname != nil { Walk(f, n.Dictname) } if n.Options != nil { Walk(f, n.Options) } case *ast.AlterTableCmd: if n.Newowner != nil { Walk(f, n.Newowner) } if n.Def != nil { Walk(f, n.Def) } case *ast.AlterTableMoveAllStmt: if n.Roles != nil { Walk(f, n.Roles) } case *ast.AlterTableSpaceOptionsStmt: if n.Options != nil { Walk(f, n.Options) } case *ast.AlterUserMappingStmt: if n.User != nil { Walk(f, n.User) } if n.Options != nil { Walk(f, n.Options) } case *ast.AlternativeSubPlan: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Subplans != nil { Walk(f, n.Subplans) } case *ast.ArrayCoerceExpr: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Arg != nil { Walk(f, n.Arg) } case *ast.ArrayExpr: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Elements != nil { Walk(f, n.Elements) } case *ast.ArrayRef: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Refupperindexpr != nil { Walk(f, n.Refupperindexpr) } if n.Reflowerindexpr != nil { Walk(f, n.Reflowerindexpr) } if n.Refexpr != nil { Walk(f, n.Refexpr) } if n.Refassgnexpr != nil { Walk(f, n.Refassgnexpr) } case *ast.BetweenExpr: if n.Expr != nil { Walk(f, n.Expr) } if n.Left != nil { Walk(f, n.Left) } if n.Right != nil { Walk(f, n.Right) } case *ast.BitString: // pass case *ast.BlockIdData: // pass case *ast.BoolExpr: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Args != nil { Walk(f, n.Args) } case *ast.Boolean: // pass case *ast.BooleanTest: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Arg != nil { Walk(f, n.Arg) } case *ast.CallStmt: if n.FuncCall != nil { Walk(f, n.FuncCall) } case *ast.CaseExpr: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Arg != nil { Walk(f, n.Arg) } if n.Args != nil { Walk(f, n.Args) } if n.Defresult != nil { Walk(f, n.Defresult) } case *ast.CaseTestExpr: if n.Xpr != nil { Walk(f, n.Xpr) } case *ast.CaseWhen: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Expr != nil { Walk(f, n.Expr) } if n.Result != nil { Walk(f, n.Result) } case *ast.CheckPointStmt: // pass case *ast.ClosePortalStmt: // pass case *ast.ClusterStmt: if n.Relation != nil { Walk(f, n.Relation) } case *ast.CoalesceExpr: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Args != nil { Walk(f, n.Args) } case *ast.CoerceToDomain: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Arg != nil { Walk(f, n.Arg) } case *ast.CoerceToDomainValue: if n.Xpr != nil { Walk(f, n.Xpr) } case *ast.CoerceViaIO: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Arg != nil { Walk(f, n.Arg) } case *ast.CollateClause: if n.Arg != nil { Walk(f, n.Arg) } if n.Collname != nil { Walk(f, n.Collname) } case *ast.CollateExpr: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Arg != nil { Walk(f, n.Arg) } case *ast.ColumnDef: if n.TypeName != nil { Walk(f, n.TypeName) } if n.RawDefault != nil { Walk(f, n.RawDefault) } if n.CookedDefault != nil { Walk(f, n.CookedDefault) } if n.CollClause != nil { Walk(f, n.CollClause) } if n.Constraints != nil { Walk(f, n.Constraints) } if n.Fdwoptions != nil { Walk(f, n.Fdwoptions) } case *ast.ColumnRef: if n.Fields != nil { Walk(f, n.Fields) } case *ast.CommentStmt: if n.Object != nil { Walk(f, n.Object) } case *ast.CommonTableExpr: if n.Aliascolnames != nil { Walk(f, n.Aliascolnames) } if n.Ctequery != nil { Walk(f, n.Ctequery) } if n.Ctecolnames != nil { Walk(f, n.Ctecolnames) } if n.Ctecoltypes != nil { Walk(f, n.Ctecoltypes) } if n.Ctecoltypmods != nil { Walk(f, n.Ctecoltypmods) } if n.Ctecolcollations != nil { Walk(f, n.Ctecolcollations) } case *ast.Const: if n.Xpr != nil { Walk(f, n.Xpr) } case *ast.Constraint: if n.RawExpr != nil { Walk(f, n.RawExpr) } if n.Keys != nil { Walk(f, n.Keys) } if n.Exclusions != nil { Walk(f, n.Exclusions) } if n.Options != nil { Walk(f, n.Options) } if n.WhereClause != nil { Walk(f, n.WhereClause) } if n.Pktable != nil { Walk(f, n.Pktable) } if n.FkAttrs != nil { Walk(f, n.FkAttrs) } if n.PkAttrs != nil { Walk(f, n.PkAttrs) } if n.OldConpfeqop != nil { Walk(f, n.OldConpfeqop) } case *ast.ConstraintsSetStmt: if n.Constraints != nil { Walk(f, n.Constraints) } case *ast.ConvertRowtypeExpr: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Arg != nil { Walk(f, n.Arg) } case *ast.CopyStmt: if n.Relation != nil { Walk(f, n.Relation) } if n.Query != nil { Walk(f, n.Query) } if n.Attlist != nil { Walk(f, n.Attlist) } if n.Options != nil { Walk(f, n.Options) } case *ast.CreateAmStmt: if n.HandlerName != nil { Walk(f, n.HandlerName) } case *ast.CreateCastStmt: if n.Sourcetype != nil { Walk(f, n.Sourcetype) } if n.Targettype != nil { Walk(f, n.Targettype) } if n.Func != nil { Walk(f, n.Func) } case *ast.CreateConversionStmt: if n.ConversionName != nil { Walk(f, n.ConversionName) } if n.FuncName != nil { Walk(f, n.FuncName) } case *ast.CreateDomainStmt: if n.Domainname != nil { Walk(f, n.Domainname) } if n.TypeName != nil { Walk(f, n.TypeName) } if n.CollClause != nil { Walk(f, n.CollClause) } if n.Constraints != nil { Walk(f, n.Constraints) } case *ast.CreateEnumStmt: if n.TypeName != nil { Walk(f, n.TypeName) } if n.Vals != nil { Walk(f, n.Vals) } case *ast.CreateEventTrigStmt: if n.Whenclause != nil { Walk(f, n.Whenclause) } if n.Funcname != nil { Walk(f, n.Funcname) } case *ast.CreateExtensionStmt: if n.Options != nil { Walk(f, n.Options) } case *ast.CreateFdwStmt: if n.FuncOptions != nil { Walk(f, n.FuncOptions) } if n.Options != nil { Walk(f, n.Options) } case *ast.CreateForeignServerStmt: if n.Options != nil { Walk(f, n.Options) } case *ast.CreateForeignTableStmt: if n.Base != nil { Walk(f, n.Base) } if n.Options != nil { Walk(f, n.Options) } case *ast.CreateFunctionStmt: if n.Func != nil { Walk(f, n.Func) } if n.Params != nil { Walk(f, n.Params) } if n.ReturnType != nil { Walk(f, n.ReturnType) } if n.Options != nil { Walk(f, n.Options) } if n.WithClause != nil { Walk(f, n.WithClause) } case *ast.CreateOpClassItem: if n.Name != nil { Walk(f, n.Name) } if n.OrderFamily != nil { Walk(f, n.OrderFamily) } if n.ClassArgs != nil { Walk(f, n.ClassArgs) } if n.Storedtype != nil { Walk(f, n.Storedtype) } case *ast.CreateOpClassStmt: if n.Opclassname != nil { Walk(f, n.Opclassname) } if n.Opfamilyname != nil { Walk(f, n.Opfamilyname) } if n.Datatype != nil { Walk(f, n.Datatype) } if n.Items != nil { Walk(f, n.Items) } case *ast.CreateOpFamilyStmt: if n.Opfamilyname != nil { Walk(f, n.Opfamilyname) } case *ast.CreatePLangStmt: if n.Plhandler != nil { Walk(f, n.Plhandler) } if n.Plinline != nil { Walk(f, n.Plinline) } if n.Plvalidator != nil { Walk(f, n.Plvalidator) } case *ast.CreatePolicyStmt: if n.Table != nil { Walk(f, n.Table) } if n.Roles != nil { Walk(f, n.Roles) } if n.Qual != nil { Walk(f, n.Qual) } if n.WithCheck != nil { Walk(f, n.WithCheck) } case *ast.CreatePublicationStmt: if n.Options != nil { Walk(f, n.Options) } if n.Tables != nil { Walk(f, n.Tables) } case *ast.CreateRangeStmt: if n.TypeName != nil { Walk(f, n.TypeName) } if n.Params != nil { Walk(f, n.Params) } case *ast.CreateRoleStmt: if n.Options != nil { Walk(f, n.Options) } case *ast.CreateSchemaStmt: if n.Authrole != nil { Walk(f, n.Authrole) } if n.SchemaElts != nil { Walk(f, n.SchemaElts) } case *ast.CreateSeqStmt: if n.Sequence != nil { Walk(f, n.Sequence) } if n.Options != nil { Walk(f, n.Options) } case *ast.CreateStatsStmt: if n.Defnames != nil { Walk(f, n.Defnames) } if n.StatTypes != nil { Walk(f, n.StatTypes) } if n.Exprs != nil { Walk(f, n.Exprs) } if n.Relations != nil { Walk(f, n.Relations) } case *ast.CreateStmt: if n.Relation != nil { Walk(f, n.Relation) } if n.TableElts != nil { Walk(f, n.TableElts) } if n.InhRelations != nil { Walk(f, n.InhRelations) } if n.Partbound != nil { Walk(f, n.Partbound) } if n.Partspec != nil { Walk(f, n.Partspec) } if n.OfTypename != nil { Walk(f, n.OfTypename) } if n.Constraints != nil { Walk(f, n.Constraints) } if n.Options != nil { Walk(f, n.Options) } case *ast.CreateSubscriptionStmt: if n.Publication != nil { Walk(f, n.Publication) } if n.Options != nil { Walk(f, n.Options) } case *ast.CreateTableAsStmt: if n.Query != nil { Walk(f, n.Query) } if n.Into != nil { Walk(f, n.Into) } case *ast.CreateTableSpaceStmt: if n.Owner != nil { Walk(f, n.Owner) } if n.Options != nil { Walk(f, n.Options) } case *ast.CreateTransformStmt: if n.TypeName != nil { Walk(f, n.TypeName) } if n.Fromsql != nil { Walk(f, n.Fromsql) } if n.Tosql != nil { Walk(f, n.Tosql) } case *ast.CreateTrigStmt: if n.Relation != nil { Walk(f, n.Relation) } if n.Funcname != nil { Walk(f, n.Funcname) } if n.Args != nil { Walk(f, n.Args) } if n.Columns != nil { Walk(f, n.Columns) } if n.WhenClause != nil { Walk(f, n.WhenClause) } if n.TransitionRels != nil { Walk(f, n.TransitionRels) } if n.Constrrel != nil { Walk(f, n.Constrrel) } case *ast.CreateUserMappingStmt: if n.User != nil { Walk(f, n.User) } if n.Options != nil { Walk(f, n.Options) } case *ast.CreatedbStmt: if n.Options != nil { Walk(f, n.Options) } case *ast.CurrentOfExpr: if n.Xpr != nil { Walk(f, n.Xpr) } case *ast.DeallocateStmt: // pass case *ast.DeclareCursorStmt: if n.Query != nil { Walk(f, n.Query) } case *ast.DefElem: if n.Arg != nil { Walk(f, n.Arg) } case *ast.DefineStmt: if n.Defnames != nil { Walk(f, n.Defnames) } if n.Args != nil { Walk(f, n.Args) } if n.Definition != nil { Walk(f, n.Definition) } case *ast.DeleteStmt: if n.Relations != nil { Walk(f, n.Relations) } if n.UsingClause != nil { Walk(f, n.UsingClause) } if n.WhereClause != nil { Walk(f, n.WhereClause) } if n.LimitCount != nil { Walk(f, n.LimitCount) } if n.ReturningList != nil { Walk(f, n.ReturningList) } if n.WithClause != nil { Walk(f, n.WithClause) } if n.Targets != nil { Walk(f, n.Targets) } if n.FromClause != nil { Walk(f, n.FromClause) } case *ast.DiscardStmt: // pass case *ast.DoStmt: if n.Args != nil { Walk(f, n.Args) } case *ast.DropOwnedStmt: if n.Roles != nil { Walk(f, n.Roles) } case *ast.DropRoleStmt: if n.Roles != nil { Walk(f, n.Roles) } case *ast.DropStmt: if n.Objects != nil { Walk(f, n.Objects) } case *ast.DropSubscriptionStmt: // pass case *ast.DropTableSpaceStmt: // pass case *ast.DropUserMappingStmt: if n.User != nil { Walk(f, n.User) } case *ast.DropdbStmt: // pass case *ast.ExecuteStmt: if n.Params != nil { Walk(f, n.Params) } case *ast.ExplainStmt: if n.Query != nil { Walk(f, n.Query) } if n.Options != nil { Walk(f, n.Options) } case *ast.Expr: // pass case *ast.FetchStmt: // pass case *ast.FieldSelect: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Arg != nil { Walk(f, n.Arg) } case *ast.FieldStore: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Arg != nil { Walk(f, n.Arg) } if n.Newvals != nil { Walk(f, n.Newvals) } if n.Fieldnums != nil { Walk(f, n.Fieldnums) } case *ast.Float: // pass case *ast.FromExpr: if n.Fromlist != nil { Walk(f, n.Fromlist) } if n.Quals != nil { Walk(f, n.Quals) } case *ast.FuncCall: if n.Func != nil { Walk(f, n.Func) } if n.Funcname != nil { Walk(f, n.Funcname) } if n.Args != nil { Walk(f, n.Args) } if n.AggOrder != nil { Walk(f, n.AggOrder) } if n.AggFilter != nil { Walk(f, n.AggFilter) } if n.Over != nil { Walk(f, n.Over) } case *ast.FuncExpr: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Args != nil { Walk(f, n.Args) } case *ast.FunctionParameter: if n.ArgType != nil { Walk(f, n.ArgType) } if n.Defexpr != nil { Walk(f, n.Defexpr) } case *ast.GrantRoleStmt: if n.GrantedRoles != nil { Walk(f, n.GrantedRoles) } if n.GranteeRoles != nil { Walk(f, n.GranteeRoles) } if n.Grantor != nil { Walk(f, n.Grantor) } case *ast.GrantStmt: if n.Objects != nil { Walk(f, n.Objects) } if n.Privileges != nil { Walk(f, n.Privileges) } if n.Grantees != nil { Walk(f, n.Grantees) } case *ast.GroupingFunc: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Args != nil { Walk(f, n.Args) } if n.Refs != nil { Walk(f, n.Refs) } if n.Cols != nil { Walk(f, n.Cols) } case *ast.GroupingSet: if n.Content != nil { Walk(f, n.Content) } case *ast.ImportForeignSchemaStmt: if n.TableList != nil { Walk(f, n.TableList) } if n.Options != nil { Walk(f, n.Options) } case *ast.IndexElem: if n.Expr != nil { Walk(f, n.Expr) } if n.Collation != nil { Walk(f, n.Collation) } if n.Opclass != nil { Walk(f, n.Opclass) } case *ast.IndexStmt: if n.Relation != nil { Walk(f, n.Relation) } if n.IndexParams != nil { Walk(f, n.IndexParams) } if n.Options != nil { Walk(f, n.Options) } if n.WhereClause != nil { Walk(f, n.WhereClause) } if n.ExcludeOpNames != nil { Walk(f, n.ExcludeOpNames) } case *ast.InferClause: if n.IndexElems != nil { Walk(f, n.IndexElems) } if n.WhereClause != nil { Walk(f, n.WhereClause) } case *ast.InferenceElem: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Expr != nil { Walk(f, n.Expr) } case *ast.InlineCodeBlock: // pass case *ast.InsertStmt: if n.Relation != nil { Walk(f, n.Relation) } if n.Cols != nil { Walk(f, n.Cols) } if n.SelectStmt != nil { Walk(f, n.SelectStmt) } if n.OnConflictClause != nil { Walk(f, n.OnConflictClause) } if n.OnDuplicateKeyUpdate != nil { Walk(f, n.OnDuplicateKeyUpdate) } if n.ReturningList != nil { Walk(f, n.ReturningList) } if n.WithClause != nil { Walk(f, n.WithClause) } case *ast.Integer: // pass case *ast.IntoClause: if n.Rel != nil { Walk(f, n.Rel) } if n.ColNames != nil { Walk(f, n.ColNames) } if n.Options != nil { Walk(f, n.Options) } if n.ViewQuery != nil { Walk(f, n.ViewQuery) } case *ast.IntervalExpr: if n.Value != nil { Walk(f, n.Value) } case *ast.JoinExpr: if n.Larg != nil { Walk(f, n.Larg) } if n.Rarg != nil { Walk(f, n.Rarg) } if n.UsingClause != nil { Walk(f, n.UsingClause) } if n.Quals != nil { Walk(f, n.Quals) } if n.Alias != nil { Walk(f, n.Alias) } case *ast.ListenStmt: // pass case *ast.LoadStmt: // pass case *ast.LockStmt: if n.Relations != nil { Walk(f, n.Relations) } case *ast.LockingClause: if n.LockedRels != nil { Walk(f, n.LockedRels) } case *ast.MinMaxExpr: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Args != nil { Walk(f, n.Args) } case *ast.MultiAssignRef: if n.Source != nil { Walk(f, n.Source) } case *ast.NamedArgExpr: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Arg != nil { Walk(f, n.Arg) } case *ast.NextValueExpr: if n.Xpr != nil { Walk(f, n.Xpr) } case *ast.NotifyStmt: // pass case *ast.Null: // pass case *ast.NullTest: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Arg != nil { Walk(f, n.Arg) } case *ast.ObjectWithArgs: if n.Objname != nil { Walk(f, n.Objname) } if n.Objargs != nil { Walk(f, n.Objargs) } case *ast.OnConflictClause: if n.Infer != nil { Walk(f, n.Infer) } if n.TargetList != nil { Walk(f, n.TargetList) } if n.WhereClause != nil { Walk(f, n.WhereClause) } case *ast.OnConflictExpr: if n.ArbiterElems != nil { Walk(f, n.ArbiterElems) } if n.ArbiterWhere != nil { Walk(f, n.ArbiterWhere) } if n.OnConflictSet != nil { Walk(f, n.OnConflictSet) } if n.OnConflictWhere != nil { Walk(f, n.OnConflictWhere) } if n.ExclRelTlist != nil { Walk(f, n.ExclRelTlist) } case *ast.OnDuplicateKeyUpdate: if n.TargetList != nil { Walk(f, n.TargetList) } case *ast.OpExpr: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Args != nil { Walk(f, n.Args) } case *ast.Param: if n.Xpr != nil { Walk(f, n.Xpr) } case *ast.ParamExecData: // pass case *ast.ParamExternData: // pass case *ast.ParamListInfoData: // pass case *ast.ParamRef: // pass case *ast.ParenExpr: if n.Expr != nil { Walk(f, n.Expr) } case *ast.VariableExpr: // Leaf node - no children to traverse case *ast.PartitionBoundSpec: if n.Listdatums != nil { Walk(f, n.Listdatums) } if n.Lowerdatums != nil { Walk(f, n.Lowerdatums) } if n.Upperdatums != nil { Walk(f, n.Upperdatums) } case *ast.PartitionCmd: if n.Name != nil { Walk(f, n.Name) } if n.Bound != nil { Walk(f, n.Bound) } case *ast.PartitionElem: if n.Expr != nil { Walk(f, n.Expr) } if n.Collation != nil { Walk(f, n.Collation) } if n.Opclass != nil { Walk(f, n.Opclass) } case *ast.PartitionRangeDatum: if n.Value != nil { Walk(f, n.Value) } case *ast.PartitionSpec: if n.PartParams != nil { Walk(f, n.PartParams) } case *ast.PrepareStmt: if n.Argtypes != nil { Walk(f, n.Argtypes) } if n.Query != nil { Walk(f, n.Query) } case *ast.Query: if n.UtilityStmt != nil { Walk(f, n.UtilityStmt) } if n.CteList != nil { Walk(f, n.CteList) } if n.Rtable != nil { Walk(f, n.Rtable) } if n.Jointree != nil { Walk(f, n.Jointree) } if n.TargetList != nil { Walk(f, n.TargetList) } if n.OnConflict != nil { Walk(f, n.OnConflict) } if n.ReturningList != nil { Walk(f, n.ReturningList) } if n.GroupClause != nil { Walk(f, n.GroupClause) } if n.GroupingSets != nil { Walk(f, n.GroupingSets) } if n.HavingQual != nil { Walk(f, n.HavingQual) } if n.WindowClause != nil { Walk(f, n.WindowClause) } if n.DistinctClause != nil { Walk(f, n.DistinctClause) } if n.SortClause != nil { Walk(f, n.SortClause) } if n.LimitOffset != nil { Walk(f, n.LimitOffset) } if n.LimitCount != nil { Walk(f, n.LimitCount) } if n.RowMarks != nil { Walk(f, n.RowMarks) } if n.SetOperations != nil { Walk(f, n.SetOperations) } if n.ConstraintDeps != nil { Walk(f, n.ConstraintDeps) } if n.WithCheckOptions != nil { Walk(f, n.WithCheckOptions) } case *ast.RangeFunction: if n.Functions != nil { Walk(f, n.Functions) } if n.Alias != nil { Walk(f, n.Alias) } if n.Coldeflist != nil { Walk(f, n.Coldeflist) } case *ast.RangeSubselect: if n.Subquery != nil { Walk(f, n.Subquery) } if n.Alias != nil { Walk(f, n.Alias) } case *ast.RangeTableFunc: if n.Docexpr != nil { Walk(f, n.Docexpr) } if n.Rowexpr != nil { Walk(f, n.Rowexpr) } if n.Namespaces != nil { Walk(f, n.Namespaces) } if n.Columns != nil { Walk(f, n.Columns) } if n.Alias != nil { Walk(f, n.Alias) } case *ast.RangeTableFuncCol: if n.TypeName != nil { Walk(f, n.TypeName) } if n.Colexpr != nil { Walk(f, n.Colexpr) } if n.Coldefexpr != nil { Walk(f, n.Coldefexpr) } case *ast.RangeTableSample: if n.Relation != nil { Walk(f, n.Relation) } if n.Method != nil { Walk(f, n.Method) } if n.Args != nil { Walk(f, n.Args) } if n.Repeatable != nil { Walk(f, n.Repeatable) } case *ast.RangeTblEntry: if n.Tablesample != nil { Walk(f, n.Tablesample) } if n.Subquery != nil { Walk(f, n.Subquery) } if n.Joinaliasvars != nil { Walk(f, n.Joinaliasvars) } if n.Functions != nil { Walk(f, n.Functions) } if n.Tablefunc != nil { Walk(f, n.Tablefunc) } if n.ValuesLists != nil { Walk(f, n.ValuesLists) } if n.Coltypes != nil { Walk(f, n.Coltypes) } if n.Coltypmods != nil { Walk(f, n.Coltypmods) } if n.Colcollations != nil { Walk(f, n.Colcollations) } if n.Alias != nil { Walk(f, n.Alias) } if n.Eref != nil { Walk(f, n.Eref) } if n.SecurityQuals != nil { Walk(f, n.SecurityQuals) } case *ast.RangeTblFunction: if n.Funcexpr != nil { Walk(f, n.Funcexpr) } if n.Funccolnames != nil { Walk(f, n.Funccolnames) } if n.Funccoltypes != nil { Walk(f, n.Funccoltypes) } if n.Funccoltypmods != nil { Walk(f, n.Funccoltypmods) } if n.Funccolcollations != nil { Walk(f, n.Funccolcollations) } case *ast.RangeTblRef: // pass case *ast.RangeVar: if n.Alias != nil { Walk(f, n.Alias) } case *ast.RawStmt: if n.Stmt != nil { Walk(f, n.Stmt) } case *ast.ReassignOwnedStmt: if n.Roles != nil { Walk(f, n.Roles) } if n.Newrole != nil { Walk(f, n.Newrole) } case *ast.RefreshMatViewStmt: if n.Relation != nil { Walk(f, n.Relation) } case *ast.ReindexStmt: if n.Relation != nil { Walk(f, n.Relation) } case *ast.RelabelType: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Arg != nil { Walk(f, n.Arg) } case *ast.RenameStmt: if n.Relation != nil { Walk(f, n.Relation) } if n.Object != nil { Walk(f, n.Object) } case *ast.ReplicaIdentityStmt: // pass case *ast.ResTarget: if n.Indirection != nil { Walk(f, n.Indirection) } if n.Val != nil { Walk(f, n.Val) } case *ast.RoleSpec: // pass case *ast.RowCompareExpr: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Opnos != nil { Walk(f, n.Opnos) } if n.Opfamilies != nil { Walk(f, n.Opfamilies) } if n.Inputcollids != nil { Walk(f, n.Inputcollids) } if n.Largs != nil { Walk(f, n.Largs) } if n.Rargs != nil { Walk(f, n.Rargs) } case *ast.RowExpr: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Args != nil { Walk(f, n.Args) } if n.Colnames != nil { Walk(f, n.Colnames) } case *ast.RowMarkClause: // pass case *ast.RuleStmt: if n.Relation != nil { Walk(f, n.Relation) } if n.WhereClause != nil { Walk(f, n.WhereClause) } if n.Actions != nil { Walk(f, n.Actions) } case *ast.SQLValueFunction: if n.Xpr != nil { Walk(f, n.Xpr) } case *ast.ScalarArrayOpExpr: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Args != nil { Walk(f, n.Args) } case *ast.SecLabelStmt: if n.Object != nil { Walk(f, n.Object) } case *ast.SelectStmt: if n.DistinctClause != nil { Walk(f, n.DistinctClause) } if n.IntoClause != nil { Walk(f, n.IntoClause) } if n.TargetList != nil { Walk(f, n.TargetList) } if n.FromClause != nil { Walk(f, n.FromClause) } if n.WhereClause != nil { Walk(f, n.WhereClause) } if n.GroupClause != nil { Walk(f, n.GroupClause) } if n.HavingClause != nil { Walk(f, n.HavingClause) } if n.WindowClause != nil { Walk(f, n.WindowClause) } if n.ValuesLists != nil { Walk(f, n.ValuesLists) } if n.SortClause != nil { Walk(f, n.SortClause) } if n.LimitOffset != nil { Walk(f, n.LimitOffset) } if n.LimitCount != nil { Walk(f, n.LimitCount) } if n.LockingClause != nil { Walk(f, n.LockingClause) } if n.WithClause != nil { Walk(f, n.WithClause) } if n.Larg != nil { Walk(f, n.Larg) } if n.Rarg != nil { Walk(f, n.Rarg) } case *ast.SetOperationStmt: if n.Larg != nil { Walk(f, n.Larg) } if n.Rarg != nil { Walk(f, n.Rarg) } if n.ColTypes != nil { Walk(f, n.ColTypes) } if n.ColTypmods != nil { Walk(f, n.ColTypmods) } if n.ColCollations != nil { Walk(f, n.ColCollations) } if n.GroupClauses != nil { Walk(f, n.GroupClauses) } case *ast.SetToDefault: if n.Xpr != nil { Walk(f, n.Xpr) } case *ast.SortBy: if n.Node != nil { Walk(f, n.Node) } if n.UseOp != nil { Walk(f, n.UseOp) } case *ast.SortGroupClause: // pass case *ast.String: // pass case *ast.SubLink: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Testexpr != nil { Walk(f, n.Testexpr) } if n.OperName != nil { Walk(f, n.OperName) } if n.Subselect != nil { Walk(f, n.Subselect) } case *ast.SubPlan: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Testexpr != nil { Walk(f, n.Testexpr) } if n.ParamIds != nil { Walk(f, n.ParamIds) } if n.SetParam != nil { Walk(f, n.SetParam) } if n.ParParam != nil { Walk(f, n.ParParam) } if n.Args != nil { Walk(f, n.Args) } case *ast.TableFunc: if n.NsUris != nil { Walk(f, n.NsUris) } if n.NsNames != nil { Walk(f, n.NsNames) } if n.Docexpr != nil { Walk(f, n.Docexpr) } if n.Rowexpr != nil { Walk(f, n.Rowexpr) } if n.Colnames != nil { Walk(f, n.Colnames) } if n.Coltypes != nil { Walk(f, n.Coltypes) } if n.Coltypmods != nil { Walk(f, n.Coltypmods) } if n.Colcollations != nil { Walk(f, n.Colcollations) } if n.Colexprs != nil { Walk(f, n.Colexprs) } if n.Coldefexprs != nil { Walk(f, n.Coldefexprs) } case *ast.TableLikeClause: if n.Relation != nil { Walk(f, n.Relation) } case *ast.TableSampleClause: if n.Args != nil { Walk(f, n.Args) } if n.Repeatable != nil { Walk(f, n.Repeatable) } case *ast.TargetEntry: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Expr != nil { Walk(f, n.Expr) } case *ast.TransactionStmt: if n.Options != nil { Walk(f, n.Options) } case *ast.TriggerTransition: // pass case *ast.TruncateStmt: if n.Relations != nil { Walk(f, n.Relations) } case *ast.TypeCast: if n.Arg != nil { Walk(f, n.Arg) } if n.TypeName != nil { Walk(f, n.TypeName) } case *ast.TypeName: if n.Names != nil { Walk(f, n.Names) } if n.Typmods != nil { Walk(f, n.Typmods) } if n.ArrayBounds != nil { Walk(f, n.ArrayBounds) } case *ast.UnlistenStmt: // pass case *ast.UpdateStmt: if n.Relations != nil { Walk(f, n.Relations) } if n.TargetList != nil { Walk(f, n.TargetList) } if n.WhereClause != nil { Walk(f, n.WhereClause) } if n.FromClause != nil { Walk(f, n.FromClause) } if n.LimitCount != nil { Walk(f, n.LimitCount) } if n.ReturningList != nil { Walk(f, n.ReturningList) } if n.WithClause != nil { Walk(f, n.WithClause) } case *ast.VacuumStmt: if n.Relation != nil { Walk(f, n.Relation) } if n.VaCols != nil { Walk(f, n.VaCols) } case *ast.Var: if n.Xpr != nil { Walk(f, n.Xpr) } case *ast.VariableSetStmt: if n.Args != nil { Walk(f, n.Args) } case *ast.VariableShowStmt: // pass case *ast.ViewStmt: if n.View != nil { Walk(f, n.View) } if n.Aliases != nil { Walk(f, n.Aliases) } if n.Query != nil { Walk(f, n.Query) } if n.Options != nil { Walk(f, n.Options) } case *ast.WindowClause: if n.PartitionClause != nil { Walk(f, n.PartitionClause) } if n.OrderClause != nil { Walk(f, n.OrderClause) } if n.StartOffset != nil { Walk(f, n.StartOffset) } if n.EndOffset != nil { Walk(f, n.EndOffset) } case *ast.WindowDef: if n.PartitionClause != nil { Walk(f, n.PartitionClause) } if n.OrderClause != nil { Walk(f, n.OrderClause) } if n.StartOffset != nil { Walk(f, n.StartOffset) } if n.EndOffset != nil { Walk(f, n.EndOffset) } case *ast.WindowFunc: if n.Xpr != nil { Walk(f, n.Xpr) } if n.Args != nil { Walk(f, n.Args) } if n.Aggfilter != nil { Walk(f, n.Aggfilter) } case *ast.WithCheckOption: if n.Qual != nil { Walk(f, n.Qual) } case *ast.WithClause: if n.Ctes != nil { Walk(f, n.Ctes) } case *ast.XmlExpr: if n.Xpr != nil { Walk(f, n.Xpr) } if n.NamedArgs != nil { Walk(f, n.NamedArgs) } if n.ArgNames != nil { Walk(f, n.ArgNames) } if n.Args != nil { Walk(f, n.Args) } case *ast.XmlSerialize: if n.Expr != nil { Walk(f, n.Expr) } if n.TypeName != nil { Walk(f, n.TypeName) } case *ast.In: for _, l := range n.List { Walk(f, l) } if n.Sel != nil { Walk(f, n.Sel) } default: panic(fmt.Sprintf("walk: unexpected node type %T", n)) } f.Visit(nil) } ================================================ FILE: internal/sql/catalog/catalog.go ================================================ package catalog import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" ) // Catalog describes a database instance consisting of metadata in which database objects are defined type Catalog struct { Comment string DefaultSchema string Name string Schemas []*Schema SearchPath []string LoadExtension func(string) *Schema // TODO: un-export Extensions map[string]struct{} } // New creates a new catalog func New(defaultSchema string) *Catalog { newCatalog := &Catalog{ DefaultSchema: defaultSchema, Schemas: make([]*Schema, 0), Extensions: make(map[string]struct{}), } if newCatalog.DefaultSchema != "" { newCatalog.Schemas = append(newCatalog.Schemas, &Schema{Name: defaultSchema}) } return newCatalog } func (c *Catalog) Build(stmts []ast.Statement) error { for i := range stmts { if err := c.Update(stmts[i], nil); err != nil { return err } } return nil } func (c *Catalog) Update(stmt ast.Statement, colGen columnGenerator) error { if stmt.Raw == nil { return nil } var err error switch n := stmt.Raw.Stmt.(type) { case *ast.AlterTableStmt: err = c.alterTable(n) case *ast.AlterTableSetSchemaStmt: err = c.alterTableSetSchema(n) case *ast.AlterTypeAddValueStmt: err = c.alterTypeAddValue(n) case *ast.AlterTypeRenameValueStmt: err = c.alterTypeRenameValue(n) case *ast.AlterTypeSetSchemaStmt: err = c.alterTypeSetSchema(n) case *ast.CommentOnColumnStmt: err = c.commentOnColumn(n) case *ast.CommentOnSchemaStmt: err = c.commentOnSchema(n) case *ast.CommentOnTableStmt: err = c.commentOnTable(n) case *ast.CommentOnTypeStmt: err = c.commentOnType(n) case *ast.CommentOnViewStmt: err = c.commentOnView(n) case *ast.CompositeTypeStmt: err = c.createCompositeType(n) case *ast.CreateEnumStmt: err = c.createEnum(n) case *ast.CreateExtensionStmt: err = c.createExtension(n) case *ast.CreateFunctionStmt: err = c.createFunction(n) case *ast.CreateSchemaStmt: err = c.createSchema(n) case *ast.CreateTableStmt: err = c.createTable(n) case *ast.CreateTableAsStmt: err = c.createTableAs(n, colGen) case *ast.ViewStmt: err = c.createView(n, colGen) case *ast.DropFunctionStmt: err = c.dropFunction(n) case *ast.DropSchemaStmt: err = c.dropSchema(n) case *ast.DropTableStmt: err = c.dropTable(n) case *ast.DropTypeStmt: err = c.dropType(n) case *ast.RenameColumnStmt: err = c.renameColumn(n) case *ast.RenameTableStmt: err = c.renameTable(n) case *ast.RenameTypeStmt: err = c.renameType(n) case *ast.List: for _, nn := range n.Items { if err = c.Update(ast.Statement{ Raw: &ast.RawStmt{ Stmt: nn, StmtLocation: stmt.Raw.StmtLocation, StmtLen: stmt.Raw.StmtLen, }, }, colGen); err != nil { return err } } } return err } ================================================ FILE: internal/sql/catalog/comment_on.go ================================================ package catalog import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) func (c *Catalog) commentOnColumn(stmt *ast.CommentOnColumnStmt) error { _, t, err := c.getTable(stmt.Table) if err != nil { return err } for i := range t.Columns { if t.Columns[i].Name == stmt.Col.Name { if stmt.Comment != nil { t.Columns[i].Comment = *stmt.Comment } else { t.Columns[i].Comment = "" } return nil } } return sqlerr.ColumnNotFound(stmt.Table.Name, stmt.Col.Name) } func (c *Catalog) commentOnSchema(stmt *ast.CommentOnSchemaStmt) error { s, err := c.getSchema(stmt.Schema.Str) if err != nil { return err } if stmt.Comment != nil { s.Comment = *stmt.Comment } else { s.Comment = "" } return nil } func (c *Catalog) commentOnTable(stmt *ast.CommentOnTableStmt) error { _, t, err := c.getTable(stmt.Table) if err != nil { return err } if stmt.Comment != nil { t.Comment = *stmt.Comment } else { t.Comment = "" } return nil } func (c *Catalog) commentOnType(stmt *ast.CommentOnTypeStmt) error { t, _, err := c.getType(stmt.Type) if err != nil { return err } if stmt.Comment != nil { t.SetComment(*stmt.Comment) } else { t.SetComment("") } return nil } func (c *Catalog) commentOnView(stmt *ast.CommentOnViewStmt) error { _, t, err := c.getTable(stmt.View) if err != nil { return err } if stmt.Comment != nil { t.Comment = *stmt.Comment } else { t.Comment = "" } return nil } ================================================ FILE: internal/sql/catalog/extension.go ================================================ package catalog import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" ) func (c *Catalog) createExtension(stmt *ast.CreateExtensionStmt) error { if stmt.Extname == nil { return nil } // TODO: Implement IF NOT EXISTS if _, exists := c.Extensions[*stmt.Extname]; exists { return nil } if c.LoadExtension == nil { return nil } ext := c.LoadExtension(*stmt.Extname) if ext == nil { return nil } s, err := c.getSchema(c.DefaultSchema) if err != nil { return err } // TODO: Error on duplicate functions s.Funcs = append(s.Funcs, ext.Funcs...) return nil } ================================================ FILE: internal/sql/catalog/func.go ================================================ package catalog import ( "errors" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) // Function describes a database function // // A database function is a method written to perform a specific operation on data within the database. type Function struct { Name string Args []*Argument ReturnType *ast.TypeName Comment string Desc string ReturnTypeNullable bool } type Argument struct { Name string Type *ast.TypeName HasDefault bool Mode ast.FuncParamMode } func (f *Function) InArgs() []*Argument { var args []*Argument for _, a := range f.Args { switch a.Mode { case ast.FuncParamTable, ast.FuncParamOut: continue default: args = append(args, a) } } return args } func (f *Function) OutArgs() []*Argument { var args []*Argument for _, a := range f.Args { switch a.Mode { case ast.FuncParamOut: args = append(args, a) } } return args } func (c *Catalog) createFunction(stmt *ast.CreateFunctionStmt) error { ns := stmt.Func.Schema if ns == "" { ns = c.DefaultSchema } s, err := c.getSchema(ns) if err != nil { return err } fn := &Function{ Name: stmt.Func.Name, Args: make([]*Argument, len(stmt.Params.Items)), ReturnType: stmt.ReturnType, } types := make([]*ast.TypeName, len(stmt.Params.Items)) for i, item := range stmt.Params.Items { arg := item.(*ast.FuncParam) var name string if arg.Name != nil { name = *arg.Name } fn.Args[i] = &Argument{ Name: name, Type: arg.Type, Mode: arg.Mode, HasDefault: arg.DefExpr != nil, } types[i] = arg.Type } _, idx, err := s.getFunc(stmt.Func, types) if err == nil && !stmt.Replace { return sqlerr.RelationExists(stmt.Func.Name) } if idx >= 0 { s.Funcs[idx] = fn } else { s.Funcs = append(s.Funcs, fn) } return nil } func (c *Catalog) dropFunction(stmt *ast.DropFunctionStmt) error { for _, spec := range stmt.Funcs { ns := spec.Name.Schema if ns == "" { ns = c.DefaultSchema } s, err := c.getSchema(ns) if errors.Is(err, sqlerr.NotFound) && stmt.MissingOk { continue } else if err != nil { return err } var idx int if spec.HasArgs { _, idx, err = s.getFunc(spec.Name, spec.Args) } else { _, idx, err = s.getFuncByName(spec.Name) } if errors.Is(err, sqlerr.NotFound) && stmt.MissingOk { continue } else if err != nil { return err } s.Funcs = append(s.Funcs[:idx], s.Funcs[idx+1:]...) } return nil } ================================================ FILE: internal/sql/catalog/public.go ================================================ package catalog import ( "fmt" "strings" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) func (c *Catalog) schemasToSearch(ns string) []string { if ns == "" { ns = c.DefaultSchema } return append(c.SearchPath, ns) } func (c *Catalog) ListFuncsByName(rel *ast.FuncName) ([]Function, error) { var funcs []Function lowered := strings.ToLower(rel.Name) for _, ns := range c.schemasToSearch(rel.Schema) { s, err := c.getSchema(ns) if err != nil { return nil, err } for i := range s.Funcs { if strings.ToLower(s.Funcs[i].Name) == lowered { funcs = append(funcs, *s.Funcs[i]) } } } return funcs, nil } func (c *Catalog) ResolveFuncCall(call *ast.FuncCall) (*Function, error) { // Do not validate unknown functions funs, err := c.ListFuncsByName(call.Func) if err != nil || len(funs) == 0 { return nil, sqlerr.FunctionNotFound(call.Func.Name) } // https://www.postgresql.org/docs/current/sql-syntax-calling-funcs.html var positional []ast.Node var named []*ast.NamedArgExpr if call.Args != nil { for _, arg := range call.Args.Items { if narg, ok := arg.(*ast.NamedArgExpr); ok { named = append(named, narg) } else { // The mixed notation combines positional and named notation. // However, as already mentioned, named arguments cannot precede // positional arguments. if len(named) > 0 { return nil, &sqlerr.Error{ Code: "", Message: "positional argument cannot follow named argument", Location: call.Pos(), } } positional = append(positional, arg) } } } for _, fun := range funs { args := fun.InArgs() var defaults int var variadic bool known := map[string]struct{}{} for _, arg := range args { if arg.HasDefault { defaults += 1 } if arg.Mode == ast.FuncParamVariadic { variadic = true defaults += 1 } if arg.Name != "" { known[arg.Name] = struct{}{} } } if variadic { if (len(named) + len(positional)) < (len(args) - defaults) { continue } } else { if (len(named) + len(positional)) > len(args) { continue } if (len(named) + len(positional)) < (len(args) - defaults) { continue } } // Validate that the provided named arguments exist in the function var unknownArgName bool for _, expr := range named { if expr.Name != nil { if _, found := known[*expr.Name]; !found { unknownArgName = true } } } if unknownArgName { continue } return &fun, nil } var sig []string for range call.Args.Items { sig = append(sig, "unknown") } return nil, &sqlerr.Error{ Code: "42883", Message: fmt.Sprintf("function %s(%s) does not exist", call.Func.Name, strings.Join(sig, ", ")), Location: call.Pos(), // Hint: "No function matches the given name and argument types. You might need to add explicit type casts.", } } func (c *Catalog) GetTable(rel *ast.TableName) (Table, error) { _, table, err := c.getTable(rel) if table == nil { return Table{}, err } else { return *table, err } } ================================================ FILE: internal/sql/catalog/schema.go ================================================ package catalog import ( "fmt" "strings" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) // Schema describes how the data in a relational database may relate to other tables or other data models type Schema struct { Name string Tables []*Table Types []Type Funcs []*Function Comment string } func (s *Schema) getFunc(rel *ast.FuncName, tns []*ast.TypeName) (*Function, int, error) { for i := range s.Funcs { if !strings.EqualFold(s.Funcs[i].Name, rel.Name) { continue } args := s.Funcs[i].InArgs() if len(args) != len(tns) { continue } found := true for j := range args { if !sameType(s.Funcs[i].Args[j].Type, tns[j]) { found = false break } } if !found { continue } return s.Funcs[i], i, nil } return nil, -1, sqlerr.RelationNotFound(rel.Name) } func (s *Schema) getFuncByName(rel *ast.FuncName) (*Function, int, error) { idx := -1 name := strings.ToLower(rel.Name) for i := range s.Funcs { lowered := strings.ToLower(s.Funcs[i].Name) if lowered == name && idx >= 0 { return nil, -1, sqlerr.FunctionNotUnique(rel.Name) } if lowered == name { idx = i } } if idx < 0 { return nil, -1, sqlerr.RelationNotFound(rel.Name) } return s.Funcs[idx], idx, nil } func (s *Schema) getTable(rel *ast.TableName) (*Table, int, error) { for i := range s.Tables { if s.Tables[i].Rel.Name == rel.Name { return s.Tables[i], i, nil } } return nil, -1, sqlerr.RelationNotFound(rel.Name) } func (s *Schema) getType(rel *ast.TypeName) (Type, int, error) { for i := range s.Types { switch typ := s.Types[i].(type) { case *Enum: if typ.Name == rel.Name { return s.Types[i], i, nil } case *CompositeType: if typ.Name == rel.Name { return s.Types[i], i, nil } } } return nil, -1, sqlerr.TypeNotFound(rel.Name) } func (c *Catalog) getSchema(name string) (*Schema, error) { for i := range c.Schemas { if c.Schemas[i].Name == name { return c.Schemas[i], nil } } return nil, sqlerr.SchemaNotFound(name) } func (c *Catalog) createSchema(stmt *ast.CreateSchemaStmt) error { if stmt.Name == nil { return fmt.Errorf("create schema: empty name") } if _, err := c.getSchema(*stmt.Name); err == nil { // If the default schema already exists, treat additional CREATE SCHEMA // statements as no-ops. if *stmt.Name == c.DefaultSchema { return nil } if !stmt.IfNotExists { return sqlerr.SchemaExists(*stmt.Name) } } c.Schemas = append(c.Schemas, &Schema{Name: *stmt.Name}) return nil } func (c *Catalog) dropSchema(stmt *ast.DropSchemaStmt) error { // TODO: n^2 in the worst-case for _, name := range stmt.Schemas { idx := -1 for i := range c.Schemas { if c.Schemas[i].Name == name.Str { idx = i } } if idx == -1 { if stmt.MissingOk { continue } return sqlerr.SchemaNotFound(name.Str) } c.Schemas = append(c.Schemas[:idx], c.Schemas[idx+1:]...) } return nil } ================================================ FILE: internal/sql/catalog/table.go ================================================ package catalog import ( "errors" "fmt" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) // Table describes a relational database table // // A database table is a collection of related data held in a table format within a database. // It consists of columns and rows. type Table struct { Rel *ast.TableName Columns []*Column Comment string } func checkMissing(err error, missingOK bool) error { var serr *sqlerr.Error if errors.As(err, &serr) { if serr.Err == sqlerr.NotFound && missingOK { return nil } } return err } func (table *Table) isExistColumn(cmd *ast.AlterTableCmd) (int, error) { for i, c := range table.Columns { if c.Name == *cmd.Name { return i, nil } } if !cmd.MissingOk { return -1, sqlerr.ColumnNotFound(table.Rel.Name, *cmd.Name) } // Missing column is allowed return -1, nil } func (c *Catalog) addColumn(table *Table, cmd *ast.AlterTableCmd) error { for _, c := range table.Columns { if c.Name == cmd.Def.Colname { if !cmd.MissingOk { return sqlerr.ColumnExists(table.Rel.Name, cmd.Def.Colname) } return nil } } tc, err := c.defineColumn(table.Rel, cmd.Def) if err != nil { return err } table.Columns = append(table.Columns, tc) return nil } func (table *Table) alterColumnType(cmd *ast.AlterTableCmd) error { index, err := table.isExistColumn(cmd) if err != nil { return err } if index >= 0 { table.Columns[index].Type = *cmd.Def.TypeName table.Columns[index].IsArray = cmd.Def.IsArray table.Columns[index].ArrayDims = cmd.Def.ArrayDims } return nil } func (c *Catalog) dropColumn(table *Table, cmd *ast.AlterTableCmd) error { index, err := table.isExistColumn(cmd) if err != nil { return err } if index < 0 { return nil } col := table.Columns[index] if col.linkedType { drop := &ast.DropTypeStmt{ Types: []*ast.TypeName{ &col.Type, }, } if err := c.dropType(drop); err != nil { return err } } table.Columns = append(table.Columns[:index], table.Columns[index+1:]...) return nil } func (table *Table) dropNotNull(cmd *ast.AlterTableCmd) error { index, err := table.isExistColumn(cmd) if err != nil { return err } if index >= 0 { table.Columns[index].IsNotNull = false } return nil } func (table *Table) setNotNull(cmd *ast.AlterTableCmd) error { index, err := table.isExistColumn(cmd) if err != nil { return err } if index >= 0 { table.Columns[index].IsNotNull = true } return nil } // Column describes a set of data values of a particular type in a relational database table // // TODO: Should this just be ast Nodes? type Column struct { Name string Type ast.TypeName IsNotNull bool IsUnsigned bool IsArray bool ArrayDims int Comment string Length *int linkedType bool } // An interface is used to resolve a circular import between the catalog and compiler packages. // The createView function requires access to functions in the compiler package to parse the SELECT // statement that defines the view. type columnGenerator interface { OutputColumns(node ast.Node) ([]*Column, error) } func (c *Catalog) getTable(tableName *ast.TableName) (*Schema, *Table, error) { schemaName := tableName.Schema if schemaName == "" { schemaName = c.DefaultSchema } var schema *Schema for i := range c.Schemas { if c.Schemas[i].Name == schemaName { schema = c.Schemas[i] break } } if schema == nil { return nil, nil, sqlerr.SchemaNotFound(schemaName) } table, _, err := schema.getTable(tableName) if err != nil { return nil, nil, err } return schema, table, nil } func isStmtImplemented(stmt *ast.AlterTableStmt) bool { var implemented bool for _, item := range stmt.Cmds.Items { switch cmd := item.(type) { case *ast.AlterTableCmd: switch cmd.Subtype { case ast.AT_AddColumn: implemented = true case ast.AT_AlterColumnType: implemented = true case ast.AT_DropColumn: implemented = true case ast.AT_DropNotNull: implemented = true case ast.AT_SetNotNull: implemented = true } } } return implemented } func (c *Catalog) alterTable(stmt *ast.AlterTableStmt) error { if !isStmtImplemented(stmt) { return nil } _, table, err := c.getTable(stmt.Table) if err != nil { return checkMissing(err, stmt.MissingOk) } for _, item := range stmt.Cmds.Items { switch cmd := item.(type) { case *ast.AlterTableCmd: switch cmd.Subtype { case ast.AT_AddColumn: if err := c.addColumn(table, cmd); err != nil { return err } case ast.AT_AlterColumnType: if err := table.alterColumnType(cmd); err != nil { return err } case ast.AT_DropColumn: if err := c.dropColumn(table, cmd); err != nil { return err } case ast.AT_DropNotNull: if err := table.dropNotNull(cmd); err != nil { return err } case ast.AT_SetNotNull: if err := table.setNotNull(cmd); err != nil { return err } } } } return nil } func (c *Catalog) alterTableSetSchema(stmt *ast.AlterTableSetSchemaStmt) error { ns := stmt.Table.Schema if ns == "" { ns = c.DefaultSchema } oldSchema, err := c.getSchema(ns) if err != nil { return checkMissing(err, stmt.MissingOk) } tbl, idx, err := oldSchema.getTable(stmt.Table) if err != nil { return checkMissing(err, stmt.MissingOk) } tbl.Rel.Schema = *stmt.NewSchema newSchema, err := c.getSchema(*stmt.NewSchema) if err != nil { return err } if _, _, err := newSchema.getTable(stmt.Table); err == nil { return sqlerr.RelationExists(stmt.Table.Name) } oldSchema.Tables = append(oldSchema.Tables[:idx], oldSchema.Tables[idx+1:]...) newSchema.Tables = append(newSchema.Tables, tbl) return nil } func (c *Catalog) createTable(stmt *ast.CreateTableStmt) error { ns := stmt.Name.Schema if ns == "" { ns = c.DefaultSchema } schema, err := c.getSchema(ns) if err != nil { return err } _, _, err = schema.getTable(stmt.Name) if err == nil && stmt.IfNotExists { return nil } else if err == nil { return sqlerr.RelationExists(stmt.Name.Name) } tbl := Table{Rel: stmt.Name, Comment: stmt.Comment} coltype := make(map[string]ast.TypeName) // used to check for duplicate column names seen := make(map[string]bool) // used to check for duplicate column names for _, inheritTable := range stmt.Inherits { t, _, err := schema.getTable(inheritTable) if err != nil { return err } // check and ignore duplicate columns for _, col := range t.Columns { if notNull, ok := seen[col.Name]; ok { seen[col.Name] = notNull || col.IsNotNull if a, ok := coltype[col.Name]; ok { if !sameType(&a, &col.Type) { return fmt.Errorf("column %q has a type conflict", col.Name) } } continue } seen[col.Name] = col.IsNotNull coltype[col.Name] = col.Type tbl.Columns = append(tbl.Columns, col) } } if stmt.ReferTable != nil { _, original, err := c.getTable(stmt.ReferTable) if err != nil { return err } for _, col := range original.Columns { newCol := *col // make a copy, so changes to the ReferTable don't propagate tbl.Columns = append(tbl.Columns, &newCol) } } 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) } // If one of the merged columns was not null, mark the column as not null for i := range tbl.Columns { if notNull, ok := seen[tbl.Columns[i].Name]; ok { tbl.Columns[i].IsNotNull = notNull } } schema.Tables = append(schema.Tables, &tbl) return nil } func (c *Catalog) defineColumn(table *ast.TableName, col *ast.ColumnDef) (*Column, error) { tc := &Column{ Name: col.Colname, Type: *col.TypeName, IsNotNull: col.IsNotNull, IsUnsigned: col.IsUnsigned, IsArray: col.IsArray, ArrayDims: col.ArrayDims, Comment: col.Comment, Length: col.Length, } if col.Vals != nil { typeName := ast.TypeName{ Name: fmt.Sprintf("%s_%s", table.Name, col.Colname), } s := &ast.CreateEnumStmt{TypeName: &typeName, Vals: col.Vals} if err := c.createEnum(s); err != nil { return nil, err } tc.Type = typeName tc.linkedType = true } return tc, nil } func (c *Catalog) dropTable(stmt *ast.DropTableStmt) error { for _, name := range stmt.Tables { ns := name.Schema if ns == "" { ns = c.DefaultSchema } schema, err := c.getSchema(ns) if errors.Is(err, sqlerr.NotFound) && stmt.IfExists { continue } else if err != nil { return err } tbl, idx, err := schema.getTable(name) if errors.Is(err, sqlerr.NotFound) && stmt.IfExists { continue } else if err != nil { return err } drop := &ast.DropTypeStmt{} for _, col := range tbl.Columns { if !col.linkedType { continue } drop.Types = append(drop.Types, &col.Type) } if err := c.dropType(drop); err != nil { return err } schema.Tables = append(schema.Tables[:idx], schema.Tables[idx+1:]...) } return nil } func (c *Catalog) renameColumn(stmt *ast.RenameColumnStmt) error { _, tbl, err := c.getTable(stmt.Table) if err != nil { return checkMissing(err, stmt.MissingOk) } idx := -1 for i := range tbl.Columns { if tbl.Columns[i].Name == stmt.Col.Name { idx = i } if tbl.Columns[i].Name == *stmt.NewName { return sqlerr.ColumnExists(tbl.Rel.Name, *stmt.NewName) } } if idx == -1 { return sqlerr.ColumnNotFound(tbl.Rel.Name, stmt.Col.Name) } tbl.Columns[idx].Name = *stmt.NewName if tbl.Columns[idx].linkedType { name := fmt.Sprintf("%s_%s", tbl.Rel.Name, *stmt.NewName) rename := &ast.RenameTypeStmt{ Type: &tbl.Columns[idx].Type, NewName: &name, } if err := c.renameType(rename); err != nil { return err } } return nil } func (c *Catalog) renameTable(stmt *ast.RenameTableStmt) error { sch, tbl, err := c.getTable(stmt.Table) if err != nil { return checkMissing(err, stmt.MissingOk) } if _, _, err := sch.getTable(&ast.TableName{Name: *stmt.NewName}); err == nil { return sqlerr.RelationExists(*stmt.NewName) } if stmt.NewName != nil { tbl.Rel.Name = *stmt.NewName } for idx := range tbl.Columns { if tbl.Columns[idx].linkedType { name := fmt.Sprintf("%s_%s", *stmt.NewName, tbl.Columns[idx].Name) rename := &ast.RenameTypeStmt{ Type: &tbl.Columns[idx].Type, NewName: &name, } if err := c.renameType(rename); err != nil { return err } } } return nil } func (c *Catalog) createTableAs(stmt *ast.CreateTableAsStmt, colGen columnGenerator) error { cols, err := colGen.OutputColumns(stmt.Query) if err != nil { return err } catName := "" if stmt.Into.Rel.Catalogname != nil { catName = *stmt.Into.Rel.Catalogname } schemaName := "" if stmt.Into.Rel.Schemaname != nil { schemaName = *stmt.Into.Rel.Schemaname } tbl := Table{ Rel: &ast.TableName{ Catalog: catName, Schema: schemaName, Name: *stmt.Into.Rel.Relname, }, Columns: cols, } ns := tbl.Rel.Schema if ns == "" { ns = c.DefaultSchema } schema, err := c.getSchema(ns) if err != nil { return err } _, _, err = schema.getTable(tbl.Rel) if err == nil { return sqlerr.RelationExists(tbl.Rel.Name) } schema.Tables = append(schema.Tables, &tbl) return nil } ================================================ FILE: internal/sql/catalog/types.go ================================================ package catalog import ( "errors" "fmt" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) type Type interface { isType() SetComment(string) } type Enum struct { Name string Vals []string Comment string } func (e *Enum) SetComment(c string) { e.Comment = c } func (e *Enum) isType() { } type CompositeType struct { Name string Comment string } func (ct *CompositeType) isType() { } func (ct *CompositeType) SetComment(c string) { ct.Comment = c } func sameType(a, b *ast.TypeName) bool { if a.Catalog != b.Catalog { return false } // The pg_catalog schema is searched by default, so take that into // account when comparing schemas aSchema := a.Schema bSchema := b.Schema if aSchema == "pg_catalog" { aSchema = "" } if bSchema == "pg_catalog" { bSchema = "" } if aSchema != bSchema { return false } if a.Name != b.Name { return false } return true } func (c *Catalog) createEnum(stmt *ast.CreateEnumStmt) error { ns := stmt.TypeName.Schema if ns == "" { ns = c.DefaultSchema } schema, err := c.getSchema(ns) if err != nil { return err } // Because tables have associated data types, the type name must also // be distinct from the name of any existing table in the same // schema. // https://www.postgresql.org/docs/current/sql-createtype.html tbl := &ast.TableName{ Name: stmt.TypeName.Name, } if _, _, err := schema.getTable(tbl); err == nil { return sqlerr.RelationExists(tbl.Name) } if _, _, err := schema.getType(stmt.TypeName); err == nil { return sqlerr.TypeExists(tbl.Name) } schema.Types = append(schema.Types, &Enum{ Name: stmt.TypeName.Name, Vals: stringSlice(stmt.Vals), }) return nil } func stringSlice(list *ast.List) []string { items := []string{} for _, item := range list.Items { if n, ok := item.(*ast.String); ok { items = append(items, n.Str) } } return items } func (c *Catalog) getType(rel *ast.TypeName) (Type, int, error) { ns := rel.Schema if ns == "" { ns = c.DefaultSchema } s, err := c.getSchema(ns) if err != nil { return nil, -1, err } return s.getType(rel) } func (c *Catalog) createCompositeType(stmt *ast.CompositeTypeStmt) error { ns := stmt.TypeName.Schema if ns == "" { ns = c.DefaultSchema } schema, err := c.getSchema(ns) if err != nil { return err } // Because tables have associated data types, the type name must also // be distinct from the name of any existing table in the same // schema. // https://www.postgresql.org/docs/current/sql-createtype.html tbl := &ast.TableName{ Name: stmt.TypeName.Name, } if _, _, err := schema.getTable(tbl); err == nil { return sqlerr.RelationExists(tbl.Name) } if _, _, err := schema.getType(stmt.TypeName); err == nil { return sqlerr.TypeExists(tbl.Name) } schema.Types = append(schema.Types, &CompositeType{ Name: stmt.TypeName.Name, }) return nil } func (c *Catalog) alterTypeRenameValue(stmt *ast.AlterTypeRenameValueStmt) error { ns := stmt.Type.Schema if ns == "" { ns = c.DefaultSchema } schema, err := c.getSchema(ns) if err != nil { return err } typ, _, err := schema.getType(stmt.Type) if err != nil { return err } enum, ok := typ.(*Enum) if !ok { return fmt.Errorf("type is not an enum: %T", stmt.Type) } oldIndex := -1 newIndex := -1 for i, val := range enum.Vals { if val == *stmt.OldValue { oldIndex = i } if val == *stmt.NewValue { newIndex = i } } if oldIndex < 0 { return fmt.Errorf("type %T does not have value %s", stmt.Type, *stmt.OldValue) } if newIndex >= 0 { return fmt.Errorf("type %T already has value %s", stmt.Type, *stmt.NewValue) } enum.Vals[oldIndex] = *stmt.NewValue return nil } func (c *Catalog) alterTypeAddValue(stmt *ast.AlterTypeAddValueStmt) error { ns := stmt.Type.Schema if ns == "" { ns = c.DefaultSchema } schema, err := c.getSchema(ns) if err != nil { return err } typ, _, err := schema.getType(stmt.Type) if err != nil { return err } enum, ok := typ.(*Enum) if !ok { return fmt.Errorf("type is not an enum: %T", stmt.Type) } existingIndex := -1 for i, val := range enum.Vals { if val == *stmt.NewValue { existingIndex = i } } if existingIndex >= 0 { if !stmt.SkipIfNewValExists { return fmt.Errorf("enum %s already has value %s", enum.Name, *stmt.NewValue) } else { return nil } } insertIndex := len(enum.Vals) if stmt.NewValHasNeighbor { foundNeighbor := false for i, val := range enum.Vals { if val == *stmt.NewValNeighbor { if stmt.NewValIsAfter { insertIndex = i + 1 } else { insertIndex = i } foundNeighbor = true break } } if !foundNeighbor { return fmt.Errorf("enum %s unable to find existing neighbor value %s for new value %s", enum.Name, *stmt.NewValNeighbor, *stmt.NewValue) } } if insertIndex == len(enum.Vals) { enum.Vals = append(enum.Vals, *stmt.NewValue) } else { enum.Vals = append(enum.Vals[:insertIndex+1], enum.Vals[insertIndex:]...) enum.Vals[insertIndex] = *stmt.NewValue } return nil } func (c *Catalog) alterTypeSetSchema(stmt *ast.AlterTypeSetSchemaStmt) error { ns := stmt.Type.Schema if ns == "" { ns = c.DefaultSchema } oldSchema, err := c.getSchema(ns) if err != nil { return err } typ, idx, err := oldSchema.getType(stmt.Type) if err != nil { return err } oldType := *stmt.Type stmt.Type.Schema = *stmt.NewSchema newSchema, err := c.getSchema(*stmt.NewSchema) if err != nil { return err } // Because tables have associated data types, the type name must also // be distinct from the name of any existing table in the same // schema. // https://www.postgresql.org/docs/current/sql-createtype.html tbl := &ast.TableName{ Name: stmt.Type.Name, } if _, _, err := newSchema.getTable(tbl); err == nil { return sqlerr.RelationExists(tbl.Name) } if _, _, err := newSchema.getType(stmt.Type); err == nil { return sqlerr.TypeExists(stmt.Type.Name) } oldSchema.Types = append(oldSchema.Types[:idx], oldSchema.Types[idx+1:]...) newSchema.Types = append(newSchema.Types, typ) // Update all the table columns with the new type for _, schema := range c.Schemas { for _, table := range schema.Tables { for _, column := range table.Columns { if column.Type == oldType { column.Type.Schema = *stmt.NewSchema } } } } return nil } func (c *Catalog) dropType(stmt *ast.DropTypeStmt) error { for _, name := range stmt.Types { ns := name.Schema if ns == "" { ns = c.DefaultSchema } schema, err := c.getSchema(ns) if errors.Is(err, sqlerr.NotFound) && stmt.IfExists { continue } else if err != nil { return err } _, idx, err := schema.getType(name) if errors.Is(err, sqlerr.NotFound) && stmt.IfExists { continue } else if err != nil { return err } schema.Types = append(schema.Types[:idx], schema.Types[idx+1:]...) } return nil } func (c *Catalog) renameType(stmt *ast.RenameTypeStmt) error { if stmt.NewName == nil { return fmt.Errorf("rename type: empty name") } newName := *stmt.NewName ns := stmt.Type.Schema if ns == "" { ns = c.DefaultSchema } schema, err := c.getSchema(ns) if err != nil { return err } ityp, idx, err := schema.getType(stmt.Type) if err != nil { return err } if _, _, err := schema.getTable(&ast.TableName{Name: newName}); err == nil { return sqlerr.RelationExists(newName) } if _, _, err := schema.getType(&ast.TypeName{Name: newName}); err == nil { return sqlerr.TypeExists(newName) } switch typ := ityp.(type) { case *CompositeType: schema.Types[idx] = &CompositeType{ Name: newName, Comment: typ.Comment, } case *Enum: schema.Types[idx] = &Enum{ Name: newName, Vals: typ.Vals, Comment: typ.Comment, } default: return fmt.Errorf("unsupported type: %T", typ) } // Update all the table columns with the new type for _, schema := range c.Schemas { for _, table := range schema.Tables { for _, column := range table.Columns { if column.Type == *stmt.Type { column.Type.Name = newName } } } } return nil } ================================================ FILE: internal/sql/catalog/view.go ================================================ package catalog import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) func (c *Catalog) createView(stmt *ast.ViewStmt, colGen columnGenerator) error { cols, err := colGen.OutputColumns(stmt.Query) if err != nil { return err } catName := "" if stmt.View.Catalogname != nil { catName = *stmt.View.Catalogname } schemaName := "" if stmt.View.Schemaname != nil { schemaName = *stmt.View.Schemaname } tbl := Table{ Rel: &ast.TableName{ Catalog: catName, Schema: schemaName, Name: *stmt.View.Relname, }, Columns: cols, } ns := tbl.Rel.Schema if ns == "" { ns = c.DefaultSchema } schema, err := c.getSchema(ns) if err != nil { return err } _, existingIdx, err := schema.getTable(tbl.Rel) if err == nil && !stmt.Replace { return sqlerr.RelationExists(tbl.Rel.Name) } if stmt.Replace && err == nil { schema.Tables[existingIdx] = &tbl } else { schema.Tables = append(schema.Tables, &tbl) } return nil } ================================================ FILE: internal/sql/format/format.go ================================================ package format // Dialect provides SQL dialect-specific formatting behavior type Dialect interface { // QuoteIdent returns a quoted identifier if it needs quoting // (e.g., reserved words, mixed case identifiers) QuoteIdent(s string) string // TypeName returns the SQL type name for the given namespace and name. // This handles dialect-specific type name mappings (e.g., pg_catalog.int4 -> integer) TypeName(ns, name string) string // Param returns the parameter placeholder for the given parameter number. // PostgreSQL uses $1, $2, etc. MySQL uses ? Param(n int) string // NamedParam returns the named parameter placeholder for the given name. // PostgreSQL uses @name, SQLite uses :name NamedParam(name string) string // Cast formats a type cast expression. // PostgreSQL uses expr::type, MySQL uses CAST(expr AS type) Cast(arg, typeName string) string } ================================================ FILE: internal/sql/info/info.go ================================================ package info import ( "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) // Provide a read-only view into the catalog func Newo(c *catalog.Catalog) InformationSchema { return InformationSchema{c: c} } type InformationSchema struct { c *catalog.Catalog } type Table struct { Catalog string Schema string Name string } // SELECT * FROM information_schema.tables; func (i *InformationSchema) Tables() []Table { var tables []Table for _, s := range i.c.Schemas { for _, t := range s.Tables { tables = append(tables, Table{ Catalog: i.c.Name, Schema: s.Name, Name: t.Rel.Name, }) } } return tables } type Column struct { Catalog string Schema string Table string Name string DataType string IsNullable bool } // SELECT * FROM information_schema.columns; func (i *InformationSchema) Columns() []Column { return []Column{} } type Schema struct { Catalog string Name string } // SELECT * FROM information_schema.schemata; func (i *InformationSchema) Schemata() []Schema { return []Schema{} } ================================================ FILE: internal/sql/lang/operator.go ================================================ package lang // TODO: This logic is PostgreSQL-specific and needs to be refactored to support MySQL func IsComparisonOperator(s string) bool { switch s { case ">": case "<": case "<=": case ">=": case "=": case "<>": case "!=": default: return false } return true } func IsMathematicalOperator(s string) bool { switch s { case "+": case "-": case "*": case "/": case "%": case "^": case "|/": case "||/": case "!": case "!!": case "@": case "&": case "|": case "#": case "~": case "<<": case ">>": default: return false } return true } ================================================ FILE: internal/sql/named/CLAUDE.md ================================================ # Named Parameters Package - Claude Code Guide This package provides utilities for identifying sqlc's named parameter syntax. ## Named Parameter Styles sqlc supports two styles of named parameters: ### 1. Function-style: `sqlc.arg(name)`, `sqlc.narg(name)`, `sqlc.slice(name)` Identified by `IsParamFunc()`: ```go func IsParamFunc(node ast.Node) bool { call, ok := node.(*ast.FuncCall) if !ok { return false } return call.Func.Schema == "sqlc" && (call.Func.Name == "arg" || call.Func.Name == "narg" || call.Func.Name == "slice") } ``` ### 2. At-sign style: `@param_name` (PostgreSQL only) Identified by `IsParamSign()`: ```go func IsParamSign(node ast.Node) bool { expr, ok := node.(*ast.A_Expr) return ok && astutils.Join(expr.Name, ".") == "@" } ``` ## Important Distinction: sqlc @param vs MySQL @variable **sqlc named parameters** (`@param` in PostgreSQL queries): - Represented as `A_Expr` with `Kind=A_Expr_Kind_OP` and `Name=["@"]` - Detected by `IsParamSign()` - Replaced with positional parameters (`$1`, `$2` for PostgreSQL, `?` for MySQL) **MySQL user variables** (`@user_id` in MySQL queries): - Represented as `VariableExpr` - NOT detected by `IsParamSign()` (it checks for `A_Expr`, not `VariableExpr`) - Preserved as-is in the output SQL This distinction is critical: ```sql -- PostgreSQL with sqlc @param syntax: SELECT * FROM users WHERE id = @user_id -- Becomes: SELECT * FROM users WHERE id = $1 -- MySQL with user variable: SELECT * FROM users WHERE id != @user_id -- Stays: SELECT * FROM users WHERE id != @user_id ``` ## Usage in Parameter Rewriting The `rewrite/parameters.go` package uses these functions to find and replace named parameters: ```go // Find all named parameters params := astutils.Search(root, func(node ast.Node) bool { return named.IsParamFunc(node) || named.IsParamSign(node) }) // Replace with positional parameters astutils.Apply(root, func(cr *astutils.Cursor) bool { if named.IsParamFunc(cr.Node()) || named.IsParamSign(cr.Node()) { cr.Replace(&ast.ParamRef{Number: nextParam()}) } return true }, nil) ``` ## Converting MySQL @variable Correctly When converting TiDB's `VariableExpr` in `dolphin/convert.go`: ```go // CORRECT - preserves MySQL user variable as-is func (c *cc) convertVariableExpr(n *pcast.VariableExpr) ast.Node { return &ast.VariableExpr{ Name: n.Name, Location: n.OriginTextPosition(), } } // WRONG - would be treated as sqlc named parameter func (c *cc) convertVariableExpr(n *pcast.VariableExpr) ast.Node { return &ast.A_Expr{ Kind: ast.A_Expr_Kind_OP, Name: &ast.List{Items: []ast.Node{&ast.String{Str: "@"}}}, Rexpr: &ast.String{Str: n.Name}, } } ``` ================================================ FILE: internal/sql/named/is.go ================================================ package named import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" ) // IsParamFunc fulfills the astutils.Search func IsParamFunc(node ast.Node) bool { call, ok := node.(*ast.FuncCall) if !ok { return false } if call.Func == nil { return false } isValid := call.Func.Schema == "sqlc" && (call.Func.Name == "arg" || call.Func.Name == "narg" || call.Func.Name == "slice") return isValid } func IsParamSign(node ast.Node) bool { expr, ok := node.(*ast.A_Expr) return ok && astutils.Join(expr.Name, ".") == "@" } ================================================ FILE: internal/sql/named/param.go ================================================ package named // nullability represents the nullability of a named parameter. // The nullability can be: // 1. unspecified // 2. inferred // 3. user-defined // A user-specified nullability carries a higher precedence than an inferred one // // The representation is such that you can bitwise OR together nullability types to // combine them together. type nullability int const ( nullUnspecified nullability = 0b0000 inferredNull nullability = 0b0001 inferredNotNull nullability = 0b0010 nullable nullability = 0b0100 notNullable nullability = 0b1000 ) // String implements the Stringer interface func (n nullability) String() string { switch n { case nullUnspecified: return "NullUnspecified" case inferredNull: return "InferredNull" case inferredNotNull: return "InferredNotNull" case nullable: return "Nullable" case notNullable: return "NotNullable" default: return "NullInvalid" } } // Param represents a input argument to the query which can be specified using: // - positional parameters $1 // - named parameter operator @param // - named parameter function calls sqlc.arg(param) type Param struct { name string nullability nullability isSqlcSlice bool } // NewParam builds a new params with unspecified nullability func NewParam(name string) Param { return Param{name: name, nullability: nullUnspecified} } // NewInferredParam builds a new params with inferred nullability func NewInferredParam(name string, notNull bool) Param { if notNull { return Param{name: name, nullability: inferredNotNull} } return Param{name: name, nullability: inferredNull} } // NewUserNullableParam is a parameter that has been overridden // by the user to be nullable. func NewUserNullableParam(name string) Param { return Param{name: name, nullability: nullable} } // NewSqlcSlice is a sqlc.slice() parameter. func NewSqlcSlice(name string) Param { return Param{name: name, nullability: nullUnspecified, isSqlcSlice: true} } // Name is the user defined name to use for this parameter func (p Param) Name() string { return p.name } // is checks if this params object has the specified nullability bit set func (p Param) is(n nullability) bool { return (p.nullability & n) == n } // NonNull determines whether this param should be "not null" in its current state func (p Param) NotNull() bool { const null = false const notNull = true if p.is(notNullable) { return notNull } if p.is(nullable) { return null } if p.is(inferredNotNull) { return notNull } if p.is(inferredNull) { return null } // This param is unspecified, so by default we choose nullable // which matches the default behavior of most databases return null } // IsSlice returns whether this param is a sqlc.slice() param. func (p Param) IsSqlcSlice() bool { return p.isSqlcSlice } // mergeParam creates a new param from 2 partially specified params // If the parameters have different names, the first is preferred func mergeParam(a, b Param) Param { name := a.name if name == "" { name = b.name } return Param{ name: name, nullability: a.nullability | b.nullability, isSqlcSlice: a.isSqlcSlice || b.isSqlcSlice, } } ================================================ FILE: internal/sql/named/param_set.go ================================================ package named // ParamSet represents a set of parameters for a single query type ParamSet struct { // does this engine support named parameters? hasNamedSupport bool // the set of currently tracked named parameters namedParams map[string]Param // the locations of each of the named parameters namedLocs map[string][]int // a map of positions currently used positionToName map[int]string // argn keeps track of the last checked positional parameter used argn int } // Return the name for a given parameter number and a boolean indicating if it // was found. func (p *ParamSet) NameFor(idx int) (string, bool) { name, ok := p.positionToName[idx] return name, ok } func (p *ParamSet) nextArgNum() int { for { if _, ok := p.positionToName[p.argn]; !ok { return p.argn } p.argn++ } } // Add adds a parameter to this set and returns the numbered location used for it func (p *ParamSet) Add(param Param) int { name := param.name existing, ok := p.namedParams[name] p.namedParams[name] = mergeParam(existing, param) if ok && p.hasNamedSupport { return p.namedLocs[name][0] } argn := p.nextArgNum() p.positionToName[argn] = name p.namedLocs[name] = append(p.namedLocs[name], argn) return argn } // FetchMerge fetches an indexed parameter, and merges `mergeP` into it // Returns: the merged parameter and whether it was a named parameter func (p *ParamSet) FetchMerge(idx int, mergeP Param) (param Param, isNamed bool) { name, exists := p.positionToName[idx] if !exists || name == "" { return mergeP, false } param, ok := p.namedParams[name] if !ok { return mergeP, false } return mergeParam(param, mergeP), true } // NewParamSet creates a set of parameters with the given list of already used positions func NewParamSet(positionsUsed map[int]bool, hasNamedSupport bool) *ParamSet { positionToName := make(map[int]string, len(positionsUsed)) for index, used := range positionsUsed { if !used { continue } // assume the previously used params have no name positionToName[index] = "" } return &ParamSet{ argn: 1, namedParams: make(map[string]Param), namedLocs: make(map[string][]int), hasNamedSupport: hasNamedSupport, positionToName: positionToName, } } ================================================ FILE: internal/sql/named/param_set_test.go ================================================ package named import "testing" func TestParamSet_Add(t *testing.T) { t.Parallel() type test struct { pset *ParamSet param Param expected int } named := NewParamSet(nil, true) populatedNamed := NewParamSet(map[int]bool{1: true, 2: true, 4: true, 5: true, 6: true}, true) populatedUnnamed := NewParamSet(map[int]bool{1: true, 2: true, 4: true, 5: true, 6: true}, false) unnamed := NewParamSet(nil, false) p1 := NewParam("hello") p2 := NewParam("world") tests := []test{ // First parameter should be 1 {named, p1, 1}, // Duplicate first parameters should be 1 {named, p1, 1}, // A new parameter receives a new parameter number {named, p2, 2}, // An additional new parameter does _not_ receive a new {named, p2, 2}, // First parameter should be 1 {unnamed, p1, 1}, // Duplicate first parameters should increment argn {unnamed, p1, 2}, // A new parameter receives a new parameter number {unnamed, p2, 3}, // An additional new parameter still does receive a new argn {unnamed, p2, 4}, // First parameter of a pre-populated should be 3 {populatedNamed, p1, 3}, {populatedNamed, p1, 3}, {populatedNamed, p2, 7}, {populatedNamed, p2, 7}, {populatedUnnamed, p1, 3}, {populatedUnnamed, p1, 7}, {populatedUnnamed, p2, 8}, {populatedUnnamed, p2, 9}, } for _, spec := range tests { actual := spec.pset.Add(spec.param) if actual != spec.expected { t.Errorf("ParamSet.Add(%s) expected %v; got %v", spec.param.name, spec.expected, actual) } } } ================================================ FILE: internal/sql/named/param_test.go ================================================ package named import "testing" func TestMergeParamNullability(t *testing.T) { type test struct { a Param b Param notNull bool message string } name := "name" unspec := NewParam(name) inferredNotNull := NewInferredParam(name, true) inferredNull := NewInferredParam(name, false) userDefNull := NewUserNullableParam(name) const notNull = true const null = false tests := []test{ // Unspecified nullability parameter works {unspec, inferredNotNull, notNull, "Unspec + inferred(not null) = not null"}, {unspec, inferredNull, null, "Unspec + inferred(not null) = null"}, {unspec, userDefNull, null, "Unspec + userdef(null) = null"}, // Inferred nullability agreeing with user defined nullabilty {inferredNull, userDefNull, null, "inferred(null) + userdef(null) = null"}, // Inferred nullability disagreeing with user defined nullabilty {inferredNotNull, userDefNull, null, "inferred(not null) + userdef(null) = null"}, } for _, spec := range tests { a := spec.a b := spec.b actual := mergeParam(a, b).NotNull() expected := spec.notNull if actual != expected { t.Errorf("Combine(%s,%s) expected %v; got %v", a.nullability, b.nullability, expected, actual) } // We have already tried Combine(a, b) the same result should be true for Combine(b, a) actual = mergeParam(b, a).NotNull() if actual != expected { t.Errorf("Combine(%s,%s) expected %v; got %v", b.nullability, a.nullability, expected, actual) } } } func TestMergeParamName(t *testing.T) { type test struct { a Param b Param name string } a := NewParam("a") b := NewParam("b") blank := NewParam("") tests := []test{ // should prefer the first param's name if both specified {a, b, "a"}, {b, a, "b"}, // should prefer non-blank names {a, blank, "a"}, {blank, a, "a"}, } for _, spec := range tests { a := spec.a b := spec.b actual := mergeParam(a, b).Name() expected := spec.name if actual != expected { t.Errorf("Combine(%s,%s) expected %v; got %v", a.name, b.name, expected, actual) } } } ================================================ FILE: internal/sql/rewrite/CLAUDE.md ================================================ # SQL Rewrite Package - Claude Code Guide This package handles AST transformations, primarily for parameter handling. ## Key Functions ### NamedParameters `NamedParameters(engine config.Engine, raw *ast.RawStmt, ...) (*ast.RawStmt, map[int]Parameter, error)` Finds and replaces named parameters (`sqlc.arg()`, `@param`) with positional parameters. The function: 1. Searches for named parameters using `named.IsParamFunc()` and `named.IsParamSign()` 2. Extracts parameter names and types 3. Replaces them with `ast.ParamRef` nodes 4. Returns a map of parameter positions to their metadata ### Expand `Expand(raw *ast.RawStmt, expected int) error` Expands `sqlc.slice()` parameters into the correct number of positional parameters. ## How Parameter Rewriting Works ### Step 1: Find Named Parameters ```go refs := astutils.Search(raw.Stmt, func(node ast.Node) bool { return named.IsParamFunc(node) || named.IsParamSign(node) }) ``` ### Step 2: Replace with ParamRef ```go astutils.Apply(raw.Stmt, func(cr *astutils.Cursor) bool { if named.IsParamFunc(cr.Node()) { // Extract name from sqlc.arg(name) call := cr.Node().(*ast.FuncCall) name := extractName(call.Args) cr.Replace(&ast.ParamRef{ Number: nextParam(), Location: call.Location, }) } return true }, nil) ``` ## Important: AST Node Requirements For parameter rewriting to work correctly, the AST must be walkable. This means: 1. All node types must have cases in `astutils/walk.go` 2. All node types must have cases in `astutils/rewrite.go` 3. New container types (like `OnDuplicateKeyUpdate`) must be traversed ### Example: OnDuplicateKeyUpdate MySQL's `ON DUPLICATE KEY UPDATE` clause can contain `sqlc.arg()`: ```sql INSERT INTO t (a) VALUES (sqlc.arg(val)) ON DUPLICATE KEY UPDATE a = sqlc.arg(new_val) ``` For the parameter in `ON DUPLICATE KEY UPDATE` to be found and replaced: 1. `InsertStmt` in `rewrite.go` must traverse `OnDuplicateKeyUpdate`: ```go case *ast.InsertStmt: a.apply(n, "Relation", nil, n.Relation) a.apply(n, "Cols", nil, n.Cols) a.apply(n, "SelectStmt", nil, n.SelectStmt) a.apply(n, "OnConflictClause", nil, n.OnConflictClause) a.apply(n, "OnDuplicateKeyUpdate", nil, n.OnDuplicateKeyUpdate) // Critical! a.apply(n, "ReturningList", nil, n.ReturningList) a.apply(n, "WithClause", nil, n.WithClause) ``` 2. `OnDuplicateKeyUpdate` must have its own case: ```go case *ast.OnDuplicateKeyUpdate: a.apply(n, "List", nil, n.List) ``` ## Debugging Parameter Issues If a `sqlc.arg()` isn't being converted to `?`: 1. Check that the containing node type has a case in `rewrite.go` 2. Check that the case traverses all child fields 3. Add debug logging to see if the node is being visited: ```go case *ast.YourType: fmt.Printf("Visiting YourType with fields: %+v\n", n) a.apply(n, "ChildField", nil, n.ChildField) ``` ## Parameter Output Format by Engine - PostgreSQL: `$1`, `$2`, `$3`, ... - MySQL: `?`, `?`, `?`, ... - SQLite: `?`, `?`, `?`, ... The format is determined by the `Dialect.Param()` method in each engine. ================================================ FILE: internal/sql/rewrite/embeds.go ================================================ package rewrite import ( "fmt" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" ) // Embed is an instance of `sqlc.embed(param)` type Embed struct { Table *ast.TableName param string Node *ast.ColumnRef } // Orig string to replace func (e Embed) Orig() string { return fmt.Sprintf("sqlc.embed(%s)", e.param) } // EmbedSet is a set of Embed instances type EmbedSet []*Embed // Find a matching embed by column ref func (es EmbedSet) Find(node *ast.ColumnRef) (*Embed, bool) { for _, e := range es { if e.Node == node { return e, true } } return nil, false } // Embeds rewrites `sqlc.embed(param)` to a `ast.ColumnRef` of form `param.*`. // The compiler can make use of the returned `EmbedSet` while expanding the // `param.*` column refs to produce the correct source edits. func Embeds(raw *ast.RawStmt) (*ast.RawStmt, EmbedSet) { var embeds []*Embed node := astutils.Apply(raw, func(cr *astutils.Cursor) bool { node := cr.Node() switch { case isEmbed(node): fun := node.(*ast.FuncCall) if len(fun.Args.Items) == 0 { return false } param, _ := flatten(fun.Args) node := &ast.ColumnRef{ Fields: &ast.List{ Items: []ast.Node{ &ast.String{Str: param}, &ast.A_Star{}, }, }, } embeds = append(embeds, &Embed{ Table: &ast.TableName{Name: param}, param: param, Node: node, }) cr.Replace(node) return false default: return true } }, nil) return node.(*ast.RawStmt), embeds } func isEmbed(node ast.Node) bool { call, ok := node.(*ast.FuncCall) if !ok { return false } if call.Func == nil { return false } isValid := call.Func.Schema == "sqlc" && call.Func.Name == "embed" return isValid } ================================================ FILE: internal/sql/rewrite/parameters.go ================================================ package rewrite import ( "fmt" "strings" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/source" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" "github.com/sqlc-dev/sqlc/internal/sql/named" ) // Given an AST node, return the string representation of names func flatten(root ast.Node) (string, bool) { sw := &stringWalker{} astutils.Walk(sw, root) return sw.String, sw.IsConst } type stringWalker struct { String string IsConst bool } func (s *stringWalker) Visit(node ast.Node) astutils.Visitor { if _, ok := node.(*ast.A_Const); ok { s.IsConst = true } if n, ok := node.(*ast.String); ok { s.String += n.Str } return s } func isNamedParamSignCast(node ast.Node) bool { expr, ok := node.(*ast.A_Expr) if !ok { return false } _, cast := expr.Rexpr.(*ast.TypeCast) return astutils.Join(expr.Name, ".") == "@" && cast } // paramFromFuncCall creates a param from sqlc.n?arg() calls return the // parameter and whether the parameter name was specified a best guess as its // "source" string representation (used for replacing this function call in the // original SQL query) func paramFromFuncCall(call *ast.FuncCall) (named.Param, string) { paramName, isConst := flatten(call.Args) // origName keeps track of how the parameter was specified in the source SQL origName := paramName if isConst { origName = fmt.Sprintf("'%s'", paramName) } var param named.Param switch call.Func.Name { case "narg": param = named.NewUserNullableParam(paramName) case "slice": param = named.NewSqlcSlice(paramName) default: param = named.NewParam(paramName) } // TODO: This code assumes that sqlc.arg(name) / sqlc.narg(name) is on a single line // with no extraneous spaces (or any non-significant tokens for that matter) // except between the function name and argument funcName := call.Func.Schema + "." + call.Func.Name spaces := "" if call.Args != nil && len(call.Args.Items) > 0 { leftParen := call.Args.Items[0].Pos() - 1 spaces = strings.Repeat(" ", leftParen-call.Location-len(funcName)) } origText := fmt.Sprintf("%s%s(%s)", funcName, spaces, origName) return param, origText } func NamedParameters(engine config.Engine, raw *ast.RawStmt, numbs map[int]bool, dollar bool) (*ast.RawStmt, *named.ParamSet, []source.Edit) { foundFunc := astutils.Search(raw, named.IsParamFunc) foundSign := astutils.Search(raw, named.IsParamSign) hasNamedParameterSupport := engine != config.EngineMySQL allParams := named.NewParamSet(numbs, hasNamedParameterSupport) if len(foundFunc.Items)+len(foundSign.Items) == 0 { return raw, allParams, nil } var edits []source.Edit node := astutils.Apply(raw, func(cr *astutils.Cursor) bool { node := cr.Node() switch { case named.IsParamFunc(node): fun := node.(*ast.FuncCall) param, origText := paramFromFuncCall(fun) argn := allParams.Add(param) cr.Replace(&ast.ParamRef{ Number: argn, Location: fun.Location, }) var replace string if engine == config.EngineMySQL || engine == config.EngineSQLite || !dollar { if param.IsSqlcSlice() { // This sequence is also replicated in internal/codegen/golang.Field // since it's needed during template generation for replacement replace = fmt.Sprintf(`/*SLICE:%s*/?`, param.Name()) } else { if engine == config.EngineSQLite { replace = fmt.Sprintf("?%d", argn) } else { replace = "?" } } } else { replace = fmt.Sprintf("$%d", argn) } edits = append(edits, source.Edit{ Location: fun.Location - raw.StmtLocation, Old: origText, New: replace, }) return false case isNamedParamSignCast(node): expr := node.(*ast.A_Expr) cast := expr.Rexpr.(*ast.TypeCast) paramName, _ := flatten(cast.Arg) param := named.NewParam(paramName) argn := allParams.Add(param) cast.Arg = &ast.ParamRef{ Number: argn, Location: expr.Location, } cr.Replace(cast) // TODO: This code assumes that @foo::bool is on a single line var replace string if engine == config.EngineMySQL || !dollar { replace = "?" } else if engine == config.EngineSQLite { replace = fmt.Sprintf("?%d", argn) } else { replace = fmt.Sprintf("$%d", argn) } edits = append(edits, source.Edit{ Location: expr.Location - raw.StmtLocation, Old: fmt.Sprintf("@%s", paramName), New: replace, }) return false case named.IsParamSign(node): expr := node.(*ast.A_Expr) paramName, _ := flatten(expr.Rexpr) param := named.NewParam(paramName) argn := allParams.Add(param) cr.Replace(&ast.ParamRef{ Number: argn, Location: expr.Location, }) // TODO: This code assumes that @foo is on a single line var replace string if engine == config.EngineMySQL || !dollar { replace = "?" } else if engine == config.EngineSQLite { replace = fmt.Sprintf("?%d", argn) } else { replace = fmt.Sprintf("$%d", argn) } edits = append(edits, source.Edit{ Location: expr.Location - raw.StmtLocation, Old: fmt.Sprintf("@%s", paramName), New: replace, }) return false default: return true } }, nil) return node.(*ast.RawStmt), allParams, edits } ================================================ FILE: internal/sql/sqlerr/errors.go ================================================ package sqlerr import ( "errors" "fmt" ) var Exists = errors.New("already exists") var NotFound = errors.New("does not exist") var NotUnique = errors.New("is not unique") type Error struct { Err error Code string Message string Location int Line int Column int // Hint string } func (e *Error) Unwrap() error { return e.Err } func (e *Error) Error() string { if e.Err != nil { return fmt.Sprintf("%s %s", e.Message, e.Err.Error()) } else { return e.Message } } func ColumnExists(rel, col string) *Error { return &Error{ Err: Exists, Code: "42701", Message: fmt.Sprintf("column %q of relation %q", col, rel), } } func ColumnNotFound(rel, col string) *Error { return &Error{ Err: NotFound, Code: "42703", Message: fmt.Sprintf("column %q of relation %q", col, rel), } } func RelationExists(rel string) *Error { return &Error{ Err: Exists, Code: "42P07", Message: fmt.Sprintf("relation %q", rel), } } func RelationNotFound(rel string) *Error { return &Error{ Err: NotFound, Code: "42P01", Message: fmt.Sprintf("relation %q", rel), } } func SchemaExists(name string) *Error { return &Error{ Err: Exists, Code: "42P06", Message: fmt.Sprintf("schema %q", name), } } func SchemaNotFound(sch string) *Error { return &Error{ Err: NotFound, Code: "3F000", Message: fmt.Sprintf("schema %q", sch), } } func TypeExists(typ string) *Error { return &Error{ Err: Exists, Code: "42710", Message: fmt.Sprintf("type %q", typ), } } func TypeNotFound(typ string) *Error { return &Error{ Err: NotFound, Code: "42704", Message: fmt.Sprintf("type %q", typ), } } func FunctionNotFound(fun string) *Error { return &Error{ Err: NotFound, Code: "42704", Message: fmt.Sprintf("function %q", fun), } } func FunctionNotUnique(fn string) *Error { return &Error{ Err: NotUnique, Message: fmt.Sprintf("function name %q", fn), } } ================================================ FILE: internal/sql/sqlfile/split.go ================================================ package sqlfile import ( "bufio" "context" "io" "strings" ) // Split reads SQL queries from an io.Reader and returns them as a slice of strings. // Each SQL query is delimited by a semicolon (;). // The function handles: // - Single-line comments (-- comment) // - Multi-line comments (/* comment */) // - Single-quoted strings ('string') // - Double-quoted identifiers ("identifier") // - Dollar-quoted strings ($$string$$ or $tag$string$tag$) func Split(ctx context.Context, r io.Reader) ([]string, error) { scanner := bufio.NewScanner(r) var queries []string var currentQuery strings.Builder var inSingleQuote bool var inDoubleQuote bool var inDollarQuote bool var dollarTag string var inMultiLineComment bool for scanner.Scan() { // Check context cancellation select { case <-ctx.Done(): return nil, ctx.Err() default: } line := scanner.Text() i := 0 lineLen := len(line) for i < lineLen { ch := line[i] // Handle multi-line comments if inMultiLineComment { if i+1 < lineLen && ch == '*' && line[i+1] == '/' { inMultiLineComment = false currentQuery.WriteString("*/") i += 2 continue } currentQuery.WriteByte(ch) i++ continue } // Handle dollar-quoted strings (PostgreSQL) if inDollarQuote { if ch == '$' { // Try to match the closing tag endTag := extractDollarTag(line[i:]) if endTag == dollarTag { inDollarQuote = false currentQuery.WriteString(endTag) i += len(endTag) continue } } currentQuery.WriteByte(ch) i++ continue } // Handle single-quoted strings if inSingleQuote { currentQuery.WriteByte(ch) if ch == '\'' { // Check for escaped quote '' if i+1 < lineLen && line[i+1] == '\'' { currentQuery.WriteByte('\'') i += 2 continue } inSingleQuote = false } i++ continue } // Handle double-quoted identifiers if inDoubleQuote { currentQuery.WriteByte(ch) if ch == '"' { // Check for escaped quote "" if i+1 < lineLen && line[i+1] == '"' { currentQuery.WriteByte('"') i += 2 continue } inDoubleQuote = false } i++ continue } // Check for single-line comment if i+1 < lineLen && ch == '-' && line[i+1] == '-' { // Rest of line is a comment currentQuery.WriteString(line[i:]) break } // Check for multi-line comment start if i+1 < lineLen && ch == '/' && line[i+1] == '*' { inMultiLineComment = true currentQuery.WriteString("/*") i += 2 continue } // Check for dollar quote start if ch == '$' { tag := extractDollarTag(line[i:]) if tag != "" { inDollarQuote = true dollarTag = tag currentQuery.WriteString(tag) i += len(tag) continue } } // Check for single quote if ch == '\'' { inSingleQuote = true currentQuery.WriteByte(ch) i++ continue } // Check for double quote if ch == '"' { inDoubleQuote = true currentQuery.WriteByte(ch) i++ continue } // Check for semicolon (statement terminator) if ch == ';' { currentQuery.WriteByte(ch) // Check if there's a comment after the semicolon on the same line i++ if i < lineLen { // Skip whitespace for i < lineLen && (line[i] == ' ' || line[i] == '\t') { currentQuery.WriteByte(line[i]) i++ } // If there's a comment, include it if i+1 < lineLen && line[i] == '-' && line[i+1] == '-' { currentQuery.WriteString(line[i:]) } } query := strings.TrimSpace(currentQuery.String()) if query != "" && query != ";" { queries = append(queries, query) } currentQuery.Reset() break // Move to next line } // Regular character currentQuery.WriteByte(ch) i++ } // Add newline if we're building a query if currentQuery.Len() > 0 { currentQuery.WriteByte('\n') } } if err := scanner.Err(); err != nil { return nil, err } // Handle any remaining query query := strings.TrimSpace(currentQuery.String()) if query != "" && query != ";" { queries = append(queries, query) } return queries, nil } // extractDollarTag extracts a dollar-quoted string tag from the beginning of s. // Returns empty string if no valid dollar tag is found. // Valid tags: $$ or $identifier$ where identifier contains only alphanumeric and underscore. func extractDollarTag(s string) string { if len(s) == 0 || s[0] != '$' { return "" } // Find the closing $ for i := 1; i < len(s); i++ { if s[i] == '$' { tag := s[:i+1] // Validate tag content (only alphanumeric and underscore allowed between $) tagContent := tag[1 : len(tag)-1] if isValidDollarTagContent(tagContent) { return tag } return "" } // If we hit a character that's not allowed in a tag, it's not a dollar quote if !isValidDollarTagChar(s[i]) { return "" } } return "" } // isValidDollarTagContent returns true if s contains only valid characters for a dollar tag. func isValidDollarTagContent(s string) bool { if s == "" { return true // $$ is valid } for _, ch := range s { if !isValidDollarTagChar(byte(ch)) { return false } } return true } // isValidDollarTagChar returns true if ch is a valid character in a dollar tag. // Valid characters are alphanumeric and underscore. func isValidDollarTagChar(ch byte) bool { return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch == '_' } ================================================ FILE: internal/sql/sqlfile/split_test.go ================================================ package sqlfile import ( "context" "fmt" "os" "path/filepath" "strings" "testing" ) func TestSplit(t *testing.T) { testdataDir := "testdata" entries, err := os.ReadDir(testdataDir) if err != nil { t.Fatalf("Failed to read testdata directory: %v", err) } for _, entry := range entries { if !entry.IsDir() { continue } testName := entry.Name() t.Run(testName, func(t *testing.T) { testDir := filepath.Join(testdataDir, testName) // Read input file inputPath := filepath.Join(testDir, "input.sql") inputData, err := os.ReadFile(inputPath) if err != nil { t.Fatalf("Failed to read input file: %v", err) } // Read expected output files var expected []string for i := 1; ; i++ { outputPath := filepath.Join(testDir, fmt.Sprintf("output_%d.sql", i)) data, err := os.ReadFile(outputPath) if err != nil { if os.IsNotExist(err) { break } t.Fatalf("Failed to read output file %s: %v", outputPath, err) } expected = append(expected, string(data)) } // Run Split ctx := context.Background() reader := strings.NewReader(string(inputData)) got, err := Split(ctx, reader) if err != nil { t.Fatalf("Split() error = %v", err) } // Compare results if len(got) != len(expected) { t.Errorf("Split() got %d queries, expected %d", len(got), len(expected)) t.Logf("Got: %v", got) t.Logf("Expected: %v", expected) return } for i := range got { if got[i] != expected[i] { t.Errorf("Query %d:\ngot: %q\nexpected: %q", i, got[i], expected[i]) } } }) } } func TestSplitContextCancellation(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) cancel() // Cancel immediately reader := strings.NewReader("SELECT * FROM users;") _, err := Split(ctx, reader) if err != context.Canceled { t.Errorf("Expected context.Canceled error, got %v", err) } } func TestExtractDollarTag(t *testing.T) { tests := []struct { name string input string expected string }{ { name: "empty dollar quote", input: "$$", expected: "$$", }, { name: "simple tag", input: "$tag$", expected: "$tag$", }, { name: "tag with numbers", input: "$tag123$", expected: "$tag123$", }, { name: "tag with underscore", input: "$my_tag$", expected: "$my_tag$", }, { name: "not a dollar quote (no closing)", input: "$tag", expected: "", }, { name: "not a dollar quote (invalid char)", input: "$tag-name$", expected: "", }, { name: "empty string", input: "", expected: "", }, { name: "no dollar sign", input: "tag", expected: "", }, { name: "tag with extra content", input: "$tag$rest of string", expected: "$tag$", }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got := extractDollarTag(tt.input) if got != tt.expected { t.Errorf("extractDollarTag(%q) = %q, expected %q", tt.input, got, tt.expected) } }) } } ================================================ FILE: internal/sql/sqlfile/testdata/complex_query/input.sql ================================================ -- Create a user INSERT INTO users (name, email) VALUES ('John''s', 'john@example.com'); -- comment; /* Multi-line comment with ; */ CREATE FUNCTION test() RETURNS text AS $$ BEGIN -- Internal comment RETURN 'test;value'; END; $$ LANGUAGE plpgsql; SELECT "weird;column" FROM users WHERE name = 'test;value'; ================================================ FILE: internal/sql/sqlfile/testdata/complex_query/output_1.sql ================================================ -- Create a user INSERT INTO users (name, email) VALUES ('John''s', 'john@example.com'); -- comment; ================================================ FILE: internal/sql/sqlfile/testdata/complex_query/output_2.sql ================================================ /* Multi-line comment with ; */ CREATE FUNCTION test() RETURNS text AS $$ BEGIN -- Internal comment RETURN 'test;value'; END; $$ LANGUAGE plpgsql; ================================================ FILE: internal/sql/sqlfile/testdata/complex_query/output_3.sql ================================================ SELECT "weird;column" FROM users WHERE name = 'test;value'; ================================================ FILE: internal/sql/sqlfile/testdata/dollar_quote_with_newlines/input.sql ================================================ SELECT $$Line 1 Line 2; with semicolon Line 3$$; ================================================ FILE: internal/sql/sqlfile/testdata/dollar_quote_with_newlines/output_1.sql ================================================ SELECT $$Line 1 Line 2; with semicolon Line 3$$; ================================================ FILE: internal/sql/sqlfile/testdata/dollar_quoted_function/input.sql ================================================ CREATE FUNCTION foo() RETURNS text AS $$ BEGIN RETURN 'test;'; END; $$ LANGUAGE plpgsql; ================================================ FILE: internal/sql/sqlfile/testdata/dollar_quoted_function/output_1.sql ================================================ CREATE FUNCTION foo() RETURNS text AS $$ BEGIN RETURN 'test;'; END; $$ LANGUAGE plpgsql; ================================================ FILE: internal/sql/sqlfile/testdata/dollar_quoted_string/input.sql ================================================ SELECT $$This has a ; semicolon$$; ================================================ FILE: internal/sql/sqlfile/testdata/dollar_quoted_string/output_1.sql ================================================ SELECT $$This has a ; semicolon$$; ================================================ FILE: internal/sql/sqlfile/testdata/double_quoted_identifier/input.sql ================================================ SELECT "column;name" FROM "table;name"; ================================================ FILE: internal/sql/sqlfile/testdata/double_quoted_identifier/output_1.sql ================================================ SELECT "column;name" FROM "table;name"; ================================================ FILE: internal/sql/sqlfile/testdata/empty_input/input.sql ================================================ ================================================ FILE: internal/sql/sqlfile/testdata/escaped_double_quotes/input.sql ================================================ SELECT "column""name" FROM users; ================================================ FILE: internal/sql/sqlfile/testdata/escaped_double_quotes/output_1.sql ================================================ SELECT "column""name" FROM users; ================================================ FILE: internal/sql/sqlfile/testdata/escaped_quotes/input.sql ================================================ INSERT INTO users (name) VALUES ('It''s a test'); ================================================ FILE: internal/sql/sqlfile/testdata/escaped_quotes/output_1.sql ================================================ INSERT INTO users (name) VALUES ('It''s a test'); ================================================ FILE: internal/sql/sqlfile/testdata/last_query_no_semicolon/input.sql ================================================ SELECT * FROM users; INSERT INTO posts (title) VALUES ('Test') ================================================ FILE: internal/sql/sqlfile/testdata/last_query_no_semicolon/output_1.sql ================================================ SELECT * FROM users; ================================================ FILE: internal/sql/sqlfile/testdata/last_query_no_semicolon/output_2.sql ================================================ INSERT INTO posts (title) VALUES ('Test') ================================================ FILE: internal/sql/sqlfile/testdata/multi_line_comment/input.sql ================================================ SELECT * FROM users /* this is a multi-line comment */; SELECT * FROM posts; ================================================ FILE: internal/sql/sqlfile/testdata/multi_line_comment/output_1.sql ================================================ SELECT * FROM users /* this is a multi-line comment */; ================================================ FILE: internal/sql/sqlfile/testdata/multi_line_comment/output_2.sql ================================================ SELECT * FROM posts; ================================================ FILE: internal/sql/sqlfile/testdata/multi_line_comment_with_semicolon/input.sql ================================================ SELECT * FROM users /* this has ; in it */; SELECT * FROM posts; ================================================ FILE: internal/sql/sqlfile/testdata/multi_line_comment_with_semicolon/output_1.sql ================================================ SELECT * FROM users /* this has ; in it */; ================================================ FILE: internal/sql/sqlfile/testdata/multi_line_comment_with_semicolon/output_2.sql ================================================ SELECT * FROM posts; ================================================ FILE: internal/sql/sqlfile/testdata/multiple_queries/input.sql ================================================ SELECT * FROM users; INSERT INTO users (name) VALUES ('John'); DELETE FROM users WHERE id = 1; ================================================ FILE: internal/sql/sqlfile/testdata/multiple_queries/output_1.sql ================================================ SELECT * FROM users; ================================================ FILE: internal/sql/sqlfile/testdata/multiple_queries/output_2.sql ================================================ INSERT INTO users (name) VALUES ('John'); ================================================ FILE: internal/sql/sqlfile/testdata/multiple_queries/output_3.sql ================================================ DELETE FROM users WHERE id = 1; ================================================ FILE: internal/sql/sqlfile/testdata/nested_dollar_quotes/input.sql ================================================ SELECT $outer$This contains $inner$nested; quote$inner$;$outer$; ================================================ FILE: internal/sql/sqlfile/testdata/nested_dollar_quotes/output_1.sql ================================================ SELECT $outer$This contains $inner$nested; quote$inner$;$outer$; ================================================ FILE: internal/sql/sqlfile/testdata/no_trailing_semicolon/input.sql ================================================ SELECT * FROM users ================================================ FILE: internal/sql/sqlfile/testdata/no_trailing_semicolon/output_1.sql ================================================ SELECT * FROM users ================================================ FILE: internal/sql/sqlfile/testdata/only_semicolons/input.sql ================================================ ;;; ================================================ FILE: internal/sql/sqlfile/testdata/semicolon_in_string/input.sql ================================================ INSERT INTO users (name) VALUES ('John; DROP TABLE users;'); ================================================ FILE: internal/sql/sqlfile/testdata/semicolon_in_string/output_1.sql ================================================ INSERT INTO users (name) VALUES ('John; DROP TABLE users;'); ================================================ FILE: internal/sql/sqlfile/testdata/single_line_comment/input.sql ================================================ SELECT * FROM users; -- this is a comment SELECT * FROM posts; ================================================ FILE: internal/sql/sqlfile/testdata/single_line_comment/output_1.sql ================================================ SELECT * FROM users; -- this is a comment ================================================ FILE: internal/sql/sqlfile/testdata/single_line_comment/output_2.sql ================================================ SELECT * FROM posts; ================================================ FILE: internal/sql/sqlfile/testdata/single_line_comment_with_semicolon/input.sql ================================================ SELECT * FROM users; -- this has a ; in it SELECT * FROM posts; ================================================ FILE: internal/sql/sqlfile/testdata/single_line_comment_with_semicolon/output_1.sql ================================================ SELECT * FROM users; -- this has a ; in it ================================================ FILE: internal/sql/sqlfile/testdata/single_line_comment_with_semicolon/output_2.sql ================================================ SELECT * FROM posts; ================================================ FILE: internal/sql/sqlfile/testdata/single_query/input.sql ================================================ SELECT * FROM users; ================================================ FILE: internal/sql/sqlfile/testdata/single_query/output_1.sql ================================================ SELECT * FROM users; ================================================ FILE: internal/sql/sqlfile/testdata/tagged_dollar_quoted_string/input.sql ================================================ SELECT $tag$This has a ; semicolon$tag$; ================================================ FILE: internal/sql/sqlfile/testdata/tagged_dollar_quoted_string/output_1.sql ================================================ SELECT $tag$This has a ; semicolon$tag$; ================================================ FILE: internal/sql/sqlfile/testdata/whitespace_only/input.sql ================================================ ================================================ FILE: internal/sql/sqlpath/read.go ================================================ package sqlpath import ( "fmt" "os" "path/filepath" "strings" "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 // 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 error: %w", err) } if f.IsDir() { listing, err := os.ReadDir(path) if err != nil { return nil, err } for _, f := range listing { files = append(files, filepath.Join(path, f.Name())) } } else { files = append(files, filepath.Clean(path)) } } var sqlFiles []string for _, file := range files { if !strings.HasSuffix(file, ".sql") { continue } if strings.HasPrefix(filepath.Base(file), ".") { continue } if migrations.IsDown(filepath.Base(file)) { continue } sqlFiles = append(sqlFiles, file) } return sqlFiles, nil } ================================================ FILE: internal/sql/sqlpath/read_test.go ================================================ 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) } } } ================================================ FILE: internal/sql/sqlpath/testdata/.hidden.sql ================================================ ================================================ FILE: internal/sql/sqlpath/testdata/.hiddendir/file1.sql ================================================ ================================================ FILE: internal/sql/sqlpath/testdata/extra.txt ================================================ ================================================ FILE: internal/sql/sqlpath/testdata/file1.sql ================================================ ================================================ FILE: internal/sql/sqlpath/testdata/file2.sql ================================================ ================================================ FILE: internal/sql/sqlpath/testdata/file3.down.sql ================================================ ================================================ FILE: internal/sql/sqlpath/testdata/file4.SQL ================================================ ================================================ FILE: internal/sql/sqlpath/testdata/glob/sub1/queries/file1.sql ================================================ ================================================ FILE: internal/sql/sqlpath/testdata/glob/sub2/queries/file2.sql ================================================ ================================================ FILE: internal/sql/sqlpath/testdata/glob/sub3/queries/file3.sql ================================================ ================================================ FILE: internal/sql/sqlpath/testdata/glob/sub3/queries/file4.sql ================================================ ================================================ FILE: internal/sql/sqlpath/testdata/subdir/file2.sql ================================================ ================================================ FILE: internal/sql/validate/cmd.go ================================================ package validate import ( "errors" "fmt" "github.com/sqlc-dev/sqlc/internal/metadata" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" "github.com/sqlc-dev/sqlc/internal/sql/named" ) func validateCopyfrom(n ast.Node) error { stmt, ok := n.(*ast.InsertStmt) if !ok { return errors.New(":copyfrom requires an INSERT INTO statement") } if stmt.OnConflictClause != nil { return errors.New(":copyfrom is not compatible with ON CONFLICT") } if stmt.WithClause != nil { return errors.New(":copyfrom is not compatible with WITH clauses") } if stmt.ReturningList != nil && len(stmt.ReturningList.Items) > 0 { return errors.New(":copyfrom is not compatible with RETURNING") } sel, ok := stmt.SelectStmt.(*ast.SelectStmt) if !ok { return nil } if len(sel.FromClause.Items) > 0 { return errors.New(":copyfrom is not compatible with INSERT INTO ... SELECT") } if sel.ValuesLists == nil || len(sel.ValuesLists.Items) != 1 { return errors.New(":copyfrom requires exactly one example row to be inserted") } sublist, ok := sel.ValuesLists.Items[0].(*ast.List) if !ok { return nil } for _, v := range sublist.Items { _, ok := v.(*ast.ParamRef) ok = ok || named.IsParamFunc(v) ok = ok || named.IsParamSign(v) if !ok { return errors.New(":copyfrom doesn't support non-parameter values") } } return nil } func validateBatch(n ast.Node) error { funcs := astutils.Search(n, named.IsParamFunc) params := astutils.Search(n, named.IsParamSign) args := astutils.Search(n, func(n ast.Node) bool { _, ok := n.(*ast.ParamRef) return ok }) if (len(params.Items) + len(funcs.Items) + len(args.Items)) == 0 { return errors.New(":batch* commands require parameters") } return nil } func Cmd(n ast.Node, name, cmd string) error { if cmd == metadata.CmdCopyFrom { return validateCopyfrom(n) } if (cmd == metadata.CmdBatchExec || cmd == metadata.CmdBatchMany) || cmd == metadata.CmdBatchOne { if err := validateBatch(n); err != nil { return err } } if !(cmd == metadata.CmdMany || cmd == metadata.CmdOne || cmd == metadata.CmdBatchMany || cmd == metadata.CmdBatchOne) { return nil } var list *ast.List switch stmt := n.(type) { case *ast.SelectStmt: return nil case *ast.DeleteStmt: list = stmt.ReturningList case *ast.InsertStmt: list = stmt.ReturningList case *ast.UpdateStmt: list = stmt.ReturningList default: return nil } if list == nil || len(list.Items) == 0 { return fmt.Errorf("query %q specifies parameter %q without containing a RETURNING clause", name, cmd) } return nil } ================================================ FILE: internal/sql/validate/func_call.go ================================================ package validate import ( "errors" "github.com/sqlc-dev/sqlc/internal/config" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" "github.com/sqlc-dev/sqlc/internal/sql/catalog" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) type funcCallVisitor struct { catalog *catalog.Catalog settings config.CombinedSettings err error } func (v *funcCallVisitor) Visit(node ast.Node) astutils.Visitor { if v.err != nil { return nil } call, ok := node.(*ast.FuncCall) if !ok { return v } fn := call.Func if fn == nil { return v } if fn.Schema == "sqlc" { return nil } fun, err := v.catalog.ResolveFuncCall(call) if fun != nil { return v } if errors.Is(err, sqlerr.NotFound) && !v.settings.Package.StrictFunctionChecks { return v } v.err = err return nil } func FuncCall(c *catalog.Catalog, cs config.CombinedSettings, n ast.Node) error { visitor := funcCallVisitor{catalog: c, settings: cs} astutils.Walk(&visitor, n) return visitor.err } ================================================ FILE: internal/sql/validate/in.go ================================================ package validate import ( "fmt" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" "github.com/sqlc-dev/sqlc/internal/sql/catalog" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) type inVisitor struct { catalog *catalog.Catalog err error } func (v *inVisitor) Visit(node ast.Node) astutils.Visitor { if v.err != nil { return nil } in, ok := node.(*ast.In) if !ok { return v } // Validate that sqlc.slice in an IN statement is the only arg, eg: // id IN (sqlc.slice("ids")) -- GOOD // id in (0, 1, sqlc.slice("ids")) -- BAD if len(in.List) <= 1 { return v } for _, n := range in.List { call, ok := n.(*ast.FuncCall) if !ok { continue } fn := call.Func if fn == nil { continue } if fn.Schema == "sqlc" && fn.Name == "slice" { var inExpr, sliceArg string // determine inExpr switch n := in.Expr.(type) { case *ast.ColumnRef: inExpr = n.Name default: inExpr = "..." } // determine sliceArg if len(call.Args.Items) == 1 { switch n := call.Args.Items[0].(type) { case *ast.A_Const: if str, ok := n.Val.(*ast.String); ok { sliceArg = "\"" + str.Str + "\"" } else { sliceArg = "?" } case *ast.ColumnRef: sliceArg = n.Name default: // impossible, validate.FuncCall should have caught this sliceArg = "..." } } v.err = &sqlerr.Error{ Message: fmt.Sprintf("expected '%s IN' expr to consist only of sqlc.slice(%s); eg ", inExpr, sliceArg), Location: call.Pos(), } } } return v } func In(c *catalog.Catalog, n ast.Node) error { visitor := inVisitor{catalog: c} astutils.Walk(&visitor, n) return visitor.err } ================================================ FILE: internal/sql/validate/insert_stmt.go ================================================ package validate import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) func InsertStmt(stmt *ast.InsertStmt) error { sel, ok := stmt.SelectStmt.(*ast.SelectStmt) if !ok { return nil } if sel.ValuesLists == nil { return nil } if len(sel.ValuesLists.Items) != 1 { return nil } sublist, ok := sel.ValuesLists.Items[0].(*ast.List) if !ok { return nil } colsLen := len(stmt.Cols.Items) valsLen := len(sublist.Items) switch { case colsLen > valsLen: return &sqlerr.Error{ Code: "42601", Message: "INSERT has more target columns than expressions", } case colsLen < valsLen: return &sqlerr.Error{ Code: "42601", Message: "INSERT has more expressions than target columns", } } return nil } ================================================ FILE: internal/sql/validate/param_ref.go ================================================ package validate import ( "errors" "fmt" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) func ParamRef(n ast.Node) (map[int]bool, bool, error) { var allrefs []*ast.ParamRef var dollar bool var nodollar bool // Find all parameter references astutils.Walk(astutils.VisitorFunc(func(node ast.Node) { switch n := node.(type) { case *ast.ParamRef: ref := node.(*ast.ParamRef) if ref.Dollar { dollar = true } else { nodollar = true } allrefs = append(allrefs, n) } }), n) if dollar && nodollar { return nil, false, errors.New("can not mix $1 format with ? format") } seen := map[int]bool{} for _, r := range allrefs { if r.Number > 0 { seen[r.Number] = true } } for i := 1; i <= len(seen); i += 1 { if _, ok := seen[i]; !ok { return seen, !nodollar, &sqlerr.Error{ Code: "42P18", Message: fmt.Sprintf("could not determine data type of parameter $%d", i), } } } return seen, !nodollar, nil } ================================================ FILE: internal/sql/validate/param_style.go ================================================ package validate import ( "fmt" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" "github.com/sqlc-dev/sqlc/internal/sql/sqlerr" ) type sqlcFuncVisitor struct { err error } func (v *sqlcFuncVisitor) Visit(node ast.Node) astutils.Visitor { if v.err != nil { return nil } call, ok := node.(*ast.FuncCall) if !ok { return v } fn := call.Func if fn == nil { return v } // Custom validation for sqlc.arg, sqlc.narg and sqlc.slice // TODO: Replace this once type-checking is implemented if fn.Schema == "sqlc" { if !(fn.Name == "arg" || fn.Name == "narg" || fn.Name == "slice" || fn.Name == "embed") { v.err = sqlerr.FunctionNotFound("sqlc." + fn.Name) return nil } if len(call.Args.Items) != 1 { v.err = &sqlerr.Error{ Message: fmt.Sprintf("expected 1 parameter to sqlc.%s; got %d", fn.Name, len(call.Args.Items)), Location: call.Pos(), } return nil } switch n := call.Args.Items[0].(type) { case *ast.A_Const: case *ast.ColumnRef: default: v.err = &sqlerr.Error{ Message: fmt.Sprintf("expected parameter to sqlc.%s to be string or reference; got %T", fn.Name, n), Location: call.Pos(), } return nil } // If we have sqlc.arg or sqlc.narg, there is no need to resolve the function call. // It won't resolve anyway, sinc it is not a real function. return nil } return nil } func SqlcFunctions(n ast.Node) error { visitor := sqlcFuncVisitor{} astutils.Walk(&visitor, n) return visitor.err } ================================================ FILE: internal/sqltest/docker/enabled.go ================================================ 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) } // Verify the Docker daemon is actually running and accessible. // Without this check, tests will try Docker, fail on docker pull, // and t.Fatal instead of falling back to native database support. if out, err := exec.Command("docker", "info").CombinedOutput(); err != nil { return fmt.Errorf("docker daemon not available: %w\n%s", err, out) } return nil } ================================================ FILE: internal/sqltest/docker/mysql.go ================================================ 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 } } } ================================================ FILE: internal/sqltest/docker/postgres.go ================================================ 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 } } } ================================================ FILE: internal/sqltest/local/id.go ================================================ 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) } ================================================ FILE: internal/sqltest/local/mysql.go ================================================ 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" "github.com/sqlc-dev/sqlc/internal/sqltest/native" ) 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 if ierr := native.Supported(); ierr == nil { // Fall back to native installation when Docker is not available u, err := native.StartMySQLServer(ctx) if err != nil { t.Fatal(err) } dburi = u } else { t.Skip("MYSQL_SERVER_URI is empty and neither Docker nor native installation is available") } } 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() } ================================================ FILE: internal/sqltest/local/postgres.go ================================================ 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" "github.com/sqlc-dev/sqlc/internal/sqltest/native" ) 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 if ierr := native.Supported(); ierr == nil { // Fall back to native installation when Docker is not available u, err := native.StartPostgreSQLServer(ctx) if err != nil { t.Fatal(err) } dburi = u } else { t.Skip("POSTGRESQL_SERVER_URI is empty and neither Docker nor native installation is available") } } 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 } ================================================ FILE: internal/sqltest/mysql.go ================================================ package sqltest import ( "database/sql" "fmt" "os" "path/filepath" "testing" _ "github.com/go-sql-driver/mysql" "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" ) func MySQL(t *testing.T, migrations []string) (*sql.DB, func()) { // For each test, pick a new database name at random. name := "sqltest_mysql_" + id() return CreateMySQLDatabase(t, name, migrations) } func CreateMySQLDatabase(t *testing.T, name string, migrations []string) (*sql.DB, func()) { t.Helper() data := os.Getenv("MYSQL_DATABASE") host := os.Getenv("MYSQL_HOST") pass := os.Getenv("MYSQL_ROOT_PASSWORD") port := os.Getenv("MYSQL_PORT") user := os.Getenv("MYSQL_USER") if user == "" { user = "root" } if pass == "" { pass = "mysecretpassword" } if port == "" { port = "3306" } if host == "" { host = "127.0.0.1" } if data == "" { data = "dinotest" } source := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?multiStatements=true&parseTime=true", user, pass, host, port, data) t.Logf("db: %s", source) db, err := sql.Open("mysql", source) if err != nil { t.Fatal(err) } if _, err := db.Exec("CREATE DATABASE " + name); err != nil { t.Fatal(err) } source = fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?multiStatements=true&parseTime=true", user, pass, host, port, name) sdb, err := sql.Open("mysql", source) if err != nil { t.Fatal(err) } 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) } if _, err := sdb.Exec(string(blob)); err != nil { t.Fatalf("%s: %s", filepath.Base(f), err) } } return sdb, func() { // Drop the test db after test runs if _, err := db.Exec("DROP DATABASE " + name); err != nil { t.Fatal(err) } } } ================================================ FILE: internal/sqltest/native/enabled.go ================================================ package native import ( "fmt" "os/exec" "runtime" ) // Supported returns nil if native database installation is supported on this platform. // Currently only Linux (Ubuntu/Debian) is supported. func Supported() error { if runtime.GOOS != "linux" { return fmt.Errorf("native database installation only supported on linux, got %s", runtime.GOOS) } // Check if apt-get is available (Debian/Ubuntu) if _, err := exec.LookPath("apt-get"); err != nil { return fmt.Errorf("apt-get not found: %w", err) } return nil } ================================================ FILE: internal/sqltest/native/mysql.go ================================================ package native import ( "context" "database/sql" "fmt" "log/slog" "os/exec" "time" _ "github.com/go-sql-driver/mysql" "golang.org/x/sync/singleflight" ) var mysqlFlight singleflight.Group var mysqlURI string // StartMySQLServer starts an existing MySQL installation natively (without Docker). func StartMySQLServer(ctx context.Context) (string, error) { if err := Supported(); err != nil { return "", err } if mysqlURI != "" { return mysqlURI, nil } value, err, _ := mysqlFlight.Do("mysql", func() (interface{}, error) { uri, err := startMySQLServer(ctx) if err != nil { return "", err } mysqlURI = uri return uri, 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(ctx context.Context) (string, error) { // Standard URI for test MySQL uri := "root:mysecretpassword@tcp(localhost:3306)/mysql?multiStatements=true&parseTime=true" // Try to connect first - it might already be running if err := waitForMySQL(ctx, uri, 500*time.Millisecond); err == nil { slog.Info("native/mysql", "status", "already running") return uri, nil } // Also try without password (default MySQL installation) uriNoPassword := "root@tcp(localhost:3306)/mysql?multiStatements=true&parseTime=true" if err := waitForMySQL(ctx, uriNoPassword, 500*time.Millisecond); err == nil { slog.Info("native/mysql", "status", "already running (no password)") // MySQL is running without password, try to set one if err := setMySQLPassword(ctx); err != nil { slog.Debug("native/mysql", "set-password-error", err) // Return without password if we can't set one return uriNoPassword, nil } // Try again with password if err := waitForMySQL(ctx, uri, 1*time.Second); err == nil { return uri, nil } // If password didn't work, use no password return uriNoPassword, nil } // Try to start existing MySQL service (might be installed but not running) if _, err := exec.LookPath("mysqld"); err == nil { slog.Info("native/mysql", "status", "starting existing service") if err := startMySQLService(); err != nil { slog.Debug("native/mysql", "start-error", err) } else { // Wait for MySQL to be ready waitCtx, cancel := context.WithTimeout(ctx, 30*time.Second) defer cancel() // Try with password first if err := waitForMySQL(waitCtx, uri, 15*time.Second); err == nil { return uri, nil } // Try without password if err := waitForMySQL(waitCtx, uriNoPassword, 15*time.Second); err == nil { if err := setMySQLPassword(ctx); err != nil { slog.Debug("native/mysql", "set-password-error", err) return uriNoPassword, nil } if err := waitForMySQL(ctx, uri, 1*time.Second); err == nil { return uri, nil } return uriNoPassword, nil } } } return "", fmt.Errorf("MySQL is not installed or could not be started") } func startMySQLService() error { // Try systemctl first cmd := exec.Command("sudo", "systemctl", "start", "mysql") if err := cmd.Run(); err == nil { // Give MySQL time to fully initialize time.Sleep(2 * time.Second) return nil } // Try mysqld cmd = exec.Command("sudo", "systemctl", "start", "mysqld") if err := cmd.Run(); err == nil { time.Sleep(2 * time.Second) return nil } // Try service command cmd = exec.Command("sudo", "service", "mysql", "start") if err := cmd.Run(); err == nil { time.Sleep(2 * time.Second) return nil } cmd = exec.Command("sudo", "service", "mysqld", "start") if err := cmd.Run(); err == nil { time.Sleep(2 * time.Second) return nil } return fmt.Errorf("could not start MySQL service") } func setMySQLPassword(ctx context.Context) error { // Connect without password db, err := sql.Open("mysql", "root@tcp(localhost:3306)/mysql") if err != nil { return err } defer db.Close() // Set root password using mysql_native_password for broader compatibility _, err = db.ExecContext(ctx, "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'mysecretpassword';") if err != nil { // Try without specifying auth plugin _, err = db.ExecContext(ctx, "ALTER USER 'root'@'localhost' IDENTIFIED BY 'mysecretpassword';") if err != nil { // Try older MySQL syntax _, err = db.ExecContext(ctx, "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mysecretpassword');") if err != nil { return fmt.Errorf("could not set MySQL password: %w", err) } } } // Flush privileges _, _ = db.ExecContext(ctx, "FLUSH PRIVILEGES;") return nil } func waitForMySQL(ctx context.Context, uri string, timeout time.Duration) error { deadline := time.Now().Add(timeout) ticker := time.NewTicker(500 * time.Millisecond) defer ticker.Stop() // Make an immediate first attempt before waiting for the ticker if err := tryMySQLConnection(ctx, uri); err == nil { return nil } var lastErr error for { select { case <-ctx.Done(): return fmt.Errorf("context cancelled: %w (last error: %v)", ctx.Err(), lastErr) case <-ticker.C: if time.Now().After(deadline) { return fmt.Errorf("timeout waiting for MySQL (last error: %v)", lastErr) } if err := tryMySQLConnection(ctx, uri); err != nil { lastErr = err continue } return nil } } } func tryMySQLConnection(ctx context.Context, uri string) error { db, err := sql.Open("mysql", uri) if err != nil { slog.Debug("native/mysql", "open-attempt", err) return err } defer db.Close() // Use a short timeout for ping to avoid hanging pingCtx, cancel := context.WithTimeout(ctx, 2*time.Second) defer cancel() return db.PingContext(pingCtx) } ================================================ FILE: internal/sqltest/native/postgres.go ================================================ package native import ( "context" "fmt" "log/slog" "os/exec" "strings" "time" "github.com/jackc/pgx/v5" "golang.org/x/sync/singleflight" ) var postgresFlight singleflight.Group var postgresURI string // StartPostgreSQLServer starts an existing PostgreSQL installation natively (without Docker). func StartPostgreSQLServer(ctx context.Context) (string, error) { if err := Supported(); err != nil { return "", err } if postgresURI != "" { return postgresURI, nil } value, err, _ := postgresFlight.Do("postgresql", func() (interface{}, error) { uri, err := startPostgreSQLServer(ctx) if err != nil { return "", err } postgresURI = uri return uri, 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 startPostgreSQLServer(ctx context.Context) (string, error) { // Standard URI for test PostgreSQL uri := "postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable" // Try to connect first - it might already be running if err := waitForPostgres(ctx, uri, 500*time.Millisecond); err == nil { slog.Info("native/postgres", "status", "already running") return uri, nil } // Check if PostgreSQL is installed if _, err := exec.LookPath("psql"); err != nil { return "", fmt.Errorf("PostgreSQL is not installed (psql not found)") } // Start PostgreSQL service slog.Info("native/postgres", "status", "starting service") // Try systemctl first, fall back to pg_ctlcluster if err := startPostgresService(); err != nil { return "", fmt.Errorf("failed to start PostgreSQL: %w", err) } // Configure PostgreSQL for password authentication if err := configurePostgres(); err != nil { return "", fmt.Errorf("failed to configure PostgreSQL: %w", err) } // Wait for PostgreSQL to be ready waitCtx, cancel := context.WithTimeout(ctx, 30*time.Second) defer cancel() if err := waitForPostgres(waitCtx, uri, 30*time.Second); err != nil { return "", fmt.Errorf("timeout waiting for PostgreSQL: %w", err) } return uri, nil } func startPostgresService() error { // Try systemctl first cmd := exec.Command("sudo", "systemctl", "start", "postgresql") if err := cmd.Run(); err == nil { return nil } // Try service command cmd = exec.Command("sudo", "service", "postgresql", "start") if err := cmd.Run(); err == nil { return nil } // Try pg_ctlcluster (Debian/Ubuntu specific) // Find the installed PostgreSQL version output, err := exec.Command("ls", "/etc/postgresql/").CombinedOutput() if err != nil { return fmt.Errorf("could not find PostgreSQL version: %w", err) } versions := strings.Fields(string(output)) if len(versions) == 0 { return fmt.Errorf("no PostgreSQL version found in /etc/postgresql/") } version := versions[0] cmd = exec.Command("sudo", "pg_ctlcluster", version, "main", "start") if output, err := cmd.CombinedOutput(); err != nil { return fmt.Errorf("pg_ctlcluster start failed: %w\n%s", err, output) } return nil } func configurePostgres() error { // Set password for postgres user using sudo -u postgres cmd := exec.Command("sudo", "-u", "postgres", "psql", "-c", "ALTER USER postgres PASSWORD 'postgres';") if output, err := cmd.CombinedOutput(); err != nil { // This might fail if password is already set, which is fine slog.Debug("native/postgres", "set-password", string(output)) } // Update pg_hba.conf to allow password authentication // First, find the pg_hba.conf file output, err := exec.Command("sudo", "-u", "postgres", "psql", "-t", "-c", "SHOW hba_file;").CombinedOutput() if err != nil { return fmt.Errorf("could not find hba_file: %w", err) } hbaFile := strings.TrimSpace(string(output)) if hbaFile == "" { return fmt.Errorf("empty hba_file path") } // Check if we need to update pg_hba.conf catOutput, err := exec.Command("sudo", "cat", hbaFile).CombinedOutput() if err != nil { return fmt.Errorf("could not read %s: %w", hbaFile, err) } // If md5 or scram-sha-256 auth is not configured for local connections, add it content := string(catOutput) if !strings.Contains(content, "host all all 127.0.0.1/32 md5") && !strings.Contains(content, "host all all 127.0.0.1/32 scram-sha-256") { // Prepend a rule for localhost password authentication newRule := "host all all 127.0.0.1/32 md5\n" // Use sed to add the rule at the beginning (after comments) cmd := exec.Command("sudo", "bash", "-c", fmt.Sprintf(`echo '%s' | cat - %s > /tmp/pg_hba.conf.new && sudo mv /tmp/pg_hba.conf.new %s`, newRule, hbaFile, hbaFile)) if output, err := cmd.CombinedOutput(); err != nil { slog.Debug("native/postgres", "update-hba-error", string(output)) } // Reload PostgreSQL to apply changes if err := reloadPostgres(); err != nil { slog.Debug("native/postgres", "reload-error", err) } } return nil } func reloadPostgres() error { // Try systemctl reload cmd := exec.Command("sudo", "systemctl", "reload", "postgresql") if err := cmd.Run(); err == nil { return nil } // Try service reload cmd = exec.Command("sudo", "service", "postgresql", "reload") if err := cmd.Run(); err == nil { return nil } // Try pg_ctlcluster reload output, _ := exec.Command("ls", "/etc/postgresql/").CombinedOutput() versions := strings.Fields(string(output)) if len(versions) > 0 { cmd = exec.Command("sudo", "pg_ctlcluster", versions[0], "main", "reload") return cmd.Run() } return fmt.Errorf("could not reload PostgreSQL") } func waitForPostgres(ctx context.Context, uri string, timeout time.Duration) error { deadline := time.Now().Add(timeout) ticker := time.NewTicker(100 * time.Millisecond) defer ticker.Stop() var lastErr error for { select { case <-ctx.Done(): return fmt.Errorf("context cancelled: %w (last error: %v)", ctx.Err(), lastErr) case <-ticker.C: if time.Now().After(deadline) { return fmt.Errorf("timeout waiting for PostgreSQL (last error: %v)", lastErr) } conn, err := pgx.Connect(ctx, uri) if err != nil { lastErr = err slog.Debug("native/postgres", "connect-attempt", err) continue } if err := conn.Ping(ctx); err != nil { lastErr = err conn.Close(ctx) continue } conn.Close(ctx) return nil } } } ================================================ FILE: internal/sqltest/pgx.go ================================================ package sqltest import ( "context" "fmt" "math/rand" "os" "path/filepath" "testing" "time" "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" "github.com/jackc/pgx/v4" ) func init() { rand.Seed(time.Now().UnixNano()) } func PostgreSQLPgx(t *testing.T, migrations []string) (*pgx.Conn, func()) { t.Helper() pgUser := os.Getenv("PG_USER") pgHost := os.Getenv("PG_HOST") pgPort := os.Getenv("PG_PORT") pgPass := os.Getenv("PG_PASSWORD") pgDB := os.Getenv("PG_DATABASE") if pgUser == "" { pgUser = "postgres" } if pgPass == "" { pgPass = "mysecretpassword" } if pgPort == "" { pgPort = "5432" } if pgHost == "" { pgHost = "127.0.0.1" } if pgDB == "" { pgDB = "dinotest" } source := fmt.Sprintf("postgres://%s:%s@%s:%s/%s?sslmode=disable", pgUser, pgPass, pgHost, pgPort, pgDB) t.Logf("db: %s", source) db, err := pgx.Connect(context.Background(), source) if err != nil { t.Fatal(err) } // For each test, pick a new schema name at random. schema := "sqltest_postgresql_" + id() if _, err := db.Exec(context.Background(), "CREATE SCHEMA "+schema); err != nil { t.Fatal(err) } sdb, err := pgx.Connect(context.Background(), source+"&search_path="+schema) if err != nil { t.Fatal(err) } 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) } if _, err := sdb.Exec(context.Background(), string(blob)); err != nil { t.Fatalf("%s: %s", filepath.Base(f), err) } } return sdb, func() { if _, err := db.Exec(context.Background(), "DROP SCHEMA "+schema+" CASCADE"); err != nil { t.Fatal(err) } } } ================================================ FILE: internal/sqltest/postgres.go ================================================ package sqltest import ( "database/sql" "fmt" "math/rand" "os" "path/filepath" "testing" "time" "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" _ "github.com/lib/pq" ) func init() { rand.Seed(time.Now().UnixNano()) } 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) } func PostgreSQL(t *testing.T, migrations []string) (*sql.DB, func()) { t.Helper() // For each test, pick a new schema name at random. schema := "sqltest_postgresql_" + id() return CreatePostgreSQLDatabase(t, schema, true, migrations) } func CreatePostgreSQLDatabase(t *testing.T, name string, schema bool, migrations []string) (*sql.DB, func()) { t.Helper() pgUser := os.Getenv("PG_USER") pgHost := os.Getenv("PG_HOST") pgPort := os.Getenv("PG_PORT") pgPass := os.Getenv("PG_PASSWORD") pgDB := os.Getenv("PG_DATABASE") if pgUser == "" { pgUser = "postgres" } if pgPass == "" { pgPass = "mysecretpassword" } if pgPort == "" { pgPort = "5432" } if pgHost == "" { pgHost = "127.0.0.1" } if pgDB == "" { pgDB = "dinotest" } source := fmt.Sprintf("postgres://%s:%s@%s:%s/%s?sslmode=disable", pgUser, pgPass, pgHost, pgPort, pgDB) t.Logf("db: %s", source) db, err := sql.Open("postgres", source) if err != nil { t.Fatal(err) } // For each test, pick a new schema name at random. var newsource, dropQuery string if schema { if _, err := db.Exec("CREATE SCHEMA " + name); err != nil { t.Fatal(err) } newsource = source + "&search_path=" + name dropQuery = "DROP SCHEMA " + name + " CASCADE" } else { if _, err := db.Exec("CREATE DATABASE " + name); err != nil { t.Fatal(err) } newsource = fmt.Sprintf("postgres://%s:%s@%s:%s/%s?sslmode=disable", pgUser, pgPass, pgHost, pgPort, name) dropQuery = "DROP DATABASE IF EXISTS " + name + " WITH (FORCE)" } sdb, err := sql.Open("postgres", newsource) if err != nil { t.Fatal(err) } 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) } if _, err := sdb.Exec(string(blob)); err != nil { t.Fatalf("%s: %s", filepath.Base(f), err) } } return sdb, func() { if _, err := db.Exec(dropQuery); err != nil { t.Fatal(err) } db.Close() } } ================================================ FILE: internal/sqltest/sqlite.go ================================================ package sqltest import ( "database/sql" "os" "path/filepath" "testing" _ "github.com/ncruces/go-sqlite3/driver" _ "github.com/ncruces/go-sqlite3/embed" "github.com/sqlc-dev/sqlc/internal/sql/sqlpath" ) func SQLite(t *testing.T, migrations []string) (*sql.DB, func()) { t.Helper() // For each test, pick a new database name at random. source, err := os.CreateTemp("", "sqltest_sqlite_") if err != nil { t.Fatal(err) } if err := source.Close(); err != nil { t.Fatal(err) } return CreateSQLiteDatabase(t, source.Name(), migrations) } func CreateSQLiteDatabase(t *testing.T, path string, migrations []string) (*sql.DB, func()) { t.Helper() t.Logf("open %s\n", path) sdb, err := sql.Open("sqlite3", path) if err != nil { t.Fatal(err) } 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) } if _, err := sdb.Exec(string(blob)); err != nil { t.Fatalf("%s: %s", filepath.Base(f), err) } } return sdb, func() { if _, err := os.Stat(path); err == nil { os.Remove(path) } } } ================================================ FILE: internal/tools/sqlc-pg-gen/main.go ================================================ package main import ( "bytes" "context" "flag" "fmt" "go/format" "log" "os" "path/filepath" "sort" "strings" "text/template" "github.com/jackc/pgx/v4" ) // https://dba.stackexchange.com/questions/255412/how-to-select-functions-that-belong-in-a-given-extension-in-postgresql // // Extension functions are added to the public schema const extensionFuncs = ` WITH extension_funcs AS ( SELECT p.oid FROM pg_catalog.pg_extension AS e INNER JOIN pg_catalog.pg_depend AS d ON (d.refobjid = e.oid) INNER JOIN pg_catalog.pg_proc AS p ON (p.oid = d.objid) INNER JOIN pg_catalog.pg_namespace AS ne ON (ne.oid = e.extnamespace) INNER JOIN pg_catalog.pg_namespace AS np ON (np.oid = p.pronamespace) WHERE d.deptype = 'e' AND e.extname = $1 ) SELECT p.proname as name, format_type(p.prorettype, NULL), array(select format_type(unnest(p.proargtypes), NULL)), p.proargnames, p.proargnames[p.pronargs-p.pronargdefaults+1:p.pronargs], p.proargmodes::text[] FROM pg_catalog.pg_proc p JOIN extension_funcs ef ON ef.oid = p.oid WHERE pg_function_is_visible(p.oid) -- simply order all columns to keep subsequent runs stable ORDER BY 1, 2, 3, 4, 5; ` const catalogTmpl = ` // Code generated by sqlc-pg-gen. DO NOT EDIT. package {{.Pkg}} import ( "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) var funcs{{.GenFnName}} = []*catalog.Function { {{- range .Procs}} { Name: "{{.Name}}", Args: []*catalog.Argument{ {{range .Args}}{ {{- if .Name}} Name: "{{.Name}}", {{- end}} {{- if .HasDefault}} HasDefault: true, {{- end}} Type: &ast.TypeName{Name: "{{.TypeName}}"}, {{- if ne .Mode "i" }} Mode: {{ .GoMode }}, {{- end}} }, {{end}} }, ReturnType: &ast.TypeName{Name: "{{.ReturnTypeName}}"}, }, {{- end}} } func {{.GenFnName}}() *catalog.Schema { s := &catalog.Schema{Name: "{{ .SchemaName }}"} s.Funcs = funcs{{.GenFnName}} {{- if .Relations }} s.Tables = []*catalog.Table { {{- range .Relations }} { Rel: &ast.TableName{ Catalog: "{{.Catalog}}", Schema: "{{.SchemaName}}", Name: "{{.Name}}", }, Columns: []*catalog.Column{ {{- range .Columns}} { Name: "{{.Name}}", Type: ast.TypeName{Name: "{{.Type}}"}, {{- if .IsNotNull}} IsNotNull: true, {{- end}} {{- if .IsArray}} IsArray: true, {{- end}} {{- if .Length }} Length: toPointer({{ .Length }}), {{- end}} }, {{- end}} }, }, {{- end}} } {{- end }} return s } ` const loaderFuncTmpl = ` // Code generated by sqlc-pg-gen. DO NOT EDIT. package postgresql import ( "github.com/sqlc-dev/sqlc/internal/engine/postgresql/contrib" "github.com/sqlc-dev/sqlc/internal/sql/catalog" ) func loadExtension(name string) *catalog.Schema { switch name { {{- range .}} case "{{.Name}}": return contrib.{{.Func}}() {{- end}} } return nil } ` type tmplCtx struct { Pkg string GenFnName string SchemaName string Procs []Proc Relations []Relation } func main() { if err := run(context.Background()); err != nil { log.Fatal(err) } } func clean(arg string) string { arg = strings.TrimSpace(arg) arg = strings.Replace(arg, "\"any\"", "any", -1) arg = strings.Replace(arg, "\"char\"", "char", -1) arg = strings.Replace(arg, "\"timestamp\"", "char", -1) return arg } // writeFormattedGo executes `tmpl` with `data` as its context to the file `destPath` func writeFormattedGo(tmpl *template.Template, data any, destPath string) error { out := bytes.NewBuffer([]byte{}) err := tmpl.Execute(out, data) if err != nil { return err } code, err := format.Source(out.Bytes()) if err != nil { return err } err = os.WriteFile(destPath, code, 0644) if err != nil { return err } return nil } // preserveLegacyCatalogBehavior maintain previous ordering and filtering // that was manually done to the generated file pg_catalog.go. // Some of the test depend on this ordering - in particular, function lookups // where there might be multiple matching functions (due to type overloads) // Until sqlc supports "smarter" looking up of these functions, // preserveLegacyCatalogBehavior ensures there are no accidental test breakages func preserveLegacyCatalogBehavior(allProcs []Proc) []Proc { // Preserve the legacy sort order of the end-to-end tests sort.SliceStable(allProcs, func(i, j int) bool { fnA := allProcs[i] fnB := allProcs[j] if fnA.Name == "lower" && fnB.Name == "lower" && len(fnA.ArgTypes) == 1 && fnA.ArgTypes[0] == "text" { return true } if fnA.Name == "generate_series" && fnB.Name == "generate_series" && len(fnA.ArgTypes) == 2 && fnA.ArgTypes[0] == "numeric" { return true } return false }) procs := make([]Proc, 0, len(allProcs)) for _, p := range allProcs { // Skip generating pg_catalog.concat to preserve legacy behavior if p.Name == "concat" { continue } procs = append(procs, p) } return procs } func databaseURL() string { dburl := os.Getenv("DATABASE_URL") if dburl != "" { return dburl } pgUser := os.Getenv("PG_USER") pgHost := os.Getenv("PG_HOST") pgPort := os.Getenv("PG_PORT") pgPass := os.Getenv("PG_PASSWORD") pgDB := os.Getenv("PG_DATABASE") if pgUser == "" { pgUser = "postgres" } if pgPass == "" { pgPass = "mysecretpassword" } if pgPort == "" { pgPort = "5432" } if pgHost == "" { pgHost = "127.0.0.1" } if pgDB == "" { pgDB = "dinotest" } return fmt.Sprintf("postgres://%s:%s@%s:%s/%s?sslmode=disable", pgUser, pgPass, pgHost, pgPort, pgDB) } func run(ctx context.Context) error { flag.Parse() dir := flag.Arg(0) if dir == "" { dir = filepath.Join("internal", "engine", "postgresql") } tmpl, err := template.New("").Parse(catalogTmpl) if err != nil { return err } conn, err := pgx.Connect(ctx, databaseURL()) if err != nil { return err } defer conn.Close(ctx) schemas := []schemaToLoad{ { Name: "pg_catalog", GenFnName: "genPGCatalog", DestPath: filepath.Join(dir, "pg_catalog.go"), }, { Name: "information_schema", GenFnName: "genInformationSchema", DestPath: filepath.Join(dir, "information_schema.go"), }, } for _, schema := range schemas { procs, err := readProcs(ctx, conn, schema.Name) if err != nil { return err } if schema.Name == "pg_catalog" { procs = preserveLegacyCatalogBehavior(procs) } relations, err := readRelations(ctx, conn, schema.Name) if err != nil { return err } err = writeFormattedGo(tmpl, tmplCtx{ Pkg: "postgresql", SchemaName: schema.Name, GenFnName: schema.GenFnName, Procs: procs, Relations: relations, }, schema.DestPath) if err != nil { return err } } loaded := []extensionPair{} for _, extension := range extensions { name := strings.Replace(extension, "-", "_", -1) var funcName string for _, part := range strings.Split(name, "_") { funcName += strings.Title(part) } if _, err := conn.Exec(ctx, fmt.Sprintf("CREATE EXTENSION IF NOT EXISTS %q", extension)); err != nil { return fmt.Errorf("error creating %s: %s", extension, err) } rows, err := conn.Query(ctx, extensionFuncs, extension) if err != nil { return err } procs, err := scanProcs(rows) if err != nil { return err } if len(procs) == 0 { log.Printf("no functions in %s, skipping", extension) continue } // Preserve the legacy sort order of the end-to-end tests sort.SliceStable(procs, func(i, j int) bool { fnA := procs[i] fnB := procs[j] if extension == "pgcrypto" { if fnA.Name == "digest" && fnB.Name == "digest" && len(fnA.ArgTypes) == 2 && fnA.ArgTypes[0] == "text" { return true } } return false }) extensionPath := filepath.Join(dir, "contrib", name+".go") err = writeFormattedGo(tmpl, tmplCtx{ Pkg: "contrib", SchemaName: "pg_catalog", GenFnName: funcName, Procs: procs, }, extensionPath) if err != nil { return fmt.Errorf("error generating extension %s: %w", extension, err) } loaded = append(loaded, extensionPair{Name: extension, Func: funcName}) } extensionTmpl, err := template.New("").Parse(loaderFuncTmpl) if err != nil { return err } extensionLoaderPath := filepath.Join(dir, "extension.go") err = writeFormattedGo(extensionTmpl, loaded, extensionLoaderPath) if err != nil { return err } return nil } type schemaToLoad struct { // name is the name of a schema to load Name string // DestPath is the desination for the generate file DestPath string // The name of the function to generate for loading this schema GenFnName string } type extensionPair struct { Name string Func string } // https://www.postgresql.org/docs/current/contrib.html var extensions = []string{ "adminpack", "amcheck", // "auth_delay", // "auto_explain", // "bloom", "btree_gin", "btree_gist", "citext", "cube", "dblink", // "dict_int", // "dict_xsyn", "earthdistance", "file_fdw", "fuzzystrmatch", "hstore", "intagg", "intarray", "isn", "lo", "ltree", "pageinspect", // "passwordcheck", "pg_buffercache", "pg_freespacemap", "pg_prewarm", "pg_stat_statements", "pg_trgm", "pg_visibility", "pgcrypto", "pgrowlocks", "pgstattuple", "postgres_fdw", "seg", // "sepgsql", // "spi", "sslinfo", "tablefunc", "tcn", // "test_decoding", // "tsm_system_rows", // "tsm_system_time", "unaccent", "uuid-ossp", "xml2", } ================================================ FILE: internal/tools/sqlc-pg-gen/proc.go ================================================ package main import ( "context" "strings" pgx "github.com/jackc/pgx/v4" ) // https://stackoverflow.com/questions/25308765/postgresql-how-can-i-inspect-which-arguments-to-a-procedure-have-a-default-valu const catalogFuncs = ` SELECT p.proname as name, format_type(p.prorettype, NULL), array(select format_type(unnest(p.proargtypes), NULL)), p.proargnames, p.proargnames[p.pronargs-p.pronargdefaults+1:p.pronargs], p.proargmodes::text[] FROM pg_catalog.pg_proc p LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace WHERE n.nspname::text = $1 AND pg_function_is_visible(p.oid) -- simply order all columns to keep subsequent runs stable ORDER BY 1, 2, 3, 4, 5; ` type Proc struct { Name string ReturnType string ArgTypes []string ArgNames []string HasDefault []string ArgModes []string } func (p *Proc) ReturnTypeName() string { return clean(p.ReturnType) } func (p *Proc) Args() []Arg { var args []Arg defaults := map[string]bool{} for _, name := range p.HasDefault { defaults[name] = true } for i, argType := range p.ArgTypes { mode := "i" name := "" if i < len(p.ArgModes) { mode = p.ArgModes[i] } if i < len(p.ArgNames) { name = p.ArgNames[i] } args = append(args, Arg{ Name: name, Type: argType, Mode: mode, HasDefault: defaults[name], }) } // Some manual changes until https://github.com/sqlc-dev/sqlc/pull/1748 // can be completely implmented if p.Name == "mode" { return nil } if p.Name == "percentile_cont" && len(args) == 2 { args = args[:1] } if p.Name == "percentile_disc" && len(args) == 2 { args = args[:1] } return args } type Arg struct { Name string Mode string Type string HasDefault bool } func (a *Arg) TypeName() string { return clean(a.Type) } // GoMode returns Go's representation of the arguemnt's mode func (a *Arg) GoMode() string { switch a.Mode { case "", "i": return "ast.FuncParamIn" case "o": return "ast.FuncParamOut" case "b": return "ast.FuncParamInOut" case "v": return "ast.FuncParamVariadic" case "t": return "ast.FuncParamTable" } return "" } func scanProcs(rows pgx.Rows) ([]Proc, error) { defer rows.Close() // Iterate through the result set var procs []Proc for rows.Next() { var p Proc err := rows.Scan( &p.Name, &p.ReturnType, &p.ArgTypes, &p.ArgNames, &p.HasDefault, &p.ArgModes, ) if err != nil { return nil, err } // TODO: Filter these out in SQL if strings.HasPrefix(p.ReturnType, "SETOF") { continue } // The internal pseudo-type is used to declare functions that are meant // only to be called internally by the database system, and not by // direct invocation in an SQL query. If a function has at least one // internal-type argument then it cannot be called from SQL. To // preserve the type safety of this restriction it is important to // follow this coding rule: do not create any function that is declared // to return internal unless it has at least one internal argument // // https://www.postgresql.org/docs/current/datatype-pseudo.html var skip bool for i := range p.ArgTypes { if p.ArgTypes[i] == "internal" { skip = true } } if skip { continue } if p.ReturnType == "internal" { continue } procs = append(procs, p) } return procs, rows.Err() } func readProcs(ctx context.Context, conn *pgx.Conn, schemaName string) ([]Proc, error) { rows, err := conn.Query(ctx, catalogFuncs, schemaName) if err != nil { return nil, err } return scanProcs(rows) } ================================================ FILE: internal/tools/sqlc-pg-gen/relation.go ================================================ package main import ( "context" pgx "github.com/jackc/pgx/v4" ) // Relations are the relations available in pg_tables and pg_views // such as pg_catalog.pg_timezone_names const relationQuery = ` with relations as ( select schemaname, tablename as name from pg_catalog.pg_tables UNION ALL select schemaname, viewname as name from pg_catalog.pg_views ) select relations.schemaname, relations.name as tablename, pg_attribute.attname as column_name, attnotnull as column_notnull, column_type.typname as column_type, nullif(column_type.typlen, -1) as column_length, column_type.typcategory = 'A' as column_isarray from relations inner join pg_catalog.pg_class on pg_class.relname = relations.name left join pg_catalog.pg_attribute on pg_attribute.attrelid = pg_class.oid inner join pg_catalog.pg_type column_type on pg_attribute.atttypid = column_type.oid where relations.schemaname = $1 -- Make sure these columns are always generated in the same order -- so that the output is stable order by relations.schemaname ASC, relations.name ASC, pg_attribute.attnum ASC ` type Relation struct { Catalog string SchemaName string Name string Columns []RelationColumn } type RelationColumn struct { Name string Type string IsNotNull bool IsArray bool Length *int } func scanRelations(rows pgx.Rows) ([]Relation, error) { defer rows.Close() // Iterate through the result set var relations []Relation var prevRel *Relation for rows.Next() { var schemaName string var tableName string var columnName string var columnNotNull bool var columnType string var columnLength *int var columnIsArray bool err := rows.Scan( &schemaName, &tableName, &columnName, &columnNotNull, &columnType, &columnLength, &columnIsArray, ) if err != nil { return nil, err } if prevRel == nil || tableName != prevRel.Name { // We are on the same table, just keep adding columns r := Relation{ Catalog: "pg_catalog", SchemaName: schemaName, Name: tableName, } relations = append(relations, r) prevRel = &relations[len(relations)-1] } prevRel.Columns = append(prevRel.Columns, RelationColumn{ Name: columnName, Type: columnType, IsNotNull: columnNotNull, IsArray: columnIsArray, Length: columnLength, }) } return relations, rows.Err() } func readRelations(ctx context.Context, conn *pgx.Conn, schemaName string) ([]Relation, error) { rows, err := conn.Query(ctx, relationQuery, schemaName) if err != nil { return nil, err } return scanRelations(rows) } ================================================ FILE: internal/tracer/trace.go ================================================ package tracer import ( "context" "fmt" "os" "runtime/trace" "github.com/sqlc-dev/sqlc/internal/debug" ) // Start starts Go's runtime tracing facility. // Traces will be written to the file named by [debug.Debug.Trace]. // It also starts a new [*trace.Task] that will be stopped when the cleanup is called. func Start(base context.Context) (_ context.Context, cleanup func(), _ error) { f, err := os.Create(debug.Debug.Trace) if err != nil { return base, cleanup, fmt.Errorf("failed to create trace output file: %v", err) } if err := trace.Start(f); err != nil { return base, cleanup, fmt.Errorf("failed to start trace: %v", err) } ctx, task := trace.NewTask(base, "sqlc") return ctx, func() { defer f.Close() defer trace.Stop() defer task.End() }, nil } ================================================ FILE: internal/vet/vet.pb.go ================================================ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.30.0 // protoc (unknown) // source: vet/vet.proto package vet import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type Parameter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` } func (x *Parameter) Reset() { *x = Parameter{} if protoimpl.UnsafeEnabled { mi := &file_vet_vet_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Parameter) String() string { return protoimpl.X.MessageStringOf(x) } func (*Parameter) ProtoMessage() {} func (x *Parameter) ProtoReflect() protoreflect.Message { mi := &file_vet_vet_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Parameter.ProtoReflect.Descriptor instead. func (*Parameter) Descriptor() ([]byte, []int) { return file_vet_vet_proto_rawDescGZIP(), []int{0} } func (x *Parameter) GetNumber() int32 { if x != nil { return x.Number } return 0 } type Config 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"` } func (x *Config) Reset() { *x = Config{} if protoimpl.UnsafeEnabled { mi := &file_vet_vet_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Config) String() string { return protoimpl.X.MessageStringOf(x) } func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { mi := &file_vet_vet_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 Config.ProtoReflect.Descriptor instead. func (*Config) Descriptor() ([]byte, []int) { return file_vet_vet_proto_rawDescGZIP(), []int{1} } func (x *Config) GetVersion() string { if x != nil { return x.Version } return "" } func (x *Config) GetEngine() string { if x != nil { return x.Engine } return "" } func (x *Config) GetSchema() []string { if x != nil { return x.Schema } return nil } func (x *Config) GetQueries() []string { if x != nil { return x.Queries } return nil } type Query struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Cmd string `protobuf:"bytes,3,opt,name=cmd,proto3" json:"cmd,omitempty"` Params []*Parameter `protobuf:"bytes,4,rep,name=params,json=parameters,proto3" json:"params,omitempty"` } func (x *Query) Reset() { *x = Query{} if protoimpl.UnsafeEnabled { mi := &file_vet_vet_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Query) String() string { return protoimpl.X.MessageStringOf(x) } func (*Query) ProtoMessage() {} func (x *Query) ProtoReflect() protoreflect.Message { mi := &file_vet_vet_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 Query.ProtoReflect.Descriptor instead. func (*Query) Descriptor() ([]byte, []int) { return file_vet_vet_proto_rawDescGZIP(), []int{2} } func (x *Query) GetSql() string { if x != nil { return x.Sql } return "" } func (x *Query) GetName() string { if x != nil { return x.Name } return "" } func (x *Query) GetCmd() string { if x != nil { return x.Cmd } return "" } func (x *Query) GetParams() []*Parameter { if x != nil { return x.Params } return nil } type PostgreSQL struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Explain *PostgreSQLExplain `protobuf:"bytes,1,opt,name=explain,proto3" json:"explain,omitempty"` } func (x *PostgreSQL) Reset() { *x = PostgreSQL{} if protoimpl.UnsafeEnabled { mi := &file_vet_vet_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PostgreSQL) String() string { return protoimpl.X.MessageStringOf(x) } func (*PostgreSQL) ProtoMessage() {} func (x *PostgreSQL) ProtoReflect() protoreflect.Message { mi := &file_vet_vet_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use PostgreSQL.ProtoReflect.Descriptor instead. func (*PostgreSQL) Descriptor() ([]byte, []int) { return file_vet_vet_proto_rawDescGZIP(), []int{3} } func (x *PostgreSQL) GetExplain() *PostgreSQLExplain { if x != nil { return x.Explain } return nil } type PostgreSQLExplain struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Plan *PostgreSQLExplain_Plan `protobuf:"bytes,1,opt,name=plan,json=Plan,proto3" json:"plan,omitempty"` Settings map[string]string `protobuf:"bytes,2,rep,name=settings,json=Settings,proto3" json:"settings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` Planning *PostgreSQLExplain_Planning `protobuf:"bytes,3,opt,name=planning,json=Planning,proto3" json:"planning,omitempty"` } func (x *PostgreSQLExplain) Reset() { *x = PostgreSQLExplain{} if protoimpl.UnsafeEnabled { mi := &file_vet_vet_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PostgreSQLExplain) String() string { return protoimpl.X.MessageStringOf(x) } func (*PostgreSQLExplain) ProtoMessage() {} func (x *PostgreSQLExplain) ProtoReflect() protoreflect.Message { mi := &file_vet_vet_proto_msgTypes[4] 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 PostgreSQLExplain.ProtoReflect.Descriptor instead. func (*PostgreSQLExplain) Descriptor() ([]byte, []int) { return file_vet_vet_proto_rawDescGZIP(), []int{4} } func (x *PostgreSQLExplain) GetPlan() *PostgreSQLExplain_Plan { if x != nil { return x.Plan } return nil } func (x *PostgreSQLExplain) GetSettings() map[string]string { if x != nil { return x.Settings } return nil } func (x *PostgreSQLExplain) GetPlanning() *PostgreSQLExplain_Planning { if x != nil { return x.Planning } return nil } type MySQL struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Explain *MySQLExplain `protobuf:"bytes,1,opt,name=explain,proto3" json:"explain,omitempty"` } func (x *MySQL) Reset() { *x = MySQL{} if protoimpl.UnsafeEnabled { mi := &file_vet_vet_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MySQL) String() string { return protoimpl.X.MessageStringOf(x) } func (*MySQL) ProtoMessage() {} func (x *MySQL) ProtoReflect() protoreflect.Message { mi := &file_vet_vet_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 MySQL.ProtoReflect.Descriptor instead. func (*MySQL) Descriptor() ([]byte, []int) { return file_vet_vet_proto_rawDescGZIP(), []int{5} } func (x *MySQL) GetExplain() *MySQLExplain { if x != nil { return x.Explain } return nil } type MySQLExplain struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields QueryBlock *MySQLExplain_QueryBlock `protobuf:"bytes,1,opt,name=query_block,json=queryBlock,proto3" json:"query_block,omitempty"` } func (x *MySQLExplain) Reset() { *x = MySQLExplain{} if protoimpl.UnsafeEnabled { mi := &file_vet_vet_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MySQLExplain) String() string { return protoimpl.X.MessageStringOf(x) } func (*MySQLExplain) ProtoMessage() {} func (x *MySQLExplain) ProtoReflect() protoreflect.Message { mi := &file_vet_vet_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use MySQLExplain.ProtoReflect.Descriptor instead. func (*MySQLExplain) Descriptor() ([]byte, []int) { return file_vet_vet_proto_rawDescGZIP(), []int{6} } func (x *MySQLExplain) GetQueryBlock() *MySQLExplain_QueryBlock { if x != nil { return x.QueryBlock } return nil } type PostgreSQLExplain_Plan struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields NodeType string `protobuf:"bytes,1,opt,name=node_type,json=Node Type,proto3" json:"node_type,omitempty"` ParentRelationship string `protobuf:"bytes,2,opt,name=parent_relationship,json=Parent Relationship,proto3" json:"parent_relationship,omitempty"` RelationName string `protobuf:"bytes,3,opt,name=relation_name,json=Relation Name,proto3" json:"relation_name,omitempty"` Schema string `protobuf:"bytes,4,opt,name=schema,json=Schema,proto3" json:"schema,omitempty"` Alias string `protobuf:"bytes,5,opt,name=alias,json=Alias,proto3" json:"alias,omitempty"` ParallelAware bool `protobuf:"varint,6,opt,name=parallel_aware,json=Parallel Aware,proto3" json:"parallel_aware,omitempty"` AsyncCapable bool `protobuf:"varint,7,opt,name=async_capable,json=Async Capable,proto3" json:"async_capable,omitempty"` StartupCost float32 `protobuf:"fixed32,8,opt,name=startup_cost,json=Startup Cost,proto3" json:"startup_cost,omitempty"` TotalCost float32 `protobuf:"fixed32,9,opt,name=total_cost,json=Total Cost,proto3" json:"total_cost,omitempty"` PlanRows uint64 `protobuf:"varint,10,opt,name=plan_rows,json=Plan Rows,proto3" json:"plan_rows,omitempty"` PlanWidth uint64 `protobuf:"varint,11,opt,name=plan_width,json=Plan Width,proto3" json:"plan_width,omitempty"` Output []string `protobuf:"bytes,12,rep,name=output,json=Output,proto3" json:"output,omitempty"` Plans []*PostgreSQLExplain_Plan `protobuf:"bytes,13,rep,name=plans,json=Plans,proto3" json:"plans,omitempty"` // Embedded "Blocks" fields SharedHitBlocks uint64 `protobuf:"varint,14,opt,name=shared_hit_blocks,json=Shared Hit Blocks,proto3" json:"shared_hit_blocks,omitempty"` SharedReadBlocks uint64 `protobuf:"varint,15,opt,name=shared_read_blocks,json=Shared Read Blocks,proto3" json:"shared_read_blocks,omitempty"` SharedDirtiedBlocks uint64 `protobuf:"varint,16,opt,name=shared_dirtied_blocks,json=Shared Dirtied Blocks,proto3" json:"shared_dirtied_blocks,omitempty"` SharedWrittenBlocks uint64 `protobuf:"varint,17,opt,name=shared_written_blocks,json=Shared Written Blocks,proto3" json:"shared_written_blocks,omitempty"` LocalHitBlocks uint64 `protobuf:"varint,18,opt,name=local_hit_blocks,json=Local Hit Blocks,proto3" json:"local_hit_blocks,omitempty"` LocalReadBlocks uint64 `protobuf:"varint,19,opt,name=local_read_blocks,json=Local Read Blocks,proto3" json:"local_read_blocks,omitempty"` LocalDirtiedBlocks uint64 `protobuf:"varint,20,opt,name=local_dirtied_blocks,json=Local Dirtied Blocks,proto3" json:"local_dirtied_blocks,omitempty"` LocalWrittenBlocks uint64 `protobuf:"varint,21,opt,name=local_written_blocks,json=Local Written Blocks,proto3" json:"local_written_blocks,omitempty"` TempReadBlocks uint64 `protobuf:"varint,22,opt,name=temp_read_blocks,json=Temp Read Blocks,proto3" json:"temp_read_blocks,omitempty"` TempWrittenBlocks uint64 `protobuf:"varint,23,opt,name=temp_written_blocks,json=Temp Written Blocks,proto3" json:"temp_written_blocks,omitempty"` // "Node Type": "Sort" fields SortKey []string `protobuf:"bytes,24,rep,name=sort_key,json=Sort Key,proto3" json:"sort_key,omitempty"` // "Node Type": "Hash Join" fields JoinType string `protobuf:"bytes,25,opt,name=join_type,json=Join Type,proto3" json:"join_type,omitempty"` InnerUnique bool `protobuf:"varint,26,opt,name=inner_unique,json=Inner Unique,proto3" json:"inner_unique,omitempty"` HashCond string `protobuf:"bytes,27,opt,name=hash_cond,json=Hash Cond,proto3" json:"hash_cond,omitempty"` // "Node Type": "Index Scan" fields IndexName string `protobuf:"bytes,28,opt,name=index_name,json=Index Name,proto3" json:"index_name,omitempty"` ScanDirection string `protobuf:"bytes,29,opt,name=scan_direction,json=Scan Direction,proto3" json:"scan_direction,omitempty"` IndexCond string `protobuf:"bytes,30,opt,name=index_cond,json=Index Cond,proto3" json:"index_cond,omitempty"` } func (x *PostgreSQLExplain_Plan) Reset() { *x = PostgreSQLExplain_Plan{} if protoimpl.UnsafeEnabled { mi := &file_vet_vet_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PostgreSQLExplain_Plan) String() string { return protoimpl.X.MessageStringOf(x) } func (*PostgreSQLExplain_Plan) ProtoMessage() {} func (x *PostgreSQLExplain_Plan) ProtoReflect() protoreflect.Message { mi := &file_vet_vet_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 PostgreSQLExplain_Plan.ProtoReflect.Descriptor instead. func (*PostgreSQLExplain_Plan) Descriptor() ([]byte, []int) { return file_vet_vet_proto_rawDescGZIP(), []int{4, 1} } func (x *PostgreSQLExplain_Plan) GetNodeType() string { if x != nil { return x.NodeType } return "" } func (x *PostgreSQLExplain_Plan) GetParentRelationship() string { if x != nil { return x.ParentRelationship } return "" } func (x *PostgreSQLExplain_Plan) GetRelationName() string { if x != nil { return x.RelationName } return "" } func (x *PostgreSQLExplain_Plan) GetSchema() string { if x != nil { return x.Schema } return "" } func (x *PostgreSQLExplain_Plan) GetAlias() string { if x != nil { return x.Alias } return "" } func (x *PostgreSQLExplain_Plan) GetParallelAware() bool { if x != nil { return x.ParallelAware } return false } func (x *PostgreSQLExplain_Plan) GetAsyncCapable() bool { if x != nil { return x.AsyncCapable } return false } func (x *PostgreSQLExplain_Plan) GetStartupCost() float32 { if x != nil { return x.StartupCost } return 0 } func (x *PostgreSQLExplain_Plan) GetTotalCost() float32 { if x != nil { return x.TotalCost } return 0 } func (x *PostgreSQLExplain_Plan) GetPlanRows() uint64 { if x != nil { return x.PlanRows } return 0 } func (x *PostgreSQLExplain_Plan) GetPlanWidth() uint64 { if x != nil { return x.PlanWidth } return 0 } func (x *PostgreSQLExplain_Plan) GetOutput() []string { if x != nil { return x.Output } return nil } func (x *PostgreSQLExplain_Plan) GetPlans() []*PostgreSQLExplain_Plan { if x != nil { return x.Plans } return nil } func (x *PostgreSQLExplain_Plan) GetSharedHitBlocks() uint64 { if x != nil { return x.SharedHitBlocks } return 0 } func (x *PostgreSQLExplain_Plan) GetSharedReadBlocks() uint64 { if x != nil { return x.SharedReadBlocks } return 0 } func (x *PostgreSQLExplain_Plan) GetSharedDirtiedBlocks() uint64 { if x != nil { return x.SharedDirtiedBlocks } return 0 } func (x *PostgreSQLExplain_Plan) GetSharedWrittenBlocks() uint64 { if x != nil { return x.SharedWrittenBlocks } return 0 } func (x *PostgreSQLExplain_Plan) GetLocalHitBlocks() uint64 { if x != nil { return x.LocalHitBlocks } return 0 } func (x *PostgreSQLExplain_Plan) GetLocalReadBlocks() uint64 { if x != nil { return x.LocalReadBlocks } return 0 } func (x *PostgreSQLExplain_Plan) GetLocalDirtiedBlocks() uint64 { if x != nil { return x.LocalDirtiedBlocks } return 0 } func (x *PostgreSQLExplain_Plan) GetLocalWrittenBlocks() uint64 { if x != nil { return x.LocalWrittenBlocks } return 0 } func (x *PostgreSQLExplain_Plan) GetTempReadBlocks() uint64 { if x != nil { return x.TempReadBlocks } return 0 } func (x *PostgreSQLExplain_Plan) GetTempWrittenBlocks() uint64 { if x != nil { return x.TempWrittenBlocks } return 0 } func (x *PostgreSQLExplain_Plan) GetSortKey() []string { if x != nil { return x.SortKey } return nil } func (x *PostgreSQLExplain_Plan) GetJoinType() string { if x != nil { return x.JoinType } return "" } func (x *PostgreSQLExplain_Plan) GetInnerUnique() bool { if x != nil { return x.InnerUnique } return false } func (x *PostgreSQLExplain_Plan) GetHashCond() string { if x != nil { return x.HashCond } return "" } func (x *PostgreSQLExplain_Plan) GetIndexName() string { if x != nil { return x.IndexName } return "" } func (x *PostgreSQLExplain_Plan) GetScanDirection() string { if x != nil { return x.ScanDirection } return "" } func (x *PostgreSQLExplain_Plan) GetIndexCond() string { if x != nil { return x.IndexCond } return "" } type PostgreSQLExplain_Planning struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields SharedHitBlocks uint64 `protobuf:"varint,1,opt,name=shared_hit_blocks,json=Shared Hit Blocks,proto3" json:"shared_hit_blocks,omitempty"` SharedReadBlocks uint64 `protobuf:"varint,2,opt,name=shared_read_blocks,json=Shared Read Blocks,proto3" json:"shared_read_blocks,omitempty"` SharedDirtiedBlocks uint64 `protobuf:"varint,3,opt,name=shared_dirtied_blocks,json=Shared Dirtied Blocks,proto3" json:"shared_dirtied_blocks,omitempty"` SharedWrittenBlocks uint64 `protobuf:"varint,4,opt,name=shared_written_blocks,json=Shared Written Blocks,proto3" json:"shared_written_blocks,omitempty"` LocalHitBlocks uint64 `protobuf:"varint,5,opt,name=local_hit_blocks,json=Local Hit Blocks,proto3" json:"local_hit_blocks,omitempty"` LocalReadBlocks uint64 `protobuf:"varint,6,opt,name=local_read_blocks,json=Local Read Blocks,proto3" json:"local_read_blocks,omitempty"` LocalDirtiedBlocks uint64 `protobuf:"varint,7,opt,name=local_dirtied_blocks,json=Local Dirtied Blocks,proto3" json:"local_dirtied_blocks,omitempty"` LocalWrittenBlocks uint64 `protobuf:"varint,8,opt,name=local_written_blocks,json=Local Written Blocks,proto3" json:"local_written_blocks,omitempty"` TempReadBlocks uint64 `protobuf:"varint,9,opt,name=temp_read_blocks,json=Temp Read Blocks,proto3" json:"temp_read_blocks,omitempty"` TempWrittenBlocks uint64 `protobuf:"varint,10,opt,name=temp_written_blocks,json=Temp Written Blocks,proto3" json:"temp_written_blocks,omitempty"` } func (x *PostgreSQLExplain_Planning) Reset() { *x = PostgreSQLExplain_Planning{} if protoimpl.UnsafeEnabled { mi := &file_vet_vet_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *PostgreSQLExplain_Planning) String() string { return protoimpl.X.MessageStringOf(x) } func (*PostgreSQLExplain_Planning) ProtoMessage() {} func (x *PostgreSQLExplain_Planning) ProtoReflect() protoreflect.Message { mi := &file_vet_vet_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 PostgreSQLExplain_Planning.ProtoReflect.Descriptor instead. func (*PostgreSQLExplain_Planning) Descriptor() ([]byte, []int) { return file_vet_vet_proto_rawDescGZIP(), []int{4, 2} } func (x *PostgreSQLExplain_Planning) GetSharedHitBlocks() uint64 { if x != nil { return x.SharedHitBlocks } return 0 } func (x *PostgreSQLExplain_Planning) GetSharedReadBlocks() uint64 { if x != nil { return x.SharedReadBlocks } return 0 } func (x *PostgreSQLExplain_Planning) GetSharedDirtiedBlocks() uint64 { if x != nil { return x.SharedDirtiedBlocks } return 0 } func (x *PostgreSQLExplain_Planning) GetSharedWrittenBlocks() uint64 { if x != nil { return x.SharedWrittenBlocks } return 0 } func (x *PostgreSQLExplain_Planning) GetLocalHitBlocks() uint64 { if x != nil { return x.LocalHitBlocks } return 0 } func (x *PostgreSQLExplain_Planning) GetLocalReadBlocks() uint64 { if x != nil { return x.LocalReadBlocks } return 0 } func (x *PostgreSQLExplain_Planning) GetLocalDirtiedBlocks() uint64 { if x != nil { return x.LocalDirtiedBlocks } return 0 } func (x *PostgreSQLExplain_Planning) GetLocalWrittenBlocks() uint64 { if x != nil { return x.LocalWrittenBlocks } return 0 } func (x *PostgreSQLExplain_Planning) GetTempReadBlocks() uint64 { if x != nil { return x.TempReadBlocks } return 0 } func (x *PostgreSQLExplain_Planning) GetTempWrittenBlocks() uint64 { if x != nil { return x.TempWrittenBlocks } return 0 } type MySQLExplain_QueryBlock struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields SelectId uint64 `protobuf:"varint,1,opt,name=select_id,json=selectId,proto3" json:"select_id,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` CostInfo map[string]string `protobuf:"bytes,3,rep,name=cost_info,json=costInfo,proto3" json:"cost_info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` Table *MySQLExplain_Table `protobuf:"bytes,4,opt,name=table,proto3" json:"table,omitempty"` OrderingOperation *MySQLExplain_OrderingOperation `protobuf:"bytes,5,opt,name=ordering_operation,json=orderingOperation,proto3" json:"ordering_operation,omitempty"` NestedLoop []*MySQLExplain_NestedLoopObj `protobuf:"bytes,6,rep,name=nested_loop,json=nestedLoop,proto3" json:"nested_loop,omitempty"` } func (x *MySQLExplain_QueryBlock) Reset() { *x = MySQLExplain_QueryBlock{} if protoimpl.UnsafeEnabled { mi := &file_vet_vet_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MySQLExplain_QueryBlock) String() string { return protoimpl.X.MessageStringOf(x) } func (*MySQLExplain_QueryBlock) ProtoMessage() {} func (x *MySQLExplain_QueryBlock) ProtoReflect() protoreflect.Message { mi := &file_vet_vet_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 MySQLExplain_QueryBlock.ProtoReflect.Descriptor instead. func (*MySQLExplain_QueryBlock) Descriptor() ([]byte, []int) { return file_vet_vet_proto_rawDescGZIP(), []int{6, 0} } func (x *MySQLExplain_QueryBlock) GetSelectId() uint64 { if x != nil { return x.SelectId } return 0 } func (x *MySQLExplain_QueryBlock) GetMessage() string { if x != nil { return x.Message } return "" } func (x *MySQLExplain_QueryBlock) GetCostInfo() map[string]string { if x != nil { return x.CostInfo } return nil } func (x *MySQLExplain_QueryBlock) GetTable() *MySQLExplain_Table { if x != nil { return x.Table } return nil } func (x *MySQLExplain_QueryBlock) GetOrderingOperation() *MySQLExplain_OrderingOperation { if x != nil { return x.OrderingOperation } return nil } func (x *MySQLExplain_QueryBlock) GetNestedLoop() []*MySQLExplain_NestedLoopObj { if x != nil { return x.NestedLoop } return nil } type MySQLExplain_Table struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields TableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` AccessType string `protobuf:"bytes,2,opt,name=access_type,json=accessType,proto3" json:"access_type,omitempty"` RowsExaminedPerScan uint64 `protobuf:"varint,3,opt,name=rows_examined_per_scan,json=rowsExaminedPerScan,proto3" json:"rows_examined_per_scan,omitempty"` RowsProducedPerJoin uint64 `protobuf:"varint,4,opt,name=rows_produced_per_join,json=rowsProducedPerJoin,proto3" json:"rows_produced_per_join,omitempty"` Filtered string `protobuf:"bytes,5,opt,name=filtered,proto3" json:"filtered,omitempty"` CostInfo map[string]string `protobuf:"bytes,6,rep,name=cost_info,json=costInfo,proto3" json:"cost_info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` UsedColumns []string `protobuf:"bytes,7,rep,name=used_columns,json=usedColumns,proto3" json:"used_columns,omitempty"` Insert bool `protobuf:"varint,8,opt,name=insert,proto3" json:"insert,omitempty"` PossibleKeys []string `protobuf:"bytes,9,rep,name=possible_keys,json=possibleKeys,proto3" json:"possible_keys,omitempty"` Key string `protobuf:"bytes,10,opt,name=key,proto3" json:"key,omitempty"` UsedKeyParts []string `protobuf:"bytes,11,rep,name=used_key_parts,json=usedKeyParts,proto3" json:"used_key_parts,omitempty"` KeyLength string `protobuf:"bytes,12,opt,name=key_length,json=keyLength,proto3" json:"key_length,omitempty"` Ref []string `protobuf:"bytes,13,rep,name=ref,proto3" json:"ref,omitempty"` } func (x *MySQLExplain_Table) Reset() { *x = MySQLExplain_Table{} if protoimpl.UnsafeEnabled { mi := &file_vet_vet_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MySQLExplain_Table) String() string { return protoimpl.X.MessageStringOf(x) } func (*MySQLExplain_Table) ProtoMessage() {} func (x *MySQLExplain_Table) ProtoReflect() protoreflect.Message { mi := &file_vet_vet_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 MySQLExplain_Table.ProtoReflect.Descriptor instead. func (*MySQLExplain_Table) Descriptor() ([]byte, []int) { return file_vet_vet_proto_rawDescGZIP(), []int{6, 1} } func (x *MySQLExplain_Table) GetTableName() string { if x != nil { return x.TableName } return "" } func (x *MySQLExplain_Table) GetAccessType() string { if x != nil { return x.AccessType } return "" } func (x *MySQLExplain_Table) GetRowsExaminedPerScan() uint64 { if x != nil { return x.RowsExaminedPerScan } return 0 } func (x *MySQLExplain_Table) GetRowsProducedPerJoin() uint64 { if x != nil { return x.RowsProducedPerJoin } return 0 } func (x *MySQLExplain_Table) GetFiltered() string { if x != nil { return x.Filtered } return "" } func (x *MySQLExplain_Table) GetCostInfo() map[string]string { if x != nil { return x.CostInfo } return nil } func (x *MySQLExplain_Table) GetUsedColumns() []string { if x != nil { return x.UsedColumns } return nil } func (x *MySQLExplain_Table) GetInsert() bool { if x != nil { return x.Insert } return false } func (x *MySQLExplain_Table) GetPossibleKeys() []string { if x != nil { return x.PossibleKeys } return nil } func (x *MySQLExplain_Table) GetKey() string { if x != nil { return x.Key } return "" } func (x *MySQLExplain_Table) GetUsedKeyParts() []string { if x != nil { return x.UsedKeyParts } return nil } func (x *MySQLExplain_Table) GetKeyLength() string { if x != nil { return x.KeyLength } return "" } func (x *MySQLExplain_Table) GetRef() []string { if x != nil { return x.Ref } return nil } type MySQLExplain_NestedLoopObj struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Table *MySQLExplain_Table `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` } func (x *MySQLExplain_NestedLoopObj) Reset() { *x = MySQLExplain_NestedLoopObj{} if protoimpl.UnsafeEnabled { mi := &file_vet_vet_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MySQLExplain_NestedLoopObj) String() string { return protoimpl.X.MessageStringOf(x) } func (*MySQLExplain_NestedLoopObj) ProtoMessage() {} func (x *MySQLExplain_NestedLoopObj) ProtoReflect() protoreflect.Message { mi := &file_vet_vet_proto_msgTypes[12] 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 MySQLExplain_NestedLoopObj.ProtoReflect.Descriptor instead. func (*MySQLExplain_NestedLoopObj) Descriptor() ([]byte, []int) { return file_vet_vet_proto_rawDescGZIP(), []int{6, 2} } func (x *MySQLExplain_NestedLoopObj) GetTable() *MySQLExplain_Table { if x != nil { return x.Table } return nil } type MySQLExplain_OrderingOperation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields UsingFilesort bool `protobuf:"varint,1,opt,name=using_filesort,json=usingFilesort,proto3" json:"using_filesort,omitempty"` CostInfo map[string]string `protobuf:"bytes,2,rep,name=cost_info,json=costInfo,proto3" json:"cost_info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` Table *MySQLExplain_Table `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"` NestedLoop []*MySQLExplain_NestedLoopObj `protobuf:"bytes,4,rep,name=nested_loop,json=nestedLoop,proto3" json:"nested_loop,omitempty"` } func (x *MySQLExplain_OrderingOperation) Reset() { *x = MySQLExplain_OrderingOperation{} if protoimpl.UnsafeEnabled { mi := &file_vet_vet_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *MySQLExplain_OrderingOperation) String() string { return protoimpl.X.MessageStringOf(x) } func (*MySQLExplain_OrderingOperation) ProtoMessage() {} func (x *MySQLExplain_OrderingOperation) ProtoReflect() protoreflect.Message { mi := &file_vet_vet_proto_msgTypes[13] 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 MySQLExplain_OrderingOperation.ProtoReflect.Descriptor instead. func (*MySQLExplain_OrderingOperation) Descriptor() ([]byte, []int) { return file_vet_vet_proto_rawDescGZIP(), []int{6, 3} } func (x *MySQLExplain_OrderingOperation) GetUsingFilesort() bool { if x != nil { return x.UsingFilesort } return false } func (x *MySQLExplain_OrderingOperation) GetCostInfo() map[string]string { if x != nil { return x.CostInfo } return nil } func (x *MySQLExplain_OrderingOperation) GetTable() *MySQLExplain_Table { if x != nil { return x.Table } return nil } func (x *MySQLExplain_OrderingOperation) GetNestedLoop() []*MySQLExplain_NestedLoopObj { if x != nil { return x.NestedLoop } return nil } var File_vet_vet_proto protoreflect.FileDescriptor var file_vet_vet_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x76, 0x65, 0x74, 0x2f, 0x76, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x76, 0x65, 0x74, 0x22, 0x23, 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, 0x22, 0x6c, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0x22, 0x6b, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x71, 0x6c, 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, 0x2a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3e, 0x0a, 0x0a, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x12, 0x30, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x22, 0x8d, 0x0f, 0x0a, 0x11, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x2f, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x04, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x40, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3b, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x1a, 0x3b, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 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, 0x1a, 0x93, 0x09, 0x0a, 0x04, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x20, 0x54, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x5f, 0x61, 0x77, 0x61, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x50, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x20, 0x41, 0x77, 0x61, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x20, 0x43, 0x61, 0x70, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x20, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x20, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x50, 0x6c, 0x61, 0x6e, 0x20, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x50, 0x6c, 0x61, 0x6e, 0x20, 0x57, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x05, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x68, 0x69, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x48, 0x69, 0x74, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x52, 0x65, 0x61, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x44, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x68, 0x69, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x48, 0x69, 0x74, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x52, 0x65, 0x61, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x44, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x54, 0x65, 0x6d, 0x70, 0x20, 0x52, 0x65, 0x61, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x54, 0x65, 0x6d, 0x70, 0x20, 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x18, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x53, 0x6f, 0x72, 0x74, 0x20, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4a, 0x6f, 0x69, 0x6e, 0x20, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x20, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x48, 0x61, 0x73, 0x68, 0x20, 0x43, 0x6f, 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x61, 0x6e, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x53, 0x63, 0x61, 0x6e, 0x20, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x43, 0x6f, 0x6e, 0x64, 0x1a, 0xf4, 0x03, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x68, 0x69, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x48, 0x69, 0x74, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x52, 0x65, 0x61, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x44, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x68, 0x69, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x48, 0x69, 0x74, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x52, 0x65, 0x61, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x64, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x44, 0x69, 0x72, 0x74, 0x69, 0x65, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x54, 0x65, 0x6d, 0x70, 0x20, 0x52, 0x65, 0x61, 0x64, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x54, 0x65, 0x6d, 0x70, 0x20, 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x34, 0x0a, 0x05, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x12, 0x2b, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x22, 0xf3, 0x0a, 0x0a, 0x0c, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x3d, 0x0a, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x8e, 0x03, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x47, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x52, 0x0a, 0x12, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x52, 0x0a, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4c, 0x6f, 0x6f, 0x70, 0x1a, 0x3b, 0x0a, 0x0d, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 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, 0x1a, 0x97, 0x04, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x50, 0x65, 0x72, 0x53, 0x63, 0x61, 0x6e, 0x12, 0x33, 0x0a, 0x16, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x6a, 0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x72, 0x6f, 0x77, 0x73, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x50, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0x42, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x72, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6b, 0x65, 0x79, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x1a, 0x3b, 0x0a, 0x0d, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 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, 0x1a, 0x3e, 0x0a, 0x0d, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x12, 0x2d, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x1a, 0xb8, 0x02, 0x0a, 0x11, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x4e, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x65, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x62, 0x6a, 0x52, 0x0a, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4c, 0x6f, 0x6f, 0x70, 0x1a, 0x3b, 0x0a, 0x0d, 0x43, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 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, 0x42, 0x66, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x65, 0x74, 0x42, 0x08, 0x56, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, 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, 0x65, 0x74, 0xa2, 0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x03, 0x56, 0x65, 0x74, 0xca, 0x02, 0x03, 0x56, 0x65, 0x74, 0xe2, 0x02, 0x0f, 0x56, 0x65, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x03, 0x56, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_vet_vet_proto_rawDescOnce sync.Once file_vet_vet_proto_rawDescData = file_vet_vet_proto_rawDesc ) func file_vet_vet_proto_rawDescGZIP() []byte { file_vet_vet_proto_rawDescOnce.Do(func() { file_vet_vet_proto_rawDescData = protoimpl.X.CompressGZIP(file_vet_vet_proto_rawDescData) }) return file_vet_vet_proto_rawDescData } var file_vet_vet_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_vet_vet_proto_goTypes = []interface{}{ (*Parameter)(nil), // 0: vet.Parameter (*Config)(nil), // 1: vet.Config (*Query)(nil), // 2: vet.Query (*PostgreSQL)(nil), // 3: vet.PostgreSQL (*PostgreSQLExplain)(nil), // 4: vet.PostgreSQLExplain (*MySQL)(nil), // 5: vet.MySQL (*MySQLExplain)(nil), // 6: vet.MySQLExplain nil, // 7: vet.PostgreSQLExplain.SettingsEntry (*PostgreSQLExplain_Plan)(nil), // 8: vet.PostgreSQLExplain.Plan (*PostgreSQLExplain_Planning)(nil), // 9: vet.PostgreSQLExplain.Planning (*MySQLExplain_QueryBlock)(nil), // 10: vet.MySQLExplain.QueryBlock (*MySQLExplain_Table)(nil), // 11: vet.MySQLExplain.Table (*MySQLExplain_NestedLoopObj)(nil), // 12: vet.MySQLExplain.NestedLoopObj (*MySQLExplain_OrderingOperation)(nil), // 13: vet.MySQLExplain.OrderingOperation nil, // 14: vet.MySQLExplain.QueryBlock.CostInfoEntry nil, // 15: vet.MySQLExplain.Table.CostInfoEntry nil, // 16: vet.MySQLExplain.OrderingOperation.CostInfoEntry } var file_vet_vet_proto_depIdxs = []int32{ 0, // 0: vet.Query.params:type_name -> vet.Parameter 4, // 1: vet.PostgreSQL.explain:type_name -> vet.PostgreSQLExplain 8, // 2: vet.PostgreSQLExplain.plan:type_name -> vet.PostgreSQLExplain.Plan 7, // 3: vet.PostgreSQLExplain.settings:type_name -> vet.PostgreSQLExplain.SettingsEntry 9, // 4: vet.PostgreSQLExplain.planning:type_name -> vet.PostgreSQLExplain.Planning 6, // 5: vet.MySQL.explain:type_name -> vet.MySQLExplain 10, // 6: vet.MySQLExplain.query_block:type_name -> vet.MySQLExplain.QueryBlock 8, // 7: vet.PostgreSQLExplain.Plan.plans:type_name -> vet.PostgreSQLExplain.Plan 14, // 8: vet.MySQLExplain.QueryBlock.cost_info:type_name -> vet.MySQLExplain.QueryBlock.CostInfoEntry 11, // 9: vet.MySQLExplain.QueryBlock.table:type_name -> vet.MySQLExplain.Table 13, // 10: vet.MySQLExplain.QueryBlock.ordering_operation:type_name -> vet.MySQLExplain.OrderingOperation 12, // 11: vet.MySQLExplain.QueryBlock.nested_loop:type_name -> vet.MySQLExplain.NestedLoopObj 15, // 12: vet.MySQLExplain.Table.cost_info:type_name -> vet.MySQLExplain.Table.CostInfoEntry 11, // 13: vet.MySQLExplain.NestedLoopObj.table:type_name -> vet.MySQLExplain.Table 16, // 14: vet.MySQLExplain.OrderingOperation.cost_info:type_name -> vet.MySQLExplain.OrderingOperation.CostInfoEntry 11, // 15: vet.MySQLExplain.OrderingOperation.table:type_name -> vet.MySQLExplain.Table 12, // 16: vet.MySQLExplain.OrderingOperation.nested_loop:type_name -> vet.MySQLExplain.NestedLoopObj 17, // [17:17] is the sub-list for method output_type 17, // [17:17] is the sub-list for method input_type 17, // [17:17] is the sub-list for extension type_name 17, // [17:17] is the sub-list for extension extendee 0, // [0:17] is the sub-list for field type_name } func init() { file_vet_vet_proto_init() } func file_vet_vet_proto_init() { if File_vet_vet_proto != nil { return } if !protoimpl.UnsafeEnabled { file_vet_vet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Parameter); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_vet_vet_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Config); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_vet_vet_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Query); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_vet_vet_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PostgreSQL); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_vet_vet_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PostgreSQLExplain); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_vet_vet_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MySQL); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_vet_vet_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MySQLExplain); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_vet_vet_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PostgreSQLExplain_Plan); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_vet_vet_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PostgreSQLExplain_Planning); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_vet_vet_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MySQLExplain_QueryBlock); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_vet_vet_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MySQLExplain_Table); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_vet_vet_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MySQLExplain_NestedLoopObj); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_vet_vet_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MySQLExplain_OrderingOperation); 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_vet_vet_proto_rawDesc, NumEnums: 0, NumMessages: 17, NumExtensions: 0, NumServices: 0, }, GoTypes: file_vet_vet_proto_goTypes, DependencyIndexes: file_vet_vet_proto_depIdxs, MessageInfos: file_vet_vet_proto_msgTypes, }.Build() File_vet_vet_proto = out.File file_vet_vet_proto_rawDesc = nil file_vet_vet_proto_goTypes = nil file_vet_vet_proto_depIdxs = nil } ================================================ FILE: internal/vet/vet_vtproto.pb.go ================================================ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. // protoc-gen-go-vtproto version: v0.4.0 // source: vet/vet.proto package vet import ( binary "encoding/binary" fmt "fmt" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" math "math" 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 *Parameter) CloneVT() *Parameter { if m == nil { return (*Parameter)(nil) } r := &Parameter{ Number: m.Number, } 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 *Config) CloneVT() *Config { if m == nil { return (*Config)(nil) } r := &Config{ Version: m.Version, Engine: m.Engine, } 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 len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Config) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *Query) CloneVT() *Query { if m == nil { return (*Query)(nil) } r := &Query{ Sql: m.Sql, Name: m.Name, Cmd: m.Cmd, } if rhs := m.Params; rhs != nil { tmpContainer := make([]*Parameter, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.Params = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *Query) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *PostgreSQL) CloneVT() *PostgreSQL { if m == nil { return (*PostgreSQL)(nil) } r := &PostgreSQL{ Explain: m.Explain.CloneVT(), } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *PostgreSQL) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *PostgreSQLExplain_Plan) CloneVT() *PostgreSQLExplain_Plan { if m == nil { return (*PostgreSQLExplain_Plan)(nil) } r := &PostgreSQLExplain_Plan{ NodeType: m.NodeType, ParentRelationship: m.ParentRelationship, RelationName: m.RelationName, Schema: m.Schema, Alias: m.Alias, ParallelAware: m.ParallelAware, AsyncCapable: m.AsyncCapable, StartupCost: m.StartupCost, TotalCost: m.TotalCost, PlanRows: m.PlanRows, PlanWidth: m.PlanWidth, SharedHitBlocks: m.SharedHitBlocks, SharedReadBlocks: m.SharedReadBlocks, SharedDirtiedBlocks: m.SharedDirtiedBlocks, SharedWrittenBlocks: m.SharedWrittenBlocks, LocalHitBlocks: m.LocalHitBlocks, LocalReadBlocks: m.LocalReadBlocks, LocalDirtiedBlocks: m.LocalDirtiedBlocks, LocalWrittenBlocks: m.LocalWrittenBlocks, TempReadBlocks: m.TempReadBlocks, TempWrittenBlocks: m.TempWrittenBlocks, JoinType: m.JoinType, InnerUnique: m.InnerUnique, HashCond: m.HashCond, IndexName: m.IndexName, ScanDirection: m.ScanDirection, IndexCond: m.IndexCond, } if rhs := m.Output; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.Output = tmpContainer } if rhs := m.Plans; rhs != nil { tmpContainer := make([]*PostgreSQLExplain_Plan, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.Plans = tmpContainer } if rhs := m.SortKey; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.SortKey = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *PostgreSQLExplain_Plan) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *PostgreSQLExplain_Planning) CloneVT() *PostgreSQLExplain_Planning { if m == nil { return (*PostgreSQLExplain_Planning)(nil) } r := &PostgreSQLExplain_Planning{ SharedHitBlocks: m.SharedHitBlocks, SharedReadBlocks: m.SharedReadBlocks, SharedDirtiedBlocks: m.SharedDirtiedBlocks, SharedWrittenBlocks: m.SharedWrittenBlocks, LocalHitBlocks: m.LocalHitBlocks, LocalReadBlocks: m.LocalReadBlocks, LocalDirtiedBlocks: m.LocalDirtiedBlocks, LocalWrittenBlocks: m.LocalWrittenBlocks, TempReadBlocks: m.TempReadBlocks, TempWrittenBlocks: m.TempWrittenBlocks, } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *PostgreSQLExplain_Planning) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *PostgreSQLExplain) CloneVT() *PostgreSQLExplain { if m == nil { return (*PostgreSQLExplain)(nil) } r := &PostgreSQLExplain{ Plan: m.Plan.CloneVT(), Planning: m.Planning.CloneVT(), } if rhs := m.Settings; rhs != nil { tmpContainer := make(map[string]string, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.Settings = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *PostgreSQLExplain) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *MySQL) CloneVT() *MySQL { if m == nil { return (*MySQL)(nil) } r := &MySQL{ Explain: m.Explain.CloneVT(), } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *MySQL) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *MySQLExplain_QueryBlock) CloneVT() *MySQLExplain_QueryBlock { if m == nil { return (*MySQLExplain_QueryBlock)(nil) } r := &MySQLExplain_QueryBlock{ SelectId: m.SelectId, Message: m.Message, Table: m.Table.CloneVT(), OrderingOperation: m.OrderingOperation.CloneVT(), } if rhs := m.CostInfo; rhs != nil { tmpContainer := make(map[string]string, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.CostInfo = tmpContainer } if rhs := m.NestedLoop; rhs != nil { tmpContainer := make([]*MySQLExplain_NestedLoopObj, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.NestedLoop = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *MySQLExplain_QueryBlock) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *MySQLExplain_Table) CloneVT() *MySQLExplain_Table { if m == nil { return (*MySQLExplain_Table)(nil) } r := &MySQLExplain_Table{ TableName: m.TableName, AccessType: m.AccessType, RowsExaminedPerScan: m.RowsExaminedPerScan, RowsProducedPerJoin: m.RowsProducedPerJoin, Filtered: m.Filtered, Insert: m.Insert, Key: m.Key, KeyLength: m.KeyLength, } if rhs := m.CostInfo; rhs != nil { tmpContainer := make(map[string]string, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.CostInfo = tmpContainer } if rhs := m.UsedColumns; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.UsedColumns = tmpContainer } if rhs := m.PossibleKeys; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.PossibleKeys = tmpContainer } if rhs := m.UsedKeyParts; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.UsedKeyParts = tmpContainer } if rhs := m.Ref; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) r.Ref = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *MySQLExplain_Table) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *MySQLExplain_NestedLoopObj) CloneVT() *MySQLExplain_NestedLoopObj { if m == nil { return (*MySQLExplain_NestedLoopObj)(nil) } r := &MySQLExplain_NestedLoopObj{ Table: m.Table.CloneVT(), } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *MySQLExplain_NestedLoopObj) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *MySQLExplain_OrderingOperation) CloneVT() *MySQLExplain_OrderingOperation { if m == nil { return (*MySQLExplain_OrderingOperation)(nil) } r := &MySQLExplain_OrderingOperation{ UsingFilesort: m.UsingFilesort, Table: m.Table.CloneVT(), } if rhs := m.CostInfo; rhs != nil { tmpContainer := make(map[string]string, len(rhs)) for k, v := range rhs { tmpContainer[k] = v } r.CostInfo = tmpContainer } if rhs := m.NestedLoop; rhs != nil { tmpContainer := make([]*MySQLExplain_NestedLoopObj, len(rhs)) for k, v := range rhs { tmpContainer[k] = v.CloneVT() } r.NestedLoop = tmpContainer } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *MySQLExplain_OrderingOperation) CloneMessageVT() proto.Message { return m.CloneVT() } func (m *MySQLExplain) CloneVT() *MySQLExplain { if m == nil { return (*MySQLExplain)(nil) } r := &MySQLExplain{ QueryBlock: m.QueryBlock.CloneVT(), } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) } return r } func (m *MySQLExplain) CloneMessageVT() proto.Message { return m.CloneVT() } 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 } 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 *Config) EqualVT(that *Config) 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 } } return string(this.unknownFields) == string(that.unknownFields) } func (this *Config) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Config) 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.Sql != that.Sql { return false } if this.Name != that.Name { return false } if this.Cmd != that.Cmd { return false } if len(this.Params) != len(that.Params) { return false } for i, vx := range this.Params { vy := that.Params[i] if p, q := vx, vy; p != q { if p == nil { p = &Parameter{} } if q == nil { q = &Parameter{} } if !p.EqualVT(q) { return false } } } return string(this.unknownFields) == string(that.unknownFields) } func (this *Query) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*Query) if !ok { return false } return this.EqualVT(that) } func (this *PostgreSQL) EqualVT(that *PostgreSQL) bool { if this == that { return true } else if this == nil || that == nil { return false } if !this.Explain.EqualVT(that.Explain) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *PostgreSQL) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*PostgreSQL) if !ok { return false } return this.EqualVT(that) } func (this *PostgreSQLExplain_Plan) EqualVT(that *PostgreSQLExplain_Plan) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.NodeType != that.NodeType { return false } if this.ParentRelationship != that.ParentRelationship { return false } if this.RelationName != that.RelationName { return false } if this.Schema != that.Schema { return false } if this.Alias != that.Alias { return false } if this.ParallelAware != that.ParallelAware { return false } if this.AsyncCapable != that.AsyncCapable { return false } if this.StartupCost != that.StartupCost { return false } if this.TotalCost != that.TotalCost { return false } if this.PlanRows != that.PlanRows { return false } if this.PlanWidth != that.PlanWidth { return false } if len(this.Output) != len(that.Output) { return false } for i, vx := range this.Output { vy := that.Output[i] if vx != vy { return false } } if len(this.Plans) != len(that.Plans) { return false } for i, vx := range this.Plans { vy := that.Plans[i] if p, q := vx, vy; p != q { if p == nil { p = &PostgreSQLExplain_Plan{} } if q == nil { q = &PostgreSQLExplain_Plan{} } if !p.EqualVT(q) { return false } } } if this.SharedHitBlocks != that.SharedHitBlocks { return false } if this.SharedReadBlocks != that.SharedReadBlocks { return false } if this.SharedDirtiedBlocks != that.SharedDirtiedBlocks { return false } if this.SharedWrittenBlocks != that.SharedWrittenBlocks { return false } if this.LocalHitBlocks != that.LocalHitBlocks { return false } if this.LocalReadBlocks != that.LocalReadBlocks { return false } if this.LocalDirtiedBlocks != that.LocalDirtiedBlocks { return false } if this.LocalWrittenBlocks != that.LocalWrittenBlocks { return false } if this.TempReadBlocks != that.TempReadBlocks { return false } if this.TempWrittenBlocks != that.TempWrittenBlocks { return false } if len(this.SortKey) != len(that.SortKey) { return false } for i, vx := range this.SortKey { vy := that.SortKey[i] if vx != vy { return false } } if this.JoinType != that.JoinType { return false } if this.InnerUnique != that.InnerUnique { return false } if this.HashCond != that.HashCond { return false } if this.IndexName != that.IndexName { return false } if this.ScanDirection != that.ScanDirection { return false } if this.IndexCond != that.IndexCond { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *PostgreSQLExplain_Plan) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*PostgreSQLExplain_Plan) if !ok { return false } return this.EqualVT(that) } func (this *PostgreSQLExplain_Planning) EqualVT(that *PostgreSQLExplain_Planning) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.SharedHitBlocks != that.SharedHitBlocks { return false } if this.SharedReadBlocks != that.SharedReadBlocks { return false } if this.SharedDirtiedBlocks != that.SharedDirtiedBlocks { return false } if this.SharedWrittenBlocks != that.SharedWrittenBlocks { return false } if this.LocalHitBlocks != that.LocalHitBlocks { return false } if this.LocalReadBlocks != that.LocalReadBlocks { return false } if this.LocalDirtiedBlocks != that.LocalDirtiedBlocks { return false } if this.LocalWrittenBlocks != that.LocalWrittenBlocks { return false } if this.TempReadBlocks != that.TempReadBlocks { return false } if this.TempWrittenBlocks != that.TempWrittenBlocks { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *PostgreSQLExplain_Planning) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*PostgreSQLExplain_Planning) if !ok { return false } return this.EqualVT(that) } func (this *PostgreSQLExplain) EqualVT(that *PostgreSQLExplain) bool { if this == that { return true } else if this == nil || that == nil { return false } if !this.Plan.EqualVT(that.Plan) { return false } if len(this.Settings) != len(that.Settings) { return false } for i, vx := range this.Settings { vy, ok := that.Settings[i] if !ok { return false } if vx != vy { return false } } if !this.Planning.EqualVT(that.Planning) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *PostgreSQLExplain) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*PostgreSQLExplain) if !ok { return false } return this.EqualVT(that) } func (this *MySQL) EqualVT(that *MySQL) bool { if this == that { return true } else if this == nil || that == nil { return false } if !this.Explain.EqualVT(that.Explain) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *MySQL) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*MySQL) if !ok { return false } return this.EqualVT(that) } func (this *MySQLExplain_QueryBlock) EqualVT(that *MySQLExplain_QueryBlock) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.SelectId != that.SelectId { return false } if this.Message != that.Message { return false } if len(this.CostInfo) != len(that.CostInfo) { return false } for i, vx := range this.CostInfo { vy, ok := that.CostInfo[i] if !ok { return false } if vx != vy { return false } } if !this.Table.EqualVT(that.Table) { return false } if !this.OrderingOperation.EqualVT(that.OrderingOperation) { return false } if len(this.NestedLoop) != len(that.NestedLoop) { return false } for i, vx := range this.NestedLoop { vy := that.NestedLoop[i] if p, q := vx, vy; p != q { if p == nil { p = &MySQLExplain_NestedLoopObj{} } if q == nil { q = &MySQLExplain_NestedLoopObj{} } if !p.EqualVT(q) { return false } } } return string(this.unknownFields) == string(that.unknownFields) } func (this *MySQLExplain_QueryBlock) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*MySQLExplain_QueryBlock) if !ok { return false } return this.EqualVT(that) } func (this *MySQLExplain_Table) EqualVT(that *MySQLExplain_Table) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.TableName != that.TableName { return false } if this.AccessType != that.AccessType { return false } if this.RowsExaminedPerScan != that.RowsExaminedPerScan { return false } if this.RowsProducedPerJoin != that.RowsProducedPerJoin { return false } if this.Filtered != that.Filtered { return false } if len(this.CostInfo) != len(that.CostInfo) { return false } for i, vx := range this.CostInfo { vy, ok := that.CostInfo[i] if !ok { return false } if vx != vy { return false } } if len(this.UsedColumns) != len(that.UsedColumns) { return false } for i, vx := range this.UsedColumns { vy := that.UsedColumns[i] if vx != vy { return false } } if this.Insert != that.Insert { return false } if len(this.PossibleKeys) != len(that.PossibleKeys) { return false } for i, vx := range this.PossibleKeys { vy := that.PossibleKeys[i] if vx != vy { return false } } if this.Key != that.Key { return false } if len(this.UsedKeyParts) != len(that.UsedKeyParts) { return false } for i, vx := range this.UsedKeyParts { vy := that.UsedKeyParts[i] if vx != vy { return false } } if this.KeyLength != that.KeyLength { return false } if len(this.Ref) != len(that.Ref) { return false } for i, vx := range this.Ref { vy := that.Ref[i] if vx != vy { return false } } return string(this.unknownFields) == string(that.unknownFields) } func (this *MySQLExplain_Table) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*MySQLExplain_Table) if !ok { return false } return this.EqualVT(that) } func (this *MySQLExplain_NestedLoopObj) EqualVT(that *MySQLExplain_NestedLoopObj) bool { if this == that { return true } else if this == nil || that == nil { return false } if !this.Table.EqualVT(that.Table) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *MySQLExplain_NestedLoopObj) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*MySQLExplain_NestedLoopObj) if !ok { return false } return this.EqualVT(that) } func (this *MySQLExplain_OrderingOperation) EqualVT(that *MySQLExplain_OrderingOperation) bool { if this == that { return true } else if this == nil || that == nil { return false } if this.UsingFilesort != that.UsingFilesort { return false } if len(this.CostInfo) != len(that.CostInfo) { return false } for i, vx := range this.CostInfo { vy, ok := that.CostInfo[i] if !ok { return false } if vx != vy { return false } } if !this.Table.EqualVT(that.Table) { return false } if len(this.NestedLoop) != len(that.NestedLoop) { return false } for i, vx := range this.NestedLoop { vy := that.NestedLoop[i] if p, q := vx, vy; p != q { if p == nil { p = &MySQLExplain_NestedLoopObj{} } if q == nil { q = &MySQLExplain_NestedLoopObj{} } if !p.EqualVT(q) { return false } } } return string(this.unknownFields) == string(that.unknownFields) } func (this *MySQLExplain_OrderingOperation) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*MySQLExplain_OrderingOperation) if !ok { return false } return this.EqualVT(that) } func (this *MySQLExplain) EqualVT(that *MySQLExplain) bool { if this == that { return true } else if this == nil || that == nil { return false } if !this.QueryBlock.EqualVT(that.QueryBlock) { return false } return string(this.unknownFields) == string(that.unknownFields) } func (this *MySQLExplain) EqualMessageVT(thatMsg proto.Message) bool { that, ok := thatMsg.(*MySQLExplain) if !ok { return false } return this.EqualVT(that) } 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.Number != 0 { i = encodeVarint(dAtA, i, uint64(m.Number)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Config) 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 *Config) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *Config) 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.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 *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 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] = 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.Sql) > 0 { i -= len(m.Sql) copy(dAtA[i:], m.Sql) i = encodeVarint(dAtA, i, uint64(len(m.Sql))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *PostgreSQL) 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 *PostgreSQL) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *PostgreSQL) 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.Explain != nil { size, err := m.Explain.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 *PostgreSQLExplain_Plan) 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 *PostgreSQLExplain_Plan) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *PostgreSQLExplain_Plan) 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.IndexCond) > 0 { i -= len(m.IndexCond) copy(dAtA[i:], m.IndexCond) i = encodeVarint(dAtA, i, uint64(len(m.IndexCond))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xf2 } if len(m.ScanDirection) > 0 { i -= len(m.ScanDirection) copy(dAtA[i:], m.ScanDirection) i = encodeVarint(dAtA, i, uint64(len(m.ScanDirection))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xea } if len(m.IndexName) > 0 { i -= len(m.IndexName) copy(dAtA[i:], m.IndexName) i = encodeVarint(dAtA, i, uint64(len(m.IndexName))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xe2 } if len(m.HashCond) > 0 { i -= len(m.HashCond) copy(dAtA[i:], m.HashCond) i = encodeVarint(dAtA, i, uint64(len(m.HashCond))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xda } if m.InnerUnique { i-- if m.InnerUnique { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xd0 } if len(m.JoinType) > 0 { i -= len(m.JoinType) copy(dAtA[i:], m.JoinType) i = encodeVarint(dAtA, i, uint64(len(m.JoinType))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xca } if len(m.SortKey) > 0 { for iNdEx := len(m.SortKey) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.SortKey[iNdEx]) copy(dAtA[i:], m.SortKey[iNdEx]) i = encodeVarint(dAtA, i, uint64(len(m.SortKey[iNdEx]))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xc2 } } if m.TempWrittenBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.TempWrittenBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xb8 } if m.TempReadBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.TempReadBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xb0 } if m.LocalWrittenBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalWrittenBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xa8 } if m.LocalDirtiedBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalDirtiedBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xa0 } if m.LocalReadBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalReadBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x98 } if m.LocalHitBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalHitBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x90 } if m.SharedWrittenBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedWrittenBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x88 } if m.SharedDirtiedBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedDirtiedBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x80 } if m.SharedReadBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedReadBlocks)) i-- dAtA[i] = 0x78 } if m.SharedHitBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedHitBlocks)) i-- dAtA[i] = 0x70 } if len(m.Plans) > 0 { for iNdEx := len(m.Plans) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Plans[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x6a } } if len(m.Output) > 0 { for iNdEx := len(m.Output) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Output[iNdEx]) copy(dAtA[i:], m.Output[iNdEx]) i = encodeVarint(dAtA, i, uint64(len(m.Output[iNdEx]))) i-- dAtA[i] = 0x62 } } if m.PlanWidth != 0 { i = encodeVarint(dAtA, i, uint64(m.PlanWidth)) i-- dAtA[i] = 0x58 } if m.PlanRows != 0 { i = encodeVarint(dAtA, i, uint64(m.PlanRows)) i-- dAtA[i] = 0x50 } if m.TotalCost != 0 { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.TotalCost)))) i-- dAtA[i] = 0x4d } if m.StartupCost != 0 { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StartupCost)))) i-- dAtA[i] = 0x45 } if m.AsyncCapable { i-- if m.AsyncCapable { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x38 } if m.ParallelAware { i-- if m.ParallelAware { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x30 } if len(m.Alias) > 0 { i -= len(m.Alias) copy(dAtA[i:], m.Alias) i = encodeVarint(dAtA, i, uint64(len(m.Alias))) i-- dAtA[i] = 0x2a } 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] = 0x22 } if len(m.RelationName) > 0 { i -= len(m.RelationName) copy(dAtA[i:], m.RelationName) i = encodeVarint(dAtA, i, uint64(len(m.RelationName))) i-- dAtA[i] = 0x1a } if len(m.ParentRelationship) > 0 { i -= len(m.ParentRelationship) copy(dAtA[i:], m.ParentRelationship) i = encodeVarint(dAtA, i, uint64(len(m.ParentRelationship))) i-- dAtA[i] = 0x12 } if len(m.NodeType) > 0 { i -= len(m.NodeType) copy(dAtA[i:], m.NodeType) i = encodeVarint(dAtA, i, uint64(len(m.NodeType))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *PostgreSQLExplain_Planning) 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 *PostgreSQLExplain_Planning) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *PostgreSQLExplain_Planning) 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.TempWrittenBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.TempWrittenBlocks)) i-- dAtA[i] = 0x50 } if m.TempReadBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.TempReadBlocks)) i-- dAtA[i] = 0x48 } if m.LocalWrittenBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalWrittenBlocks)) i-- dAtA[i] = 0x40 } if m.LocalDirtiedBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalDirtiedBlocks)) i-- dAtA[i] = 0x38 } if m.LocalReadBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalReadBlocks)) i-- dAtA[i] = 0x30 } if m.LocalHitBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalHitBlocks)) i-- dAtA[i] = 0x28 } if m.SharedWrittenBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedWrittenBlocks)) i-- dAtA[i] = 0x20 } if m.SharedDirtiedBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedDirtiedBlocks)) i-- dAtA[i] = 0x18 } if m.SharedReadBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedReadBlocks)) i-- dAtA[i] = 0x10 } if m.SharedHitBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedHitBlocks)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *PostgreSQLExplain) 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 *PostgreSQLExplain) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *PostgreSQLExplain) 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.Planning != nil { size, err := m.Planning.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } if len(m.Settings) > 0 { for k := range m.Settings { v := m.Settings[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] = 0x12 } } if m.Plan != nil { size, err := m.Plan.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 *MySQL) 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 *MySQL) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *MySQL) 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.Explain != nil { size, err := m.Explain.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 *MySQLExplain_QueryBlock) 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 *MySQLExplain_QueryBlock) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *MySQLExplain_QueryBlock) 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.NestedLoop) > 0 { for iNdEx := len(m.NestedLoop) - 1; iNdEx >= 0; iNdEx-- { size, err := m.NestedLoop[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } } if m.OrderingOperation != nil { size, err := m.OrderingOperation.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } 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] = 0x22 } if len(m.CostInfo) > 0 { for k := range m.CostInfo { v := m.CostInfo[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] = 0x1a } } if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) i = encodeVarint(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0x12 } if m.SelectId != 0 { i = encodeVarint(dAtA, i, uint64(m.SelectId)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *MySQLExplain_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 *MySQLExplain_Table) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *MySQLExplain_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.Ref) > 0 { for iNdEx := len(m.Ref) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Ref[iNdEx]) copy(dAtA[i:], m.Ref[iNdEx]) i = encodeVarint(dAtA, i, uint64(len(m.Ref[iNdEx]))) i-- dAtA[i] = 0x6a } } if len(m.KeyLength) > 0 { i -= len(m.KeyLength) copy(dAtA[i:], m.KeyLength) i = encodeVarint(dAtA, i, uint64(len(m.KeyLength))) i-- dAtA[i] = 0x62 } if len(m.UsedKeyParts) > 0 { for iNdEx := len(m.UsedKeyParts) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.UsedKeyParts[iNdEx]) copy(dAtA[i:], m.UsedKeyParts[iNdEx]) i = encodeVarint(dAtA, i, uint64(len(m.UsedKeyParts[iNdEx]))) i-- dAtA[i] = 0x5a } } if len(m.Key) > 0 { i -= len(m.Key) copy(dAtA[i:], m.Key) i = encodeVarint(dAtA, i, uint64(len(m.Key))) i-- dAtA[i] = 0x52 } if len(m.PossibleKeys) > 0 { for iNdEx := len(m.PossibleKeys) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.PossibleKeys[iNdEx]) copy(dAtA[i:], m.PossibleKeys[iNdEx]) i = encodeVarint(dAtA, i, uint64(len(m.PossibleKeys[iNdEx]))) i-- dAtA[i] = 0x4a } } if m.Insert { i-- if m.Insert { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x40 } if len(m.UsedColumns) > 0 { for iNdEx := len(m.UsedColumns) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.UsedColumns[iNdEx]) copy(dAtA[i:], m.UsedColumns[iNdEx]) i = encodeVarint(dAtA, i, uint64(len(m.UsedColumns[iNdEx]))) i-- dAtA[i] = 0x3a } } if len(m.CostInfo) > 0 { for k := range m.CostInfo { v := m.CostInfo[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] = 0x32 } } if len(m.Filtered) > 0 { i -= len(m.Filtered) copy(dAtA[i:], m.Filtered) i = encodeVarint(dAtA, i, uint64(len(m.Filtered))) i-- dAtA[i] = 0x2a } if m.RowsProducedPerJoin != 0 { i = encodeVarint(dAtA, i, uint64(m.RowsProducedPerJoin)) i-- dAtA[i] = 0x20 } if m.RowsExaminedPerScan != 0 { i = encodeVarint(dAtA, i, uint64(m.RowsExaminedPerScan)) i-- dAtA[i] = 0x18 } if len(m.AccessType) > 0 { i -= len(m.AccessType) copy(dAtA[i:], m.AccessType) i = encodeVarint(dAtA, i, uint64(len(m.AccessType))) i-- dAtA[i] = 0x12 } if len(m.TableName) > 0 { i -= len(m.TableName) copy(dAtA[i:], m.TableName) i = encodeVarint(dAtA, i, uint64(len(m.TableName))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MySQLExplain_NestedLoopObj) 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 *MySQLExplain_NestedLoopObj) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *MySQLExplain_NestedLoopObj) 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.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] = 0xa } return len(dAtA) - i, nil } func (m *MySQLExplain_OrderingOperation) 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 *MySQLExplain_OrderingOperation) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *MySQLExplain_OrderingOperation) 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.NestedLoop) > 0 { for iNdEx := len(m.NestedLoop) - 1; iNdEx >= 0; iNdEx-- { size, err := m.NestedLoop[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } } 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] = 0x1a } if len(m.CostInfo) > 0 { for k := range m.CostInfo { v := m.CostInfo[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] = 0x12 } } if m.UsingFilesort { i-- if m.UsingFilesort { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *MySQLExplain) 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 *MySQLExplain) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } func (m *MySQLExplain) 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.QueryBlock != nil { size, err := m.QueryBlock.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 *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.Number != 0 { i = encodeVarint(dAtA, i, uint64(m.Number)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Config) 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 *Config) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *Config) 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.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 *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 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] = 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.Sql) > 0 { i -= len(m.Sql) copy(dAtA[i:], m.Sql) i = encodeVarint(dAtA, i, uint64(len(m.Sql))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *PostgreSQL) 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 *PostgreSQL) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *PostgreSQL) 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.Explain != nil { size, err := m.Explain.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 *PostgreSQLExplain_Plan) 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 *PostgreSQLExplain_Plan) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *PostgreSQLExplain_Plan) 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.IndexCond) > 0 { i -= len(m.IndexCond) copy(dAtA[i:], m.IndexCond) i = encodeVarint(dAtA, i, uint64(len(m.IndexCond))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xf2 } if len(m.ScanDirection) > 0 { i -= len(m.ScanDirection) copy(dAtA[i:], m.ScanDirection) i = encodeVarint(dAtA, i, uint64(len(m.ScanDirection))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xea } if len(m.IndexName) > 0 { i -= len(m.IndexName) copy(dAtA[i:], m.IndexName) i = encodeVarint(dAtA, i, uint64(len(m.IndexName))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xe2 } if len(m.HashCond) > 0 { i -= len(m.HashCond) copy(dAtA[i:], m.HashCond) i = encodeVarint(dAtA, i, uint64(len(m.HashCond))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xda } if m.InnerUnique { i-- if m.InnerUnique { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xd0 } if len(m.JoinType) > 0 { i -= len(m.JoinType) copy(dAtA[i:], m.JoinType) i = encodeVarint(dAtA, i, uint64(len(m.JoinType))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xca } if len(m.SortKey) > 0 { for iNdEx := len(m.SortKey) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.SortKey[iNdEx]) copy(dAtA[i:], m.SortKey[iNdEx]) i = encodeVarint(dAtA, i, uint64(len(m.SortKey[iNdEx]))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xc2 } } if m.TempWrittenBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.TempWrittenBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xb8 } if m.TempReadBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.TempReadBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xb0 } if m.LocalWrittenBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalWrittenBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xa8 } if m.LocalDirtiedBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalDirtiedBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xa0 } if m.LocalReadBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalReadBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x98 } if m.LocalHitBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalHitBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x90 } if m.SharedWrittenBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedWrittenBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x88 } if m.SharedDirtiedBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedDirtiedBlocks)) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0x80 } if m.SharedReadBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedReadBlocks)) i-- dAtA[i] = 0x78 } if m.SharedHitBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedHitBlocks)) i-- dAtA[i] = 0x70 } if len(m.Plans) > 0 { for iNdEx := len(m.Plans) - 1; iNdEx >= 0; iNdEx-- { size, err := m.Plans[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x6a } } if len(m.Output) > 0 { for iNdEx := len(m.Output) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Output[iNdEx]) copy(dAtA[i:], m.Output[iNdEx]) i = encodeVarint(dAtA, i, uint64(len(m.Output[iNdEx]))) i-- dAtA[i] = 0x62 } } if m.PlanWidth != 0 { i = encodeVarint(dAtA, i, uint64(m.PlanWidth)) i-- dAtA[i] = 0x58 } if m.PlanRows != 0 { i = encodeVarint(dAtA, i, uint64(m.PlanRows)) i-- dAtA[i] = 0x50 } if m.TotalCost != 0 { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.TotalCost)))) i-- dAtA[i] = 0x4d } if m.StartupCost != 0 { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.StartupCost)))) i-- dAtA[i] = 0x45 } if m.AsyncCapable { i-- if m.AsyncCapable { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x38 } if m.ParallelAware { i-- if m.ParallelAware { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x30 } if len(m.Alias) > 0 { i -= len(m.Alias) copy(dAtA[i:], m.Alias) i = encodeVarint(dAtA, i, uint64(len(m.Alias))) i-- dAtA[i] = 0x2a } 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] = 0x22 } if len(m.RelationName) > 0 { i -= len(m.RelationName) copy(dAtA[i:], m.RelationName) i = encodeVarint(dAtA, i, uint64(len(m.RelationName))) i-- dAtA[i] = 0x1a } if len(m.ParentRelationship) > 0 { i -= len(m.ParentRelationship) copy(dAtA[i:], m.ParentRelationship) i = encodeVarint(dAtA, i, uint64(len(m.ParentRelationship))) i-- dAtA[i] = 0x12 } if len(m.NodeType) > 0 { i -= len(m.NodeType) copy(dAtA[i:], m.NodeType) i = encodeVarint(dAtA, i, uint64(len(m.NodeType))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *PostgreSQLExplain_Planning) 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 *PostgreSQLExplain_Planning) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *PostgreSQLExplain_Planning) 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.TempWrittenBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.TempWrittenBlocks)) i-- dAtA[i] = 0x50 } if m.TempReadBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.TempReadBlocks)) i-- dAtA[i] = 0x48 } if m.LocalWrittenBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalWrittenBlocks)) i-- dAtA[i] = 0x40 } if m.LocalDirtiedBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalDirtiedBlocks)) i-- dAtA[i] = 0x38 } if m.LocalReadBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalReadBlocks)) i-- dAtA[i] = 0x30 } if m.LocalHitBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.LocalHitBlocks)) i-- dAtA[i] = 0x28 } if m.SharedWrittenBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedWrittenBlocks)) i-- dAtA[i] = 0x20 } if m.SharedDirtiedBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedDirtiedBlocks)) i-- dAtA[i] = 0x18 } if m.SharedReadBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedReadBlocks)) i-- dAtA[i] = 0x10 } if m.SharedHitBlocks != 0 { i = encodeVarint(dAtA, i, uint64(m.SharedHitBlocks)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *PostgreSQLExplain) 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 *PostgreSQLExplain) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *PostgreSQLExplain) 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.Planning != nil { size, err := m.Planning.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } if len(m.Settings) > 0 { for k := range m.Settings { v := m.Settings[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] = 0x12 } } if m.Plan != nil { size, err := m.Plan.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 *MySQL) 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 *MySQL) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *MySQL) 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.Explain != nil { size, err := m.Explain.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 *MySQLExplain_QueryBlock) 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 *MySQLExplain_QueryBlock) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *MySQLExplain_QueryBlock) 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.NestedLoop) > 0 { for iNdEx := len(m.NestedLoop) - 1; iNdEx >= 0; iNdEx-- { size, err := m.NestedLoop[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } } if m.OrderingOperation != nil { size, err := m.OrderingOperation.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } 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] = 0x22 } if len(m.CostInfo) > 0 { for k := range m.CostInfo { v := m.CostInfo[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] = 0x1a } } if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) i = encodeVarint(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0x12 } if m.SelectId != 0 { i = encodeVarint(dAtA, i, uint64(m.SelectId)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *MySQLExplain_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 *MySQLExplain_Table) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *MySQLExplain_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.Ref) > 0 { for iNdEx := len(m.Ref) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Ref[iNdEx]) copy(dAtA[i:], m.Ref[iNdEx]) i = encodeVarint(dAtA, i, uint64(len(m.Ref[iNdEx]))) i-- dAtA[i] = 0x6a } } if len(m.KeyLength) > 0 { i -= len(m.KeyLength) copy(dAtA[i:], m.KeyLength) i = encodeVarint(dAtA, i, uint64(len(m.KeyLength))) i-- dAtA[i] = 0x62 } if len(m.UsedKeyParts) > 0 { for iNdEx := len(m.UsedKeyParts) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.UsedKeyParts[iNdEx]) copy(dAtA[i:], m.UsedKeyParts[iNdEx]) i = encodeVarint(dAtA, i, uint64(len(m.UsedKeyParts[iNdEx]))) i-- dAtA[i] = 0x5a } } if len(m.Key) > 0 { i -= len(m.Key) copy(dAtA[i:], m.Key) i = encodeVarint(dAtA, i, uint64(len(m.Key))) i-- dAtA[i] = 0x52 } if len(m.PossibleKeys) > 0 { for iNdEx := len(m.PossibleKeys) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.PossibleKeys[iNdEx]) copy(dAtA[i:], m.PossibleKeys[iNdEx]) i = encodeVarint(dAtA, i, uint64(len(m.PossibleKeys[iNdEx]))) i-- dAtA[i] = 0x4a } } if m.Insert { i-- if m.Insert { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x40 } if len(m.UsedColumns) > 0 { for iNdEx := len(m.UsedColumns) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.UsedColumns[iNdEx]) copy(dAtA[i:], m.UsedColumns[iNdEx]) i = encodeVarint(dAtA, i, uint64(len(m.UsedColumns[iNdEx]))) i-- dAtA[i] = 0x3a } } if len(m.CostInfo) > 0 { for k := range m.CostInfo { v := m.CostInfo[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] = 0x32 } } if len(m.Filtered) > 0 { i -= len(m.Filtered) copy(dAtA[i:], m.Filtered) i = encodeVarint(dAtA, i, uint64(len(m.Filtered))) i-- dAtA[i] = 0x2a } if m.RowsProducedPerJoin != 0 { i = encodeVarint(dAtA, i, uint64(m.RowsProducedPerJoin)) i-- dAtA[i] = 0x20 } if m.RowsExaminedPerScan != 0 { i = encodeVarint(dAtA, i, uint64(m.RowsExaminedPerScan)) i-- dAtA[i] = 0x18 } if len(m.AccessType) > 0 { i -= len(m.AccessType) copy(dAtA[i:], m.AccessType) i = encodeVarint(dAtA, i, uint64(len(m.AccessType))) i-- dAtA[i] = 0x12 } if len(m.TableName) > 0 { i -= len(m.TableName) copy(dAtA[i:], m.TableName) i = encodeVarint(dAtA, i, uint64(len(m.TableName))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *MySQLExplain_NestedLoopObj) 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 *MySQLExplain_NestedLoopObj) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *MySQLExplain_NestedLoopObj) 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.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] = 0xa } return len(dAtA) - i, nil } func (m *MySQLExplain_OrderingOperation) 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 *MySQLExplain_OrderingOperation) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *MySQLExplain_OrderingOperation) 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.NestedLoop) > 0 { for iNdEx := len(m.NestedLoop) - 1; iNdEx >= 0; iNdEx-- { size, err := m.NestedLoop[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } } 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] = 0x1a } if len(m.CostInfo) > 0 { for k := range m.CostInfo { v := m.CostInfo[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] = 0x12 } } if m.UsingFilesort { i-- if m.UsingFilesort { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *MySQLExplain) 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 *MySQLExplain) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } func (m *MySQLExplain) 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.QueryBlock != nil { size, err := m.QueryBlock.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 *Parameter) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Number != 0 { n += 1 + sov(uint64(m.Number)) } n += len(m.unknownFields) return n } func (m *Config) 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)) } } n += len(m.unknownFields) return n } func (m *Query) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Sql) 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.Params) > 0 { for _, e := range m.Params { l = e.SizeVT() n += 1 + l + sov(uint64(l)) } } n += len(m.unknownFields) return n } func (m *PostgreSQL) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Explain != nil { l = m.Explain.SizeVT() n += 1 + l + sov(uint64(l)) } n += len(m.unknownFields) return n } func (m *PostgreSQLExplain_Plan) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.NodeType) if l > 0 { n += 1 + l + sov(uint64(l)) } l = len(m.ParentRelationship) if l > 0 { n += 1 + l + sov(uint64(l)) } l = len(m.RelationName) 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.Alias) if l > 0 { n += 1 + l + sov(uint64(l)) } if m.ParallelAware { n += 2 } if m.AsyncCapable { n += 2 } if m.StartupCost != 0 { n += 5 } if m.TotalCost != 0 { n += 5 } if m.PlanRows != 0 { n += 1 + sov(uint64(m.PlanRows)) } if m.PlanWidth != 0 { n += 1 + sov(uint64(m.PlanWidth)) } if len(m.Output) > 0 { for _, s := range m.Output { l = len(s) n += 1 + l + sov(uint64(l)) } } if len(m.Plans) > 0 { for _, e := range m.Plans { l = e.SizeVT() n += 1 + l + sov(uint64(l)) } } if m.SharedHitBlocks != 0 { n += 1 + sov(uint64(m.SharedHitBlocks)) } if m.SharedReadBlocks != 0 { n += 1 + sov(uint64(m.SharedReadBlocks)) } if m.SharedDirtiedBlocks != 0 { n += 2 + sov(uint64(m.SharedDirtiedBlocks)) } if m.SharedWrittenBlocks != 0 { n += 2 + sov(uint64(m.SharedWrittenBlocks)) } if m.LocalHitBlocks != 0 { n += 2 + sov(uint64(m.LocalHitBlocks)) } if m.LocalReadBlocks != 0 { n += 2 + sov(uint64(m.LocalReadBlocks)) } if m.LocalDirtiedBlocks != 0 { n += 2 + sov(uint64(m.LocalDirtiedBlocks)) } if m.LocalWrittenBlocks != 0 { n += 2 + sov(uint64(m.LocalWrittenBlocks)) } if m.TempReadBlocks != 0 { n += 2 + sov(uint64(m.TempReadBlocks)) } if m.TempWrittenBlocks != 0 { n += 2 + sov(uint64(m.TempWrittenBlocks)) } if len(m.SortKey) > 0 { for _, s := range m.SortKey { l = len(s) n += 2 + l + sov(uint64(l)) } } l = len(m.JoinType) if l > 0 { n += 2 + l + sov(uint64(l)) } if m.InnerUnique { n += 3 } l = len(m.HashCond) if l > 0 { n += 2 + l + sov(uint64(l)) } l = len(m.IndexName) if l > 0 { n += 2 + l + sov(uint64(l)) } l = len(m.ScanDirection) if l > 0 { n += 2 + l + sov(uint64(l)) } l = len(m.IndexCond) if l > 0 { n += 2 + l + sov(uint64(l)) } n += len(m.unknownFields) return n } func (m *PostgreSQLExplain_Planning) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.SharedHitBlocks != 0 { n += 1 + sov(uint64(m.SharedHitBlocks)) } if m.SharedReadBlocks != 0 { n += 1 + sov(uint64(m.SharedReadBlocks)) } if m.SharedDirtiedBlocks != 0 { n += 1 + sov(uint64(m.SharedDirtiedBlocks)) } if m.SharedWrittenBlocks != 0 { n += 1 + sov(uint64(m.SharedWrittenBlocks)) } if m.LocalHitBlocks != 0 { n += 1 + sov(uint64(m.LocalHitBlocks)) } if m.LocalReadBlocks != 0 { n += 1 + sov(uint64(m.LocalReadBlocks)) } if m.LocalDirtiedBlocks != 0 { n += 1 + sov(uint64(m.LocalDirtiedBlocks)) } if m.LocalWrittenBlocks != 0 { n += 1 + sov(uint64(m.LocalWrittenBlocks)) } if m.TempReadBlocks != 0 { n += 1 + sov(uint64(m.TempReadBlocks)) } if m.TempWrittenBlocks != 0 { n += 1 + sov(uint64(m.TempWrittenBlocks)) } n += len(m.unknownFields) return n } func (m *PostgreSQLExplain) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Plan != nil { l = m.Plan.SizeVT() n += 1 + l + sov(uint64(l)) } if len(m.Settings) > 0 { for k, v := range m.Settings { _ = k _ = v mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) } } if m.Planning != nil { l = m.Planning.SizeVT() n += 1 + l + sov(uint64(l)) } n += len(m.unknownFields) return n } func (m *MySQL) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Explain != nil { l = m.Explain.SizeVT() n += 1 + l + sov(uint64(l)) } n += len(m.unknownFields) return n } func (m *MySQLExplain_QueryBlock) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.SelectId != 0 { n += 1 + sov(uint64(m.SelectId)) } l = len(m.Message) if l > 0 { n += 1 + l + sov(uint64(l)) } if len(m.CostInfo) > 0 { for k, v := range m.CostInfo { _ = k _ = v mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) } } if m.Table != nil { l = m.Table.SizeVT() n += 1 + l + sov(uint64(l)) } if m.OrderingOperation != nil { l = m.OrderingOperation.SizeVT() n += 1 + l + sov(uint64(l)) } if len(m.NestedLoop) > 0 { for _, e := range m.NestedLoop { l = e.SizeVT() n += 1 + l + sov(uint64(l)) } } n += len(m.unknownFields) return n } func (m *MySQLExplain_Table) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.TableName) if l > 0 { n += 1 + l + sov(uint64(l)) } l = len(m.AccessType) if l > 0 { n += 1 + l + sov(uint64(l)) } if m.RowsExaminedPerScan != 0 { n += 1 + sov(uint64(m.RowsExaminedPerScan)) } if m.RowsProducedPerJoin != 0 { n += 1 + sov(uint64(m.RowsProducedPerJoin)) } l = len(m.Filtered) if l > 0 { n += 1 + l + sov(uint64(l)) } if len(m.CostInfo) > 0 { for k, v := range m.CostInfo { _ = 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.UsedColumns) > 0 { for _, s := range m.UsedColumns { l = len(s) n += 1 + l + sov(uint64(l)) } } if m.Insert { n += 2 } if len(m.PossibleKeys) > 0 { for _, s := range m.PossibleKeys { l = len(s) n += 1 + l + sov(uint64(l)) } } l = len(m.Key) if l > 0 { n += 1 + l + sov(uint64(l)) } if len(m.UsedKeyParts) > 0 { for _, s := range m.UsedKeyParts { l = len(s) n += 1 + l + sov(uint64(l)) } } l = len(m.KeyLength) if l > 0 { n += 1 + l + sov(uint64(l)) } if len(m.Ref) > 0 { for _, s := range m.Ref { l = len(s) n += 1 + l + sov(uint64(l)) } } n += len(m.unknownFields) return n } func (m *MySQLExplain_NestedLoopObj) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.Table != nil { l = m.Table.SizeVT() n += 1 + l + sov(uint64(l)) } n += len(m.unknownFields) return n } func (m *MySQLExplain_OrderingOperation) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.UsingFilesort { n += 2 } if len(m.CostInfo) > 0 { for k, v := range m.CostInfo { _ = k _ = v mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) } } if m.Table != nil { l = m.Table.SizeVT() n += 1 + l + sov(uint64(l)) } if len(m.NestedLoop) > 0 { for _, e := range m.NestedLoop { l = e.SizeVT() n += 1 + l + sov(uint64(l)) } } n += len(m.unknownFields) return n } func (m *MySQLExplain) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l if m.QueryBlock != nil { l = m.QueryBlock.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 *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 } } 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 *Config) 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: Config: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Config: 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 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 Sql", 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.Sql = 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 Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } m.Params = append(m.Params, &Parameter{}) if err := m.Params[len(m.Params)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PostgreSQL) 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: PostgreSQL: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PostgreSQL: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Explain", 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.Explain == nil { m.Explain = &PostgreSQLExplain{} } if err := m.Explain.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 *PostgreSQLExplain_Plan) 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: PostgreSQLExplain_Plan: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PostgreSQLExplain_Plan: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NodeType", 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.NodeType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ParentRelationship", 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.ParentRelationship = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RelationName", 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.RelationName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: 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 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Alias", 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.Alias = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ParallelAware", 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.ParallelAware = bool(v != 0) case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field AsyncCapable", 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.AsyncCapable = bool(v != 0) case 8: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field StartupCost", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.StartupCost = float32(math.Float32frombits(v)) case 9: if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field TotalCost", wireType) } var v uint32 if (iNdEx + 4) > l { return io.ErrUnexpectedEOF } v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) iNdEx += 4 m.TotalCost = float32(math.Float32frombits(v)) case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PlanRows", wireType) } m.PlanRows = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.PlanRows |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 11: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PlanWidth", wireType) } m.PlanWidth = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.PlanWidth |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Output", 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.Output = append(m.Output, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 13: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Plans", 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.Plans = append(m.Plans, &PostgreSQLExplain_Plan{}) if err := m.Plans[len(m.Plans)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 14: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SharedHitBlocks", wireType) } m.SharedHitBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.SharedHitBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 15: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SharedReadBlocks", wireType) } m.SharedReadBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.SharedReadBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 16: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SharedDirtiedBlocks", wireType) } m.SharedDirtiedBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.SharedDirtiedBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 17: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SharedWrittenBlocks", wireType) } m.SharedWrittenBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.SharedWrittenBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 18: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LocalHitBlocks", wireType) } m.LocalHitBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.LocalHitBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 19: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LocalReadBlocks", wireType) } m.LocalReadBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.LocalReadBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 20: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LocalDirtiedBlocks", wireType) } m.LocalDirtiedBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.LocalDirtiedBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 21: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LocalWrittenBlocks", wireType) } m.LocalWrittenBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.LocalWrittenBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 22: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TempReadBlocks", wireType) } m.TempReadBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.TempReadBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 23: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TempWrittenBlocks", wireType) } m.TempWrittenBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.TempWrittenBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 24: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SortKey", 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.SortKey = append(m.SortKey, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 25: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field JoinType", 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.JoinType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 26: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field InnerUnique", 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.InnerUnique = bool(v != 0) case 27: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field HashCond", 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.HashCond = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 28: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field IndexName", 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.IndexName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 29: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ScanDirection", 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.ScanDirection = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 30: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field IndexCond", 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.IndexCond = 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 *PostgreSQLExplain_Planning) 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: PostgreSQLExplain_Planning: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PostgreSQLExplain_Planning: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SharedHitBlocks", wireType) } m.SharedHitBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.SharedHitBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SharedReadBlocks", wireType) } m.SharedReadBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.SharedReadBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SharedDirtiedBlocks", wireType) } m.SharedDirtiedBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.SharedDirtiedBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SharedWrittenBlocks", wireType) } m.SharedWrittenBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.SharedWrittenBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LocalHitBlocks", wireType) } m.LocalHitBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.LocalHitBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LocalReadBlocks", wireType) } m.LocalReadBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.LocalReadBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LocalDirtiedBlocks", wireType) } m.LocalDirtiedBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.LocalDirtiedBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LocalWrittenBlocks", wireType) } m.LocalWrittenBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.LocalWrittenBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TempReadBlocks", wireType) } m.TempReadBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.TempReadBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TempWrittenBlocks", wireType) } m.TempWrittenBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.TempWrittenBlocks |= uint64(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 *PostgreSQLExplain) 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: PostgreSQLExplain: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PostgreSQLExplain: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Plan", 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.Plan == nil { m.Plan = &PostgreSQLExplain_Plan{} } if err := m.Plan.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: 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 = 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.Settings[mapkey] = mapvalue iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Planning", 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.Planning == nil { m.Planning = &PostgreSQLExplain_Planning{} } if err := m.Planning.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 *MySQL) 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: MySQL: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MySQL: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Explain", 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.Explain == nil { m.Explain = &MySQLExplain{} } if err := m.Explain.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 *MySQLExplain_QueryBlock) 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: MySQLExplain_QueryBlock: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MySQLExplain_QueryBlock: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SelectId", wireType) } m.SelectId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.SelectId |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Message", 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.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CostInfo", 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.CostInfo == nil { m.CostInfo = 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.CostInfo[mapkey] = mapvalue iNdEx = postIndex case 4: 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 = &MySQLExplain_Table{} } if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OrderingOperation", 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.OrderingOperation == nil { m.OrderingOperation = &MySQLExplain_OrderingOperation{} } if err := m.OrderingOperation.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NestedLoop", 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.NestedLoop = append(m.NestedLoop, &MySQLExplain_NestedLoopObj{}) if err := m.NestedLoop[len(m.NestedLoop)-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 *MySQLExplain_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: MySQLExplain_Table: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MySQLExplain_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 TableName", 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.TableName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AccessType", 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.AccessType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RowsExaminedPerScan", wireType) } m.RowsExaminedPerScan = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.RowsExaminedPerScan |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RowsProducedPerJoin", wireType) } m.RowsProducedPerJoin = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.RowsProducedPerJoin |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Filtered", 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.Filtered = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CostInfo", 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.CostInfo == nil { m.CostInfo = 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.CostInfo[mapkey] = mapvalue iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UsedColumns", 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.UsedColumns = append(m.UsedColumns, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Insert", 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.Insert = bool(v != 0) case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PossibleKeys", 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.PossibleKeys = append(m.PossibleKeys, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Key", 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.Key = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UsedKeyParts", 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.UsedKeyParts = append(m.UsedKeyParts, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field KeyLength", 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.KeyLength = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 13: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Ref", 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.Ref = append(m.Ref, 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 *MySQLExplain_NestedLoopObj) 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: MySQLExplain_NestedLoopObj: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MySQLExplain_NestedLoopObj: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: 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 = &MySQLExplain_Table{} } if err := m.Table.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 *MySQLExplain_OrderingOperation) 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: MySQLExplain_OrderingOperation: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MySQLExplain_OrderingOperation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field UsingFilesort", 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.UsingFilesort = bool(v != 0) case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CostInfo", 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.CostInfo == nil { m.CostInfo = 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.CostInfo[mapkey] = mapvalue iNdEx = postIndex case 3: 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 = &MySQLExplain_Table{} } if err := m.Table.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NestedLoop", 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.NestedLoop = append(m.NestedLoop, &MySQLExplain_NestedLoopObj{}) if err := m.NestedLoop[len(m.NestedLoop)-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 *MySQLExplain) 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: MySQLExplain: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MySQLExplain: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryBlock", 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.QueryBlock == nil { m.QueryBlock = &MySQLExplain_QueryBlock{} } if err := m.QueryBlock.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") ) ================================================ FILE: internal/x/expander/expander.go ================================================ package expander import ( "context" "fmt" "io" "strings" "github.com/sqlc-dev/sqlc/internal/sql/ast" "github.com/sqlc-dev/sqlc/internal/sql/astutils" "github.com/sqlc-dev/sqlc/internal/sql/format" ) // Parser is an interface for SQL parsers that can parse SQL into AST statements. type Parser interface { Parse(r io.Reader) ([]ast.Statement, error) } // ColumnGetter retrieves column names for a query by preparing it against a database. type ColumnGetter interface { GetColumnNames(ctx context.Context, query string) ([]string, error) } // Expander expands SELECT * and RETURNING * queries by replacing * with explicit column names // obtained from preparing the query against a database. type Expander struct { colGetter ColumnGetter parser Parser dialect format.Dialect } // New creates a new Expander with the given column getter, parser, and dialect. func New(colGetter ColumnGetter, parser Parser, dialect format.Dialect) *Expander { return &Expander{ colGetter: colGetter, parser: parser, dialect: dialect, } } // Expand takes a SQL query, and if it contains * in SELECT or RETURNING clause, // expands it to use explicit column names. Returns the expanded query string. func (e *Expander) Expand(ctx context.Context, query string) (string, error) { // Parse the query stmts, err := e.parser.Parse(strings.NewReader(query)) if err != nil { return "", fmt.Errorf("failed to parse query: %w", err) } if len(stmts) == 0 { return query, nil } stmt := stmts[0].Raw.Stmt // Check if there's any star in the statement (including CTEs, subqueries, etc.) if !hasStarAnywhere(stmt) { return query, nil } // Expand all stars in the statement recursively if err := e.expandNode(ctx, stmt); err != nil { return "", err } // Format the modified AST back to SQL expanded := ast.Format(stmts[0].Raw, e.dialect) return expanded, nil } // expandNode recursively expands * in all parts of the statement func (e *Expander) expandNode(ctx context.Context, node ast.Node) error { if node == nil { return nil } switch n := node.(type) { case *ast.SelectStmt: return e.expandSelectStmt(ctx, n) case *ast.InsertStmt: return e.expandInsertStmt(ctx, n) case *ast.UpdateStmt: return e.expandUpdateStmt(ctx, n) case *ast.DeleteStmt: return e.expandDeleteStmt(ctx, n) case *ast.CommonTableExpr: return e.expandNode(ctx, n.Ctequery) } return nil } // expandSelectStmt expands * in a SELECT statement including CTEs and subqueries func (e *Expander) expandSelectStmt(ctx context.Context, stmt *ast.SelectStmt) error { // First expand any CTEs - must be done in order since later CTEs may depend on earlier ones if stmt.WithClause != nil && stmt.WithClause.Ctes != nil { for _, cteNode := range stmt.WithClause.Ctes.Items { cte, ok := cteNode.(*ast.CommonTableExpr) if !ok { continue } cteSelect, ok := cte.Ctequery.(*ast.SelectStmt) if !ok { continue } if hasStarInList(cteSelect.TargetList) { // Get column names for this CTE columns, err := e.getCTEColumnNames(ctx, stmt, cte) if err != nil { return err } cteSelect.TargetList = rewriteTargetList(cteSelect.TargetList, columns) } // Recursively handle nested CTEs/subqueries in this CTE if err := e.expandSelectStmtInner(ctx, cteSelect); err != nil { return err } } } // Expand subqueries in FROM clause if stmt.FromClause != nil { for _, fromItem := range stmt.FromClause.Items { if err := e.expandFromClause(ctx, fromItem); err != nil { return err } } } // Expand the target list if it has stars if hasStarInList(stmt.TargetList) { // Format the current state to get columns tempRaw := &ast.RawStmt{Stmt: stmt} tempQuery := ast.Format(tempRaw, e.dialect) columns, err := e.getColumnNames(ctx, tempQuery) if err != nil { return fmt.Errorf("failed to get column names: %w", err) } stmt.TargetList = rewriteTargetList(stmt.TargetList, columns) } return nil } // expandSelectStmtInner expands nested structures without re-processing the target list func (e *Expander) expandSelectStmtInner(ctx context.Context, stmt *ast.SelectStmt) error { // Expand subqueries in FROM clause if stmt.FromClause != nil { for _, fromItem := range stmt.FromClause.Items { if err := e.expandFromClause(ctx, fromItem); err != nil { return err } } } return nil } // getCTEColumnNames gets the column names for a CTE by constructing a query with proper context func (e *Expander) getCTEColumnNames(ctx context.Context, stmt *ast.SelectStmt, targetCTE *ast.CommonTableExpr) ([]string, error) { // Build a temporary query: WITH SELECT * FROM var ctesToInclude []ast.Node for _, cteNode := range stmt.WithClause.Ctes.Items { ctesToInclude = append(ctesToInclude, cteNode) cte, ok := cteNode.(*ast.CommonTableExpr) if ok && cte.Ctename != nil && targetCTE.Ctename != nil && *cte.Ctename == *targetCTE.Ctename { break } } // Create a SELECT * FROM with the relevant CTEs cteName := "" if targetCTE.Ctename != nil { cteName = *targetCTE.Ctename } tempStmt := &ast.SelectStmt{ WithClause: &ast.WithClause{ Ctes: &ast.List{Items: ctesToInclude}, Recursive: stmt.WithClause.Recursive, }, TargetList: &ast.List{ Items: []ast.Node{ &ast.ResTarget{ Val: &ast.ColumnRef{ Fields: &ast.List{ Items: []ast.Node{&ast.A_Star{}}, }, }, }, }, }, FromClause: &ast.List{ Items: []ast.Node{ &ast.RangeVar{ Relname: &cteName, }, }, }, } tempRaw := &ast.RawStmt{Stmt: tempStmt} tempQuery := ast.Format(tempRaw, e.dialect) return e.getColumnNames(ctx, tempQuery) } // expandInsertStmt expands * in an INSERT statement's RETURNING clause func (e *Expander) expandInsertStmt(ctx context.Context, stmt *ast.InsertStmt) error { // Expand CTEs first if stmt.WithClause != nil && stmt.WithClause.Ctes != nil { for _, cte := range stmt.WithClause.Ctes.Items { if err := e.expandNode(ctx, cte); err != nil { return err } } } // Expand the SELECT part if present if stmt.SelectStmt != nil { if err := e.expandNode(ctx, stmt.SelectStmt); err != nil { return err } } // Expand RETURNING clause if hasStarInList(stmt.ReturningList) { tempRaw := &ast.RawStmt{Stmt: stmt} tempQuery := ast.Format(tempRaw, e.dialect) columns, err := e.getColumnNames(ctx, tempQuery) if err != nil { return fmt.Errorf("failed to get column names: %w", err) } stmt.ReturningList = rewriteTargetList(stmt.ReturningList, columns) } return nil } // expandUpdateStmt expands * in an UPDATE statement's RETURNING clause func (e *Expander) expandUpdateStmt(ctx context.Context, stmt *ast.UpdateStmt) error { // Expand CTEs first if stmt.WithClause != nil && stmt.WithClause.Ctes != nil { for _, cte := range stmt.WithClause.Ctes.Items { if err := e.expandNode(ctx, cte); err != nil { return err } } } // Expand RETURNING clause if hasStarInList(stmt.ReturningList) { tempRaw := &ast.RawStmt{Stmt: stmt} tempQuery := ast.Format(tempRaw, e.dialect) columns, err := e.getColumnNames(ctx, tempQuery) if err != nil { return fmt.Errorf("failed to get column names: %w", err) } stmt.ReturningList = rewriteTargetList(stmt.ReturningList, columns) } return nil } // expandDeleteStmt expands * in a DELETE statement's RETURNING clause func (e *Expander) expandDeleteStmt(ctx context.Context, stmt *ast.DeleteStmt) error { // Expand CTEs first if stmt.WithClause != nil && stmt.WithClause.Ctes != nil { for _, cte := range stmt.WithClause.Ctes.Items { if err := e.expandNode(ctx, cte); err != nil { return err } } } // Expand RETURNING clause if hasStarInList(stmt.ReturningList) { tempRaw := &ast.RawStmt{Stmt: stmt} tempQuery := ast.Format(tempRaw, e.dialect) columns, err := e.getColumnNames(ctx, tempQuery) if err != nil { return fmt.Errorf("failed to get column names: %w", err) } stmt.ReturningList = rewriteTargetList(stmt.ReturningList, columns) } return nil } // expandFromClause expands * in subqueries within FROM clause func (e *Expander) expandFromClause(ctx context.Context, node ast.Node) error { if node == nil { return nil } switch n := node.(type) { case *ast.RangeSubselect: if n.Subquery != nil { return e.expandNode(ctx, n.Subquery) } case *ast.JoinExpr: if err := e.expandFromClause(ctx, n.Larg); err != nil { return err } if err := e.expandFromClause(ctx, n.Rarg); err != nil { return err } } return nil } // hasStarAnywhere checks if there's a * anywhere in the statement using astutils.Search func hasStarAnywhere(node ast.Node) bool { if node == nil { return false } // Use astutils.Search to find any A_Star node in the AST stars := astutils.Search(node, func(n ast.Node) bool { _, ok := n.(*ast.A_Star) return ok }) return len(stars.Items) > 0 } // hasStarInList checks if a target list contains a * expression using astutils.Search func hasStarInList(targets *ast.List) bool { if targets == nil { return false } // Use astutils.Search to find any A_Star node in the target list stars := astutils.Search(targets, func(n ast.Node) bool { _, ok := n.(*ast.A_Star) return ok }) return len(stars.Items) > 0 } // getColumnNames prepares the query and returns the column names from the result func (e *Expander) getColumnNames(ctx context.Context, query string) ([]string, error) { return e.colGetter.GetColumnNames(ctx, query) } // countStarsInList counts the number of * expressions in a target list func countStarsInList(targets *ast.List) int { if targets == nil { return 0 } count := 0 for _, target := range targets.Items { resTarget, ok := target.(*ast.ResTarget) if !ok { continue } if resTarget.Val == nil { continue } colRef, ok := resTarget.Val.(*ast.ColumnRef) if !ok { continue } if colRef.Fields == nil { continue } for _, field := range colRef.Fields.Items { if _, ok := field.(*ast.A_Star); ok { count++ break } } } return count } // countNonStarsInList counts the number of non-* expressions in a target list func countNonStarsInList(targets *ast.List) int { if targets == nil { return 0 } count := 0 for _, target := range targets.Items { resTarget, ok := target.(*ast.ResTarget) if !ok { count++ continue } if resTarget.Val == nil { count++ continue } colRef, ok := resTarget.Val.(*ast.ColumnRef) if !ok { count++ continue } if colRef.Fields == nil { count++ continue } isStar := false for _, field := range colRef.Fields.Items { if _, ok := field.(*ast.A_Star); ok { isStar = true break } } if !isStar { count++ } } return count } // rewriteTargetList replaces * in a target list with explicit column references func rewriteTargetList(targets *ast.List, columns []string) *ast.List { if targets == nil { return nil } starCount := countStarsInList(targets) nonStarCount := countNonStarsInList(targets) // Calculate how many columns each * expands to // Total columns = (columns per star * number of stars) + non-star columns // So: columns per star = (total - non-star) / stars columnsPerStar := 0 if starCount > 0 { columnsPerStar = (len(columns) - nonStarCount) / starCount } newItems := make([]ast.Node, 0, len(columns)) colIndex := 0 for _, target := range targets.Items { resTarget, ok := target.(*ast.ResTarget) if !ok { newItems = append(newItems, target) colIndex++ continue } if resTarget.Val == nil { newItems = append(newItems, target) colIndex++ continue } colRef, ok := resTarget.Val.(*ast.ColumnRef) if !ok { newItems = append(newItems, target) colIndex++ continue } if colRef.Fields == nil { newItems = append(newItems, target) colIndex++ continue } // Check if this is a * (with or without table qualifier) // and extract any table prefix isStar := false var tablePrefix []string for _, field := range colRef.Fields.Items { if _, ok := field.(*ast.A_Star); ok { isStar = true break } // Collect prefix parts (schema, table name) if str, ok := field.(*ast.String); ok { tablePrefix = append(tablePrefix, str.Str) } } if !isStar { newItems = append(newItems, target) colIndex++ continue } // Replace * with explicit column references for i := 0; i < columnsPerStar && colIndex < len(columns); i++ { newItems = append(newItems, makeColumnTargetWithPrefix(columns[colIndex], tablePrefix)) colIndex++ } } return &ast.List{Items: newItems} } // makeColumnTargetWithPrefix creates a ResTarget node for a column reference with optional table prefix func makeColumnTargetWithPrefix(colName string, prefix []string) ast.Node { fields := make([]ast.Node, 0, len(prefix)+1) // Add prefix parts (schema, table name) for _, p := range prefix { fields = append(fields, &ast.String{Str: p}) } // Add column name fields = append(fields, &ast.String{Str: colName}) return &ast.ResTarget{ Val: &ast.ColumnRef{ Fields: &ast.List{Items: fields}, }, } } ================================================ FILE: internal/x/expander/expander_test.go ================================================ package expander import ( "context" "database/sql" "database/sql/driver" "fmt" "os" "testing" "github.com/go-sql-driver/mysql" "github.com/jackc/pgx/v5/pgxpool" "github.com/ncruces/go-sqlite3" _ "github.com/ncruces/go-sqlite3/embed" "github.com/sqlc-dev/sqlc/internal/engine/dolphin" "github.com/sqlc-dev/sqlc/internal/engine/postgresql" "github.com/sqlc-dev/sqlc/internal/engine/sqlite" "github.com/sqlc-dev/sqlc/internal/sqltest/docker" "github.com/sqlc-dev/sqlc/internal/sqltest/native" ) // PostgreSQLColumnGetter implements ColumnGetter for PostgreSQL using pgxpool. type PostgreSQLColumnGetter struct { pool *pgxpool.Pool } func (g *PostgreSQLColumnGetter) GetColumnNames(ctx context.Context, query string) ([]string, error) { conn, err := g.pool.Acquire(ctx) if err != nil { return nil, err } defer conn.Release() desc, err := conn.Conn().Prepare(ctx, "", query) if err != nil { return nil, err } columns := make([]string, len(desc.Fields)) for i, field := range desc.Fields { columns[i] = field.Name } return columns, nil } // MySQLColumnGetter implements ColumnGetter for MySQL using the forked driver's StmtMetadata. type MySQLColumnGetter struct { db *sql.DB } func (g *MySQLColumnGetter) GetColumnNames(ctx context.Context, query string) ([]string, error) { conn, err := g.db.Conn(ctx) if err != nil { return nil, err } defer conn.Close() var columns []string err = conn.Raw(func(driverConn any) error { preparer, ok := driverConn.(driver.ConnPrepareContext) if !ok { return fmt.Errorf("driver connection does not support PrepareContext") } stmt, err := preparer.PrepareContext(ctx, query) if err != nil { return err } defer stmt.Close() meta, ok := stmt.(mysql.StmtMetadata) if !ok { return fmt.Errorf("prepared statement does not implement StmtMetadata") } for _, col := range meta.ColumnMetadata() { columns = append(columns, col.Name) } return nil }) if err != nil { return nil, err } return columns, nil } // SQLiteColumnGetter implements ColumnGetter for SQLite using the native ncruces/go-sqlite3 API. type SQLiteColumnGetter struct { conn *sqlite3.Conn } func (g *SQLiteColumnGetter) GetColumnNames(ctx context.Context, query string) ([]string, error) { // Prepare the statement - this gives us column metadata without executing stmt, _, err := g.conn.Prepare(query) if err != nil { return nil, err } defer stmt.Close() // Get column names from the prepared statement count := stmt.ColumnCount() columns := make([]string, count) for i := 0; i < count; i++ { columns[i] = stmt.ColumnName(i) } return columns, nil } func TestExpandPostgreSQL(t *testing.T) { ctx := context.Background() uri := os.Getenv("POSTGRESQL_SERVER_URI") if uri == "" { if err := docker.Installed(); err == nil { u, err := docker.StartPostgreSQLServer(ctx) if err != nil { t.Fatal(err) } uri = u } else if err := native.Supported(); err == nil { u, err := native.StartPostgreSQLServer(ctx) if err != nil { t.Fatal(err) } uri = u } else { t.Skip("POSTGRESQL_SERVER_URI is empty and neither Docker nor native installation is available") } } pool, err := pgxpool.New(ctx, uri) if err != nil { t.Skipf("could not connect to database: %v", err) } defer pool.Close() // Create a test table _, err = pool.Exec(ctx, ` DROP TABLE IF EXISTS authors; CREATE TABLE authors ( id SERIAL PRIMARY KEY, name TEXT NOT NULL, bio TEXT ); `) if err != nil { t.Fatalf("failed to create test table: %v", err) } defer pool.Exec(ctx, "DROP TABLE IF EXISTS authors") // Create the parser which also implements format.Dialect parser := postgresql.NewParser() // Create the expander colGetter := &PostgreSQLColumnGetter{pool: pool} exp := New(colGetter, parser, parser) tests := []struct { name string query string expected string }{ { name: "simple select star", query: "SELECT * FROM authors", expected: "SELECT id, name, bio FROM authors;", }, { name: "select with no star", query: "SELECT id, name FROM authors", expected: "SELECT id, name FROM authors", // No change, returns original }, { name: "select star with where clause", query: "SELECT * FROM authors WHERE id = 1", expected: "SELECT id, name, bio FROM authors WHERE id = 1;", }, { name: "double star", query: "SELECT *, * FROM authors", expected: "SELECT id, name, bio, id, name, bio FROM authors;", }, { name: "table qualified star", query: "SELECT authors.* FROM authors", expected: "SELECT authors.id, authors.name, authors.bio FROM authors;", }, { name: "star in middle of columns", query: "SELECT id, *, name FROM authors", expected: "SELECT id, id, name, bio, name FROM authors;", }, { name: "insert returning star", query: "INSERT INTO authors (name, bio) VALUES ('John', 'A writer') RETURNING *", expected: "INSERT INTO authors (name, bio) VALUES ('John', 'A writer') RETURNING id, name, bio;", }, { name: "insert returning mixed", query: "INSERT INTO authors (name, bio) VALUES ('John', 'A writer') RETURNING id, *", expected: "INSERT INTO authors (name, bio) VALUES ('John', 'A writer') RETURNING id, id, name, bio;", }, { name: "update returning star", query: "UPDATE authors SET name = 'Jane' WHERE id = 1 RETURNING *", expected: "UPDATE authors SET name = 'Jane' WHERE id = 1 RETURNING id, name, bio;", }, { name: "delete returning star", query: "DELETE FROM authors WHERE id = 1 RETURNING *", expected: "DELETE FROM authors WHERE id = 1 RETURNING id, name, bio;", }, { name: "cte with select star", query: "WITH a AS (SELECT * FROM authors) SELECT * FROM a", expected: "WITH a AS (SELECT id, name, bio FROM authors) SELECT id, name, bio FROM a;", }, { name: "multiple ctes with dependency", query: "WITH a AS (SELECT * FROM authors), b AS (SELECT * FROM a) SELECT * FROM b", expected: "WITH a AS (SELECT id, name, bio FROM authors), b AS (SELECT id, name, bio FROM a) SELECT id, name, bio FROM b;", }, { name: "count star not expanded", query: "SELECT COUNT(*) FROM authors", expected: "SELECT COUNT(*) FROM authors", // No change - COUNT(*) should not be expanded }, { name: "count star with other columns", query: "SELECT COUNT(*), name FROM authors GROUP BY name", expected: "SELECT COUNT(*), name FROM authors GROUP BY name", // No change }, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { result, err := exp.Expand(ctx, tc.query) if err != nil { t.Fatalf("Expand failed: %v", err) } if result != tc.expected { t.Errorf("expected %q, got %q", tc.expected, result) } }) } } func TestExpandMySQL(t *testing.T) { ctx := context.Background() source := os.Getenv("MYSQL_SERVER_URI") if source == "" { if err := docker.Installed(); err == nil { u, err := docker.StartMySQLServer(ctx) if err != nil { t.Fatal(err) } source = u } else if err := native.Supported(); err == nil { u, err := native.StartMySQLServer(ctx) if err != nil { t.Fatal(err) } source = u } else { t.Skip("MYSQL_SERVER_URI is empty and neither Docker nor native installation is available") } } db, err := sql.Open("mysql", source) if err != nil { t.Skipf("could not connect to MySQL: %v", err) } defer db.Close() // Verify connection if err := db.Ping(); err != nil { t.Skipf("could not ping MySQL: %v", err) } // Create a test table _, err = db.ExecContext(ctx, `DROP TABLE IF EXISTS authors`) if err != nil { t.Fatalf("failed to drop test table: %v", err) } _, err = db.ExecContext(ctx, ` CREATE TABLE authors ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, bio TEXT ) `) if err != nil { t.Fatalf("failed to create test table: %v", err) } defer db.ExecContext(ctx, "DROP TABLE IF EXISTS authors") // Create the parser which also implements format.Dialect parser := dolphin.NewParser() // Create the expander colGetter := &MySQLColumnGetter{db: db} exp := New(colGetter, parser, parser) tests := []struct { name string query string expected string }{ { name: "simple select star", query: "SELECT * FROM authors", expected: "SELECT id, name, bio FROM authors;", }, { name: "select with no star", query: "SELECT id, name FROM authors", expected: "SELECT id, name FROM authors", // No change, returns original }, { name: "select star with where clause", query: "SELECT * FROM authors WHERE id = 1", expected: "SELECT id, name, bio FROM authors WHERE id = 1;", }, { name: "table qualified star", query: "SELECT authors.* FROM authors", expected: "SELECT authors.id, authors.name, authors.bio FROM authors;", }, { name: "double table qualified star", query: "SELECT authors.*, authors.* FROM authors", expected: "SELECT authors.id, authors.name, authors.bio, authors.id, authors.name, authors.bio FROM authors;", }, { name: "star in middle of columns table qualified", query: "SELECT id, authors.*, name FROM authors", expected: "SELECT id, authors.id, authors.name, authors.bio, name FROM authors;", }, { name: "count star not expanded", query: "SELECT COUNT(*) FROM authors", expected: "SELECT COUNT(*) FROM authors", // No change - COUNT(*) should not be expanded }, { name: "count star with other columns", query: "SELECT COUNT(*), name FROM authors GROUP BY name", expected: "SELECT COUNT(*), name FROM authors GROUP BY name", // No change }, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { result, err := exp.Expand(ctx, tc.query) if err != nil { t.Fatalf("Expand failed: %v", err) } if result != tc.expected { t.Errorf("expected %q, got %q", tc.expected, result) } }) } } func TestExpandSQLite(t *testing.T) { ctx := context.Background() // Create an in-memory SQLite database using native API conn, err := sqlite3.Open(":memory:") if err != nil { t.Fatalf("could not open SQLite: %v", err) } defer conn.Close() // Create a test table err = conn.Exec(` CREATE TABLE authors ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, bio TEXT ) `) if err != nil { t.Fatalf("failed to create test table: %v", err) } // Create the parser which also implements format.Dialect parser := sqlite.NewParser() // Create the expander using native SQLite column getter colGetter := &SQLiteColumnGetter{conn: conn} exp := New(colGetter, parser, parser) tests := []struct { name string query string expected string }{ { name: "simple select star", query: "SELECT * FROM authors", expected: "SELECT id, name, bio FROM authors;", }, { name: "select with no star", query: "SELECT id, name FROM authors", expected: "SELECT id, name FROM authors", // No change, returns original }, { name: "select star with where clause", query: "SELECT * FROM authors WHERE id = 1", expected: "SELECT id, name, bio FROM authors WHERE id = 1;", }, { name: "double star", query: "SELECT *, * FROM authors", expected: "SELECT id, name, bio, id, name, bio FROM authors;", }, { name: "table qualified star", query: "SELECT authors.* FROM authors", expected: "SELECT authors.id, authors.name, authors.bio FROM authors;", }, { name: "star in middle of columns", query: "SELECT id, *, name FROM authors", expected: "SELECT id, id, name, bio, name FROM authors;", }, { name: "count star not expanded", query: "SELECT COUNT(*) FROM authors", expected: "SELECT COUNT(*) FROM authors", // No change - COUNT(*) should not be expanded }, { name: "count star with other columns", query: "SELECT COUNT(*), name FROM authors GROUP BY name", expected: "SELECT COUNT(*), name FROM authors GROUP BY name", // No change }, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { result, err := exp.Expand(ctx, tc.query) if err != nil { t.Fatalf("Expand failed: %v", err) } if result != tc.expected { t.Errorf("expected %q, got %q", tc.expected, result) } }) } } ================================================ FILE: pkg/cli/cli.go ================================================ // package cli exposes the command-line interface for sqlc. It can be used to // run sqlc from Go without the overhead of creating a child process. // // Example usage: // // package main // // import ( // "os" // // sqlc "github.com/sqlc-dev/sqlc/pkg/cli" // ) // // func main() { // os.Exit(sqlc.Run(os.Args[1:])) // } package cli import ( "os" "github.com/sqlc-dev/sqlc/internal/cmd" ) // Run the sqlc CLI. It takes an array of command-line arguments // (excluding the executable argument itself) and returns an exit // code. func Run(args []string) int { return cmd.Do(args, os.Stdin, os.Stdout, os.Stderr) } ================================================ FILE: placeholder.go ================================================ package sqlc // This is a dummy file that allows SQLC to be "installed" as a module and locked using // go.mod and then run using "go run github.com/sqlc-dev/sqlc" type Placeholder struct{} ================================================ FILE: protos/analysis/analysis.proto ================================================ syntax = "proto3"; package analysis; message Identifier { string catalog = 1; string schema = 2; string name = 3; } message Column { string name = 1; string original_name = 2; string data_type = 3; bool not_null = 4; bool unsigned = 5; bool is_array = 6; int32 array_dims = 7; string comment = 8; int32 length = 9; // *int bool is_named_param = 10; bool is_func_call = 11; string scope = 12; Identifier table = 13; string table_alias = 14; Identifier type = 15; Identifier embed_table = 16; bool is_sqlc_slice = 17; } message Parameter { int32 number = 1; Column column = 2; } message Analysis { repeated Column columns = 1; repeated Parameter params = 2; } ================================================ FILE: protos/buf.yaml ================================================ version: v1 name: buf.build/sqlc/sqlc breaking: lint: use: - DEFAULT except: - PACKAGE_VERSION_SUFFIX ================================================ FILE: protos/plugin/codegen.proto ================================================ syntax = "proto3"; package plugin; service CodegenService { rpc Generate (GenerateRequest) returns (GenerateResponse); } message File { string name = 1 [json_name = "name"]; bytes contents = 2 [json_name = "contents"]; } 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 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"]; Codegen codegen = 12 [json_name = "codegen"]; } message Codegen { message Process { string cmd = 1; } message WASM { string url = 1; string sha256 = 2; } string out = 1 [json_name = "out"]; string plugin = 2 [json_name = "plugin"]; bytes options = 3 [json_name = "options"]; repeated string env = 4 [json_name = "env"]; Process process = 5 [json_name = "process"]; WASM wasm = 6 [json_name = "wasm"]; } message Catalog { string comment = 1; string default_schema = 2; string name = 3; repeated Schema schemas = 4; } message Schema { string comment = 1; string name = 2; repeated Table tables = 3; repeated Enum enums = 4; repeated CompositeType composite_types = 5; } message CompositeType { string name = 1; string comment = 2; } message Enum { string name = 1; repeated string vals = 2; string comment = 3; } message Table { Identifier rel = 1; repeated Column columns = 2; string comment = 3; } message Identifier { string catalog = 1; string schema = 2; string name = 3; } message Column { string name = 1; bool not_null = 3; bool is_array = 4; string comment = 5; int32 length = 6; bool is_named_param = 7; bool is_func_call = 8; // XXX: Figure out what PostgreSQL calls `foo.id` string scope = 9; Identifier table = 10; string table_alias = 11; Identifier type = 12; bool is_sqlc_slice = 13; Identifier embed_table = 14; string original_name = 15; bool unsigned = 16; int32 array_dims = 17; } message Query { string text = 1 [json_name = "text"]; string name = 2 [json_name = "name"]; string cmd = 3 [json_name = "cmd"]; repeated Column columns = 4 [json_name = "columns"]; repeated Parameter params = 5 [json_name = "parameters"]; repeated string comments = 6 [json_name = "comments"]; string filename = 7 [json_name = "filename"]; Identifier insert_into_table = 8 [json_name = "insert_into_table"]; } message Parameter { int32 number = 1 [json_name = "number"]; Column column = 2 [json_name = "column"]; } 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 GenerateResponse { repeated File files = 1 [json_name = "files"]; } ================================================ FILE: protos/vet/vet.proto ================================================ syntax = "proto3"; package vet; message Parameter { int32 number = 1 [json_name = "number"]; } message Config { 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"]; } message Query { string sql = 1 [json_name = "sql"]; string name = 2 [json_name = "name"]; string cmd = 3 [json_name = "cmd"]; repeated Parameter params = 4 [json_name = "parameters"]; } message PostgreSQL { PostgreSQLExplain explain = 1; } message PostgreSQLExplain { Plan plan = 1 [json_name = "Plan"]; map settings = 2 [json_name = "Settings"]; Planning planning = 3 [json_name = "Planning"]; message Plan { string node_type = 1 [json_name = "Node Type"]; string parent_relationship = 2 [json_name = "Parent Relationship"]; string relation_name = 3 [json_name = "Relation Name"]; string schema = 4 [json_name = "Schema"]; string alias = 5 [json_name = "Alias"]; bool parallel_aware = 6 [json_name = "Parallel Aware"]; bool async_capable = 7 [json_name = "Async Capable"]; float startup_cost = 8 [json_name = "Startup Cost"]; float total_cost = 9 [json_name = "Total Cost"]; uint64 plan_rows = 10 [json_name = "Plan Rows"]; uint64 plan_width = 11 [json_name = "Plan Width"]; repeated string output = 12 [json_name = "Output"]; repeated Plan plans = 13 [json_name = "Plans"]; // Embedded "Blocks" fields uint64 shared_hit_blocks = 14 [json_name = "Shared Hit Blocks"]; uint64 shared_read_blocks = 15 [json_name = "Shared Read Blocks"]; uint64 shared_dirtied_blocks = 16 [json_name = "Shared Dirtied Blocks"]; uint64 shared_written_blocks = 17 [json_name = "Shared Written Blocks"]; uint64 local_hit_blocks = 18 [json_name = "Local Hit Blocks"]; uint64 local_read_blocks = 19 [json_name = "Local Read Blocks"]; uint64 local_dirtied_blocks = 20 [json_name = "Local Dirtied Blocks"]; uint64 local_written_blocks = 21 [json_name = "Local Written Blocks"]; uint64 temp_read_blocks = 22 [json_name = "Temp Read Blocks"]; uint64 temp_written_blocks = 23 [json_name = "Temp Written Blocks"]; // "Node Type": "Sort" fields repeated string sort_key = 24 [json_name = "Sort Key"]; // "Node Type": "Hash Join" fields string join_type = 25 [json_name = "Join Type"]; bool inner_unique = 26 [json_name = "Inner Unique"]; string hash_cond = 27 [json_name = "Hash Cond"]; // "Node Type": "Index Scan" fields string index_name = 28 [json_name = "Index Name"]; string scan_direction = 29 [json_name = "Scan Direction"]; string index_cond = 30 [json_name = "Index Cond"]; } message Planning { uint64 shared_hit_blocks = 1 [json_name = "Shared Hit Blocks"]; uint64 shared_read_blocks = 2 [json_name = "Shared Read Blocks"]; uint64 shared_dirtied_blocks = 3 [json_name = "Shared Dirtied Blocks"]; uint64 shared_written_blocks = 4 [json_name = "Shared Written Blocks"]; uint64 local_hit_blocks = 5 [json_name = "Local Hit Blocks"]; uint64 local_read_blocks = 6 [json_name = "Local Read Blocks"]; uint64 local_dirtied_blocks = 7 [json_name = "Local Dirtied Blocks"]; uint64 local_written_blocks = 8 [json_name = "Local Written Blocks"]; uint64 temp_read_blocks = 9 [json_name = "Temp Read Blocks"]; uint64 temp_written_blocks = 10 [json_name = "Temp Written Blocks"]; } } message MySQL { MySQLExplain explain = 1; } message MySQLExplain { QueryBlock query_block = 1; message QueryBlock { uint64 select_id = 1; string message = 2; map cost_info = 3; Table table = 4; OrderingOperation ordering_operation = 5; repeated NestedLoopObj nested_loop = 6; } message Table { string table_name = 1; string access_type = 2; uint64 rows_examined_per_scan = 3; uint64 rows_produced_per_join = 4; string filtered = 5; map cost_info = 6; repeated string used_columns = 7; bool insert = 8; repeated string possible_keys = 9; string key = 10; repeated string used_key_parts = 11; string key_length = 12; repeated string ref = 13; } message NestedLoopObj { Table table = 1; } message OrderingOperation { bool using_filesort = 1; map cost_info = 2; Table table = 3; repeated NestedLoopObj nested_loop = 4; } } ================================================ FILE: scripts/build/main.go ================================================ package main import ( "fmt" "log" "os" "os/exec" "strings" ) func main() { version := os.Getenv("VERSION") sha := os.Getenv("GITHUB_SHA") if version == "" { cmd := exec.Command("git", "show", "--no-patch", "--no-notes", "--pretty=%ci", sha) out, err := cmd.CombinedOutput() if err != nil { log.Println(strings.TrimSpace(string(out))) log.Fatal(err) } var date string parts := strings.Split(string(out), " ") date = strings.Replace(parts[0]+parts[1], "-", "", -1) date = strings.Replace(date, ":", "", -1) version = fmt.Sprintf("v0.0.0-%s-%s", date, sha[:12]) } fmt.Printf("::set-output name=version::%s\n", version) x := "-X github.com/sqlc-dev/sqlc/internal/cmd.version=" + version args := []string{ "build", "-ldflags", x, "-o", "./sqlc", "./cmd/sqlc", } cmd := exec.Command("go", args...) cmd.Env = os.Environ() out, err := cmd.CombinedOutput() if err != nil { log.Println(strings.TrimSpace(string(out))) log.Fatal(err) } } ================================================ FILE: scripts/bump-version/main.go ================================================ package main import ( "flag" "fmt" "io/fs" "log" "os" "path/filepath" "strings" "github.com/google/go-cmp/cmp" ) func main() { curr := flag.String("c", "", "current version") next := flag.String("n", "", "next version") write := flag.Bool("w", false, "write out changes") flag.Parse() if err := run(*curr, *next, *write); err != nil { log.Fatal(err) } } func run(current, next string, realmode bool) error { write := func(path, old, new string) error { if realmode { if err := os.WriteFile(path, []byte(new), 0644); err != nil { return fmt.Errorf("write error: %s: %w", path, err) } } else { if diff := cmp.Diff(old, new); diff != "" { log.Printf("%s: %s\n", path, diff) } } return nil } { path := filepath.Join(".github", "ISSUE_TEMPLATE", "BUG_REPORT.yml") c, err := os.ReadFile(path) if err != nil { return err } old := string(c) if !strings.Contains(old, "- "+next) { item := "- " + current new := strings.ReplaceAll(old, item, "- "+next+"\n "+item) if err := write(path, old, new); err != nil { return err } } } { path := filepath.Join("docs", "overview", "install.md") c, err := os.ReadFile(path) if err != nil { return err } old := string(c) new := strings.ReplaceAll(old, "v"+current, "v"+next) new = strings.ReplaceAll(new, "sqlc_"+current, "sqlc_"+next) if err := write(path, old, new); err != nil { return err } } { path := filepath.Join("internal", "info", "facts.go") c, err := os.ReadFile(path) if err != nil { return err } old := string(c) new := strings.ReplaceAll(old, "v"+current, "v"+next) if err := write(path, old, new); err != nil { return err } } { path := filepath.Join("docs", "conf.py") c, err := os.ReadFile(path) if err != nil { return err } old := string(c) new := strings.ReplaceAll(old, "release = '"+current, "release = '"+next) if err := write(path, old, new); err != nil { return err } } walker := func(path string, info fs.FileInfo, err error) error { if err != nil { return err } if info.IsDir() { return nil } switch filepath.Ext(path) { case ".go", ".kt", ".py", ".json", ".md": c, err := os.ReadFile(path) if err != nil { return err } old := string(c) new := strings.ReplaceAll(old, `"sqlc_version": "v`+current, `"sqlc_version": "v`+next) new = strings.ReplaceAll(new, `sqlc-version: "`+current, `sqlc-version: "`+next) new = strings.ReplaceAll(new, `sqlc-version: '`+current, `sqlc-version: '`+next) new = strings.ReplaceAll(new, "sqlc v"+current, "sqlc v"+next) new = strings.ReplaceAll(new, "SQLC_VERSION=v"+current, "SQLC_VERSION=v"+next) if err := write(path, old, new); err != nil { return err } default: } return nil } { p := filepath.Join("internal", "endtoend", "testdata") if err := filepath.Walk(p, walker); err != nil { return err } } { p := filepath.Join("examples") if err := filepath.Walk(p, walker); err != nil { return err } } { p := filepath.Join("docs") if err := filepath.Walk(p, walker); err != nil { return err } } return nil } ================================================ FILE: scripts/cleanup-test-dbs/main.go ================================================ 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 } ================================================ FILE: scripts/mirror-go-plugin/main.go ================================================ 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) } } } ================================================ FILE: scripts/release.go ================================================ package main import ( "flag" "fmt" "log" "os" "os/exec" "strings" ) func main() { docker := flag.Bool("docker", false, "create a docker release") flag.Parse() version := os.Getenv("VERSION") sha := os.Getenv("GITHUB_SHA") if version == "" { cmd := exec.Command("git", "show", "--no-patch", "--no-notes", "--pretty=%ci", sha) out, err := cmd.CombinedOutput() if err != nil { log.Println(strings.TrimSpace(string(out))) log.Fatal(err) } var date string parts := strings.Split(string(out), " ") date = strings.Replace(parts[0]+parts[1], "-", "", -1) date = strings.Replace(date, ":", "", -1) version = fmt.Sprintf("v0.0.0-%s-%s", date, sha[:12]) } if *docker { x := "-extldflags \"-static\" -X github.com/sqlc-dev/sqlc/internal/cmd.version=" + version args := []string{ "build", "-a", "-ldflags", x, "-o", "/workspace/sqlc", "./cmd/sqlc", } cmd := exec.Command("go", args...) cmd.Env = os.Environ() out, err := cmd.CombinedOutput() if err != nil { log.Println(strings.TrimSpace(string(out))) log.Fatal(err) } return } arch := flag.Arg(0) if arch == "" { log.Fatalf("missing platform_arch argument") } log.Fatal("publishing to Equinox has been disabled") } ================================================ FILE: scripts/report.sh ================================================ #!/usr/bin/env bash curl \ -X POST \ --fail-with-body \ -H "Authorization: Token token=\"$BUILDKITE_ANALYTICS_TOKEN\"" \ -F "data=@junit.xml" \ -F "format=junit" \ -F "run_env[CI]=buildkite" \ -F "run_env[key]=$GITHUB_RUN_ID" \ -F "run_env[number]=$GITHUB_RUN_NUMBER-$GITHUB_RUN_ATTEMPT" \ -F "run_env[job_id]=$GITHUB_RUN_ID" \ -F "run_env[branch]=$GITHUB_REF" \ -F "run_env[commit_sha]=$GITHUB_SHA" \ -F "run_env[message]=Foo" \ -F "run_env[url]=$GITHUB_SERVER_URL" \ https://analytics-api.buildkite.com/v1/uploads ================================================ FILE: scripts/test-json-process-plugin/main.go ================================================ 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()}}}) }